GNOME Bugzilla – Bug 786299
renderer-native: Destroy monitor framebuffers when suspending
Last modified: 2017-08-16 05:42:25 UTC
This will help reduce memory when more than one gnome-shell instance is active, including the GDM instance. While it's might be a good idea to stop the gnome-shell instance of gdm all together when not active, this will help until that is done, while also reducing memory usage when multiple users have sessions active.
Created attachment 357602 [details] [review] renderer-native: Destroy monitor framebuffers when suspending When suspending (i.e. VT switching away, the GDM gnome-shell instance gets hidden, or changing user), destroy the onscreen and offscreen monitor framebuffers. When resuming, the stage views and framebuffers will be recreated anyway.
Review of attachment 357602 [details] [review]: LGTM ::: src/backends/native/meta-renderer-native.c @@ +1801,3 @@ + "framebuffer", NULL, + NULL); + g_object_set (G_OBJECT (stage_view), Why two calls instead of g_object_set (G_OBJECT (stage_view), "framebuffer", NULL, "offscreen", NULL, NULL); ?
(In reply to Florian Müllner from comment #2) > Review of attachment 357602 [details] [review] [review]: > > LGTM > > ::: src/backends/native/meta-renderer-native.c > @@ +1801,3 @@ > + "framebuffer", NULL, > + NULL); > + g_object_set (G_OBJECT (stage_view), > > Why two calls instead of > g_object_set (G_OBJECT (stage_view), > "framebuffer", NULL, > "offscreen", NULL, > NULL); > ? No reason, just didn't think of combining them. I'll make the change.
Attachment 357602 [details] pushed as dbc6343 - renderer-native: Destroy monitor framebuffers when suspending