17

I recently made a post because I couldn't get my NVIDIA GPU up and running. This is the post: link to my other post. I got my gpu working now (through NVIDIA X server settings). These are my specs:

ubuntu version: 16.04.1

GPU: NVIDIA Corporation GM108M [GeForce 840M]

But every time I suspend my laptop and reboot it I get a black screen with this error message:

[ 5107.273042] usbhid 2-3:1.0: suspend error -5  
[ 5107.644336] NVRM: Xid (PCI:0000:03:00): 79, GPU has fallen off the bus.)  
[ 5107.644336] 

The only solution there is is to completely reboot my laptop with the power button.

--- Extra information ---

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.26                 Driver Version: 375.26                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce 840M        Off  | 0000:03:00.0     Off |                  N/A |
| N/A   47C    P0    N/A /  N/A |    242MiB /  2002MiB |     24%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1409 G /usr/lib/xorg/Xorg 149MiB | | 0 2471 G compiz 92MiB | | 0 2774 G /usr/lib/firefox/firefox 1MiB | +-----------------------------------------------------------------------------+

Thus, it only happens when my laptop puts itself in sleep-/suspend-mode (I deactivated that now so it doesn't go into sleep-/suspend-mode anymore). Powering up my laptop has no problems with this. Never encountered this before either. I also switched back to my Intel GPU to test if it still occurs, but it doesn't. So it has to do something with my Nvidia GPU.

8 Answers8

7

I had the exact same problem, I solved it by putting the graphics card into persistent mode:

$ sudo nvidia-smi -pm 1

I don't know what this really does but it seems that it's working for me.

I found the solution in the next forum: https://bbs.archlinux.org/viewtopic.php?id=145527

  • 1
    According to https://docs.nvidia.com/deploy/driver-persistence/index.html#persistence-mode nvidia-smi -pm 1 is "near end-of-life and will be eventually deprecated in favor the Persistence Daemon" (nvidia-persistenced) – eMPee584 Jul 31 '19 at 06:50
  • 2
    internestingly, my box is running this persitence daemon, but the problem still presents after a suspend... – Brad Sep 15 '19 at 09:53
  • Finally managed to fix my laptop freezing on boot :D – adazem009 Dec 29 '20 at 09:59
  • Nevermind, the the driver was still crashing. Another thing helped me, see my answer below. – adazem009 Jan 02 '21 at 21:40
6

Update: There was a related bug on the ubuntu issue tracker that has since been fixed and released. Not sure if this answer is helpful anymore. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1847937


Here is a viable solution that doesn't require you to limit your low power state usage:

The fix is to add the following arguments to the kernel boot parameters: rcutree.rcu_idle_gp_delay=1 acpi_osi=! acpi_osi='Windows 2009' You can test this fix by rebooting and pressing "e" on your primary boot entry in grub. Add the arguments to the end of the line ending with linux and press CTRL+X to boot. Try suspending and waking the system. If it works, you're golden! To make the fix permanent you need to edit your \etc\default\grub file:

  1. Open a terminal window and paste the following command: sudo xed /etc/default/grub
  2. Enter your password. Then, find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT=
  3. Add the arguments to the end of this line, inside the quotes. So it looks roughly like this: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rcutree.rcu_idle_gp_delay=1 acpi_osi=! acpi_osi='Windows 2009'"
  4. Run sudo update-grub

Allegedly, the successful result can be achieved by replacing Windows 2009 with Linux to clarify to BIOS what OS we are using. This did not work for me, but others commented below that it helped them. In my case, I left it as Windows 2009.

Source: https://forums.linuxmint.com/viewtopic.php?p=1728952&sid=d2f654dfa1082400eeea98c9fbf01918#p1728952

  • This fix worked for me on a Dell Precision 5540. However, it did not work to replace Windows 2009 with Linux. It only worked when setting acpi_osi='Windows 2009' – Teddy Ort Jun 16 '20 at 15:12
  • I had a one-line error message after waking from suspend, in contrast to the example in the question: [ 8329.337941] NVRM: Xid (PCI:0000:01:00): 79,pix=1512, GPU has fallen off the bus.. This solution worked for me on a Lenovo IdeaPad Z710, GeForce 840M, Linux Mint Tina 19.2 cinnamon, only by replacing Windows 2009 with Linux. Now I can simply close the screen (=suspend) and wake the laptop to enter my pw again. – questionto42 Dec 27 '20 at 14:00
  • Worked for me on Lenovo P50 with Ubuntu 20.04 – Dave Reikher Jan 30 '21 at 14:11
3

Tried everything. Only one thing helped: disable the ASPM. Add this to kernel boot arguments: pcie_aspm=off

znd0
  • 39
3

Next time, try to log in via SSH to halt/reboot your computer. Other procedure would be to press magic+r to unbind keyboard from X and pressing cltr+alt+del.

I have the same problem with this version of driver. Try the ubuntu driver package!

  • 2
    When the error happens, i am unable to enter the TTY's. So i wouldn't be able to log in throuugh ssh. Already tried every button or combination. Nothing helps, only restarting my laptop (which makes me lose my state of my laptop) – Enforcerke Jan 09 '17 at 15:19
  • 1
    Thats not correct. The keyboard is bind to X, which is crashed. Unbind with magic+r or use SSH: https://en.wikipedia.org/wiki/Magic_SysRq_key – user639913 Jan 09 '17 at 20:35
0

Having the same issue on Ubuntu 18.04, I'm using nvidia-prime for graphics switching with nvidia-driver-396(.24) installed. This issue only occurs when running on the dedicated card using:

sudo prime-select nvidia

On recovering from suspend, the desktop flashes up then black screens as mentioned above with the very same error message.

Hardware (Dell inspiron 7559): Nvidia GTX 960m Intel i7-6700HQ

Word Around:

A fix that worked for me, was to delete the default swapfile made during install and create a dedicated swap partition, of course remember to add to fstab and direct grub to the partition with resume="UUID".

Craig
  • 1
0

None of the solutions here and anywhere else helped for me. There was, though, one thing I noticed.

I was getting the PCIe bus error severity=corrected messages (lots of them) in dmesg. This most likely caused the NVIDIA driver to crash. So, I found more information about this error, and found this article. My solution was to edit /etc/default/grub and add pci=nomsi to kernel arguments (by editing this line):

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi"

Save the file, and run sudo update-grub. Then, reboot and the NVIDIA driver shouldn't have any issues.

I haven't tested everything with this solution, but the NVIDIA driver finally started on boot, and even suspend was working. I'll edit this post if I experience any issues again.

Edit: This didn't help... it just made the drivers working for one boot, then I experienced the issue again. I asked for this as another question: GPU has fallen off the bus (on almost every boot)

adazem009
  • 1,032
-2

I found out that Ubuntu 18.04 gives an option of using Ubuntu on Wayland, which I learnt is an alternative to the x server. I logged in using the Ubuntu on Wayland option on the login screen:

the login screen

Now I can use the suspend option without any problem.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
-2

I had a similar issue on Linux Mint. Most forum posts suggested that this is something to do with Active State Power Management (ASPM) on Linux that doesn't play well with the NVidia driver. They suggested that you turn off ASPM in the boot options. However that doesn't work if you have ASPM off in your bios. I finally got it to work by turning on ASPM in bios but turning it off in the boot options - so Linux knows that its controlling ASPM and not bios.

Rav
  • 1