NVreg_PreserveVideoMemoryAllocations=1 should be the default
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nvidia-graphics-drivers-535 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
As far as I can tell, any system with an NVIDIA graphics card won't resume from sleep correctly when running mantic unless the NVIDIA driver has the option `NVreg_
The GNOME shell fails to do this and fails fairly spectacularly. This results in a wide variety of visual defects but leaves the system unusable.
The suggested option works around this by making the driver write video memory out to file while suspending and restoring video memory from file when resuming. It's important that the path where this temporary file is written out has enough free space to hold all of video memory; on mantic, `/tmp` (the default) seems appropriate as it is not a ramfs but this could be configured elsewhere.
While there are obviously cases where this behaviour is not desired (mainly where GPUs are used for non-display purposes), it seems likely that in the vast majority of cases where such a GPU is present and the system is regularly put into a sleep state that the GPU will be used for display and not as a GPGPU. Systems that are put into sleep states tend to be portables, where the GPU is primarily for display; systems used for GPGPU tend not to be portable and are not usually put into sleep states where the GPU is shut down. Obviously these are generalisations, but they are _generally_ true. It's also likely that users doing GPGPU will already have to go and reconfigure their systems for optimal performance whereas desktop users generally expect the system to work correctly out of the box. I'm a long-term Ubuntu user and software engineer and it took me a couple of weeks to figure out that suspend isn't broken on my new laptop, I just need to set GPU driver options; the chances of a normal user figuring this out are slim.
I'd suggest that putting the option in /etc/modprobe.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.10
Release: 23.10
Codename: mantic
$ apt-cache policy nvidia-
nvidia-
Installed: 535.154.
Candidate: 535.154.
Version table:
*** 535.154.
500 http://
500 http://
100 /var/lib/
535.
500 http://