After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786299 - renderer-native: Destroy monitor framebuffers when suspending
renderer-native: Destroy monitor framebuffers when suspending
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-08-15 03:15 UTC by Jonas Ådahl
Modified: 2017-08-16 05:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
renderer-native: Destroy monitor framebuffers when suspending (4.25 KB, patch)
2017-08-15 03:15 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2017-08-15 03:15:35 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.
Comment 1 Jonas Ådahl 2017-08-15 03:15:40 UTC
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.
Comment 2 Florian Müllner 2017-08-15 09:26:37 UTC
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);
?
Comment 3 Jonas Ådahl 2017-08-15 14:18:14 UTC
(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.
Comment 4 Jonas Ådahl 2017-08-16 05:42:21 UTC
Attachment 357602 [details] pushed as dbc6343 - renderer-native: Destroy monitor framebuffers when suspending