Glitches and messed up colours after wake up on GTX 1650 ti, ryzen 4800h, Ubuntu 20.10

Hi all,

i’m using ubuntu 20.10 on a lenovo legion 5 with ryzen 4800h and nvidia gtx 1650ti. I’m using the nvidia driver 460.73.01 and kernel version 5.11.0-051100-generic

Whenever i close the screen and re-open it the computer wakes up but the colors and windows looks really strange with, for example, text boxes with black background and white text. It affects all apps and sometimes it causes weird freezes, glitches with windows closing and re-opening and a continous going back to log in screen. I’ve tried to disable hardware-acceleration in chrome but it didn’t solve the problem.

I’ve tried to take a screenshot but the screenshot doesn’t show any of the problems i see live. I’m attaching the nvidia-bug-report.log.gz.
nvidia-bug-report.log.gz (434.5 KB)

Do you have any suggestion on how to solve this? Thanks

NVreg_PreserveVideoMemoryAllocations=1

http://us.download.nvidia.com/XFree86/Linux-x86_64/460.73.01/README/powermanagement.html

1 Like

Thanks a lot. This totally solved it. And resume is also very fast compared to before.
I followed the commands in this github repo and they worked like a charm!

Thanks again <3

Excuse me, now i have a problem when closing up the screen, like the pc won’t suspend. It goes blank and when i open it is imeediately at the login screen. But i noticed that when i close the screen the fans keep spinning, like it isn’t hibernating correctly. Do you know why? thanks again

Please run nvidia-bug-report.sh as root after suspend/resume and attach the resulting nvidia-bug-report.log.gz file to your post.

Thanks, here it is. I’ve run

sudo systemctl suspend

and then performed nvidia-bug-report.sh as asked.

nvidia-bug-report.log.gz (426.0 KB)

Seems to get stuck very early in the suspend process so there’s not much logged.
Please run
sudo journalctl -b0 >journal.txt
after a suspend attempt and attach journal.txt.

Thanks again. Here it is!

journal.txt (594.0 KB)

nvidia-suspend.service: Failed at step EXEC spawning /usr/bin/nvidia-sleep.sh: Permission denied

Please make the script executable.

Thanks it’s working now. I had the glitches again after suspend. Now they’re gone. I performed another bur report after the glitches, could you check if anything is wrong?

nvidia-bug-report.log.gz (520.6 KB)

You’re getting a lot of XID errors, XID 32 after resume and 13 in general.
XID 32 can point to defective system memory but since it seems to only occur after suspend/resume, I’d try a bios update first.
A possible mitigation regarding the driver might be also setting the module option NVreg_TemporaryFilePath=/var/tmp
to save the video memory to disk instead of system memory.

Thanks a lot man! you were really helpful!

Hi, sorry to bother again. I updated the bios and i still get the glitches and the XID errors.
here is the nvidia bug report.

nvidia-bug-report.log.gz (482.7 KB)

Now the problem is way less severe given that if i suspend again after the glitches everything goes back to normality. After this try i’ve tried replacing the “NVreg_TemporaryFilePath=/tmp” with “NVreg_TemporaryFilePath=/var/tmp”. After editing the file do i need to reload it with another command? The glitches now seems gone, but i still get the XID 13 and 32 errors in the nvidia bur report.
Here is the final log after both changes.

nvidia-bug-report.log.gz (587.9 KB)

Thanks a lot for your help and your time.

The change to /var/tmp didn’t take effect, you’ll need to update the initrd
sudo update-initramfs -u
and reboot.
You can use
cat /proc/driver/nvidia/params
to display the values that have been set.
Looking at your log, the NVreg_PreserveVideoMemoryAllocations variable is also still set to 0.

Ok i noticed and i should have fixed everything. Apparently i had to create the
“/etc/initramfs-tools/conf.d/resume” with the UUID of the swap partition. Sadly the glitches stayed the same but only for the first suspend. After i re-suspend the system goes back to normal and stays like that. Sadly also the XID errors are still in the report.

nvidia-bug-report.log.gz (398.3 KB)

Thanks again.