pop-os / nvidia-graphics-drivers

Pop!_OS NVIDIA Graphics Drivers
141 stars 8 forks source link

fix: Set NVreg_PreserveVideoMemoryAllocations=1 on Nvidia and Hybrid #70

Closed ids1024 closed 3 years ago

ids1024 commented 3 years ago

Hopefully this should help with the suspend/resume issues with WebRender. Requires testing to make sure it fixes the issue and doesn't cause others.

Related: pop-os/default-settings#104 and pop-os/default-settings#105.

jacobgkau commented 3 years ago

I've tested this (along with https://github.com/pop-os/default-settings/pull/104 / https://github.com/pop-os/default-settings/pull/105) on the following machines so far:

On the NVIDIA machines/in NVIDIA mode, while resuming is entirely successful most of the time (often with a brief freeze either at the lock screen or just after unlocking), I've had a handful of cases where some artifacting occurs (to clarify, the black/white static is part of the video, the issue is the miscolored UI elements and jumbled page elements):

Screenshot from 2020-10-29 14-57-25

Screenshot from 2020-10-29 15-18-02

Screenshot from 2020-10-29 15-53-18

Unlike the previous distortion (with layers.acceleration and no NVreg option), this artifacting does go away when the affected portion of the window is redrawn (switching tabs is a quick way to bring everything back to normal), and this is very occasional (to the point where it's difficult to reproduce.) Portions of the window being transparent with further page distortion (as shown in the first screenshot) has only happened twice, once on addw2 in NVIDIA mode and once on serw12. Portions of the window being red has happened a few more times.

After switching back to the stable versions of NVIDIA and Firefox, I almost immediately got text/icon distortion in GNOME Shell after suspend/resume:

Screenshot from 2020-10-29 16-09-02

So I think this NVreg change should ship, but I'm not sure Firefox's WebRender is ready unless we're ready to field questions/complaints about the occasional distortion. (As a reminder, serw12 does require either WebRender, layers.acceleration, or xrender; the default renderer with none of these enabled is unacceptably choppy on that machine.)