Witko / nvidia-xrun

Utility to run separate X with discrete nvidia graphics with full performance
GNU General Public License v2.0
488 stars 69 forks source link

Slowdown on suspend/resume (Closing laptop lid) #149

Closed Pspecer closed 4 years ago

Pspecer commented 4 years ago

I'm running the dell XPS 15 7950 with debian 10 and the nvidia-440.100 driver. Nvidia-xrun works great, except when suspending/resuming(closing the laptop lid).

Doing a suspend/resume using the intel graphics works fine, but on the nvidia card the system becomes extremely slow and I have to shut down the windows manager (using i3-msg exit). And then I can restart i3 with nvidia-xrun again with no more slowdown problems.

Looking at dmesg after the suspend resume one line catches my eye:

[18537.420731] asynchronous wait on fence NVIDIA:nvidia.prime:174 timed out [18548.599841] asynchronous wait on fence NVIDIA:nvidia.prime:175 timed out

Everything else looks normal in dmesg after the suspend. I checked dmesg after exiting i3 normally and these messages do not appear.

michelesr commented 4 years ago

This is most likely not a nvidia-xrun issue, but an issue with NVIDIA drivers.

Pspecer commented 4 years ago

Perhaps. I tried blacklisting nvidia in modprobe.d and adding NVreg_RegisterForACPIEvents=1 NVreg_EnableMSI=1 on loading the nvidia module and now I seem to get an error in dmesg.

https://pastebin.com/wEMG8xmG

Pspecer commented 4 years ago

The issue is seemingly fixed when adding GRUB_CMDLINE_LINUX="nouveau.blacklist=0 acpi_osi=! acpi_osi=\"Windows 2015\" acpi_backlight=vendor mem_sleep_default=deep"

to /etc/default/grub (don't forget to update-grub afterwards)

Got the fix from https://wiki.archlinux.org/index.php/Dell_XPS_15_9570#Lock-ups_when_resuming_from_suspend_with_nvidia_module

https://www.dell.com/community/Linux-General/XPS-15-9570-with-Ubuntu-18-04-1-not-resuming-after-suspend/m-p/7305094#M28897

The issue is relevant to this project because it seems to happen mainly on an NVIDIA-Optimus setup.