Nvidia drivers: Refresh background and screen corners (#21)#330
Conversation
|
Testing this required a few reboots because |
cassidyjames
left a comment
There was a problem hiding this comment.
UX-wise this appears to fix the corruption issues for me here on Juno with an NVIDIA GTX 1050Ti and the 390 driver from AppCenter. I'll still want to get a code sign-off.
| } | ||
|
|
||
| Bus.watch_name (BusType.SESSION, DAEMON_DBUS_NAME, BusNameWatcherFlags.NONE, daemon_appeared, lost_daemon); | ||
| void refresh_backgrounds () |
There was a problem hiding this comment.
This method should be static as well as compiled when HAS_MUTTER322.
|
Thanks for the review @donadigo. Instead of having two (I can't re-test this branch right now because I'm travelling without my Nvidia box.) |
This was accidentally removed in #330 and is the major reason why window menus aren't appearing.
The proprietary Nvidia drivers discard FBOs when the system suspends from resume (maybe on all sorts of modesets?). The current workaround for this was added in Feb 2016:
4b001ca
This correctly causes the wallpaper images to be reloaded when resuming from sleep mode, but the multitasking background (SystemBackground) and the round corners are still garbled here (see screenshots in #21).
The Bugzilla issue for the same issue in GNOME Shell has more details:
https://bugzilla.gnome.org/show_bug.cgi?id=739178
There's now a
Display.gl_video_memory_purgedsignal that allows us to handle the loss of OpenGL resources without parsing Nvidia vendor strings. I've used this signal to fix wallpaper images and the rounded corners plugin.This did not fix the SystemBackground. Looking at meta-background.c, I think the issue is that
G_DESKTOP_BACKGROUND_STYLE_WALLPAPERbackgrounds are not fully discarded byMeta.Background.refresh_all. Either way, simply calling the color setter seems to fix the issue.All tested on Juno with a GTX 1080 (not mobile) and the Nvidia 390 drivers from AppCenter. Without this patch, I can reproduce garbled textures after every sleep-resume cycle. Now everything seems to work fine.