# [SOLVED] Crash on Resume

## the_bard

Got an issue that's left me befuddled. At some point in the recent past, I managed to mangle resume on my desktop. Not sure exactly what killed it; likely was caused by or related to an update installed. Resume works fine when I boot in to Win10, so I'm leery on blaming the hardware. 

Symptoms:

- Appears to go into standby without an isssue.

- Resume initiated via both power button and keyboard (USB)

- Upon waking, there is hard drive activity, and the fans spin up.

- Primary monitor (HDMI) powers up, but remains black (when FB_EFI was compiled in, it displays the console login, but does not update with keyboard input)

- Secondary monitor remains dark and in standby mode.

- At various points during testing, I may or may not have been able to use the magic sysrq to reboot the desktop safely. I currrently cannot.

Things I've yet to test definitively:

- booting to Ubuntu via USB and testing standby/resume

- dropping out to the console blind and attempting to place it in sleep there, after killing X.

Things I have done:

- removing FB_EFI support in the kernel.

- compiled DRM support in the kernel vs not.

- Reverting back to the 4.0.9-gentoo kernel, which is the oldest I have installed.

- Reverting back to nvidia-drivers-370.28-r1.

- Combing over the kernel config in hopes of my missing something obvious.

Configuration:

- Kernel: 4.9.6-gentoo-r1

- nvidia-drivers-375.26

- lspci: http://pastebin.com/Z42hyK5h

- .config: http://pastebin.com/SzCD1PFT

- world: http://pastebin.com/3AgJqtex

Any thoughts?

Update:

Ubuntu 16.10 won't boot without me adding the nomodeset kernel parameter (Removed quiet and splash while I was at it). Won't resume either... exhibits the same symptoms as my Gentoo install.Last edited by the_bard on Tue May 09, 2017 1:43 am; edited 1 time in total

----------

## Hu

Can you reproduce the problem on an untainted kernel?

----------

## the_bard

Yes, but not to the same degree.

I compiled FB_EFI support back in, then blacklisted all the NVidia modules. Rebooted to the new kernel, and was greeted by the console logon properly. Tried the following suspend operations:

pm_suspend : Nothing. Nada. Zip. Dumps me back at the command prompt.

s2ram: Complains about the machine being unknown.

s2ram -f -a 1: immediate reboot

s2ram -f -a 2: hang, can recover via SysRq

s2ram -f -a 3: " "

s2ram -f -p -m: illegal instruction

s2ram -f -p -s: " "

s2ram -f -m: " "

s2ram -f -s: " "

s2ram -f -p: hang, can recover via SysRq

s2ram -f -a 1 -m: illegal instruction

s2ram -f -a 1 -s: " "

Pretty sure I've narrowed the issue down to my GeForce 980 TI video card, since the system does respond to keyboard input after resuming. I was able to blindly type "dmesg > dmesg.txt" upon resuming, and the output appears normal to my eyes: http://pastebin.com/A6R7s7xA

Update: I thought it odd that pm_suspend wouldn't run at the command line, without X running, since it'll suspend the system fine within X. So I rebooted back into that untainted kernel, ran pm_suspend again, and captured the following snippet from the dmesg output:

```
[   45.408701] traps: s2ram[1927] trap invalid opcode ip:7f0c61e1ff6f sp:7ffe2f666630 error:0

[   45.408702]  in libx86.so.1[7f0c61e18000+20000]
```

Update: Update NVidia-Drivers to 378.09; still hangs, but I can use SysRq now with the NVidia modules loaded.

----------

## the_bard

Looks like it was an NVidia driver issue... upgrading to 381.09 resolved the crash on resume for me.

----------

