Black screen and keyboard freeze after resume from suspend (GeForce 940MX, NVIDIA 381.22, Linux 4.11.2)

Whenever I close the laptop lid and wait for it to suspend, and then open it again, the screen shows a console cursor on the top left briefly, and then goes black. It does not respond to any keyboard or mouse input. I can still ssh into the machine and see that Xorg is using 100% of one CPU.

I’ve had this problem for a few months through multiple kernel, Xorg and drive updates, and I’ve posted in another thread about a similar problem. Sandip asked me to start a separate thread.

Here’s the nvidia-bug-report output generated when I ssh into the machine:

https://paste.pound-python.org/show/jWsl1aH1kudtlagRnhF5/

There is no any nvidia related error in log. Is any older driver worked on your setup? What desktop env you are running gnome, kde , unity or else? Looks like you are running MShybrid notebook which has intel and nvidia gpu. How did you configured PRIME on this notebook? Please share output of xrandr and xrandr --verbose commands.

I am running KDE. The laptop has Intel and NVIDIA, and I did configure PRIME synchronization with

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

The problem started a few months ago, but before that I used the Intel card with Bumblebee. At that time I also had a problem of not being able to use the NVIDIA card after resume, but the system did not freeze.

xrandr

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
eDP-1-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1920x1080     60.01*+
   1400x1050     59.98  
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   800x600       60.00    60.32    56.25  
   700x525       59.98  
   640x512       60.02  
   640x480       60.00    59.94  
   512x384       60.00  
   400x300       60.32    56.34  
   320x240       60.05  
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-1 disconnected (normal left inverted right x axis y axis)

xrandr --verbose

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
eDP-1-1 connected primary 1920x1080+0+0 (0x46) normal (normal left inverted right x axis y axis) 344mm x 194mm
	Identifier: 0x42
	Timestamp:  40781
	Subpixel:   unknown
	Gamma:      1.0:1.0:1.0
	Brightness: 1.0
	Clones:    
	CRTC:       0
	CRTCs:      0 1 2
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	EDID: 
		00ffffffffffff0009e5b90600000000
		011a010495221378023d78995b549127
		224e5300000001010101010101010101
		0101010101013c3780de703814403020
		360058c21000001a0000000000000000
		00000000000000000000000000fe0042
		4f452048460a202020202020000000fe
		004e5631353646484d2d4e34360a0082
	PRIME Synchronization: 1 
		supported: 0, 1
	scaling mode: Full aspect 
		supported: None, Full, Center, Full aspect
	Broadcast RGB: Automatic 
		supported: Automatic, Full, Limited 16:235
	audio: auto 
		supported: force-dvi, off, auto, on
  1920x1080 (0x46) 141.400MHz +HSync -VSync *current +preferred
        h: width  1920 start 1968 end 2000 total 2142 skew    0 clock  66.01KHz
        v: height 1080 start 1083 end 1089 total 1100           clock  60.01Hz
  1400x1050 (0x47) 122.000MHz +HSync +VSync
        h: width  1400 start 1488 end 1640 total 1880 skew    0 clock  64.89KHz
        v: height 1050 start 1052 end 1064 total 1082           clock  59.98Hz
  1280x1024 (0x48) 108.000MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
  1280x960 (0x49) 108.000MHz +HSync +VSync
        h: width  1280 start 1376 end 1488 total 1800 skew    0 clock  60.00KHz
        v: height  960 start  961 end  964 total 1000           clock  60.00Hz
  1024x768 (0x4a) 133.475MHz -HSync +VSync DoubleScan
        h: width  1024 start 1100 end 1212 total 1400 skew    0 clock  95.34KHz
        v: height  768 start  768 end  770 total  794           clock  60.04Hz
  1024x768 (0x4b) 65.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
        v: height  768 start  771 end  777 total  806           clock  60.00Hz
  960x720 (0x4c) 117.000MHz -HSync +VSync DoubleScan
        h: width   960 start 1024 end 1128 total 1300 skew    0 clock  90.00KHz
        v: height  720 start  720 end  722 total  750           clock  60.00Hz
  928x696 (0x4d) 109.150MHz -HSync +VSync DoubleScan
        h: width   928 start  976 end 1088 total 1264 skew    0 clock  86.35KHz
        v: height  696 start  696 end  698 total  719           clock  60.05Hz
  896x672 (0x4e) 102.400MHz -HSync +VSync DoubleScan
        h: width   896 start  960 end 1060 total 1224 skew    0 clock  83.66KHz
        v: height  672 start  672 end  674 total  697           clock  60.01Hz
  800x600 (0x4f) 81.000MHz +HSync +VSync DoubleScan
        h: width   800 start  832 end  928 total 1080 skew    0 clock  75.00KHz
        v: height  600 start  600 end  602 total  625           clock  60.00Hz
  800x600 (0x50) 40.000MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
        v: height  600 start  601 end  605 total  628           clock  60.32Hz
  800x600 (0x51) 36.000MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock  35.16KHz
        v: height  600 start  601 end  603 total  625           clock  56.25Hz
  700x525 (0x52) 61.000MHz +HSync +VSync DoubleScan
        h: width   700 start  744 end  820 total  940 skew    0 clock  64.89KHz
        v: height  525 start  526 end  532 total  541           clock  59.98Hz
  640x512 (0x53) 54.000MHz +HSync +VSync DoubleScan
        h: width   640 start  664 end  720 total  844 skew    0 clock  63.98KHz
        v: height  512 start  512 end  514 total  533           clock  60.02Hz
  640x480 (0x54) 54.000MHz +HSync +VSync DoubleScan
        h: width   640 start  688 end  744 total  900 skew    0 clock  60.00KHz
        v: height  480 start  480 end  482 total  500           clock  60.00Hz
  640x480 (0x55) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz
  512x384 (0x56) 32.500MHz -HSync -VSync DoubleScan
        h: width   512 start  524 end  592 total  672 skew    0 clock  48.36KHz
        v: height  384 start  385 end  388 total  403           clock  60.00Hz
  400x300 (0x57) 20.000MHz +HSync +VSync DoubleScan
        h: width   400 start  420 end  484 total  528 skew    0 clock  37.88KHz
        v: height  300 start  300 end  302 total  314           clock  60.32Hz
  400x300 (0x58) 18.000MHz +HSync +VSync DoubleScan
        h: width   400 start  412 end  448 total  512 skew    0 clock  35.16KHz
        v: height  300 start  300 end  301 total  312           clock  56.34Hz
  320x240 (0x59) 12.587MHz -HSync -VSync DoubleScan
        h: width   320 start  328 end  376 total  400 skew    0 clock  31.47KHz
        v: height  240 start  245 end  246 total  262           clock  60.05Hz
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
	Identifier: 0x43
	Timestamp:  40781
	Subpixel:   unknown
	Clones:    
	CRTCs:      0 1 2
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	PRIME Synchronization: 1 
		supported: 0, 1
	aspect ratio: Automatic 
		supported: Automatic, 4:3, 16:9
	Broadcast RGB: Automatic 
		supported: Automatic, Full, Limited 16:235
	audio: auto 
		supported: force-dvi, off, auto, on
DP-1-1 disconnected (normal left inverted right x axis y axis)
	Identifier: 0x44
	Timestamp:  40781
	Subpixel:   unknown
	Clones:    
	CRTCs:      0 1 2
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	PRIME Synchronization: 1 
		supported: 0, 1
	Broadcast RGB: Automatic 
		supported: Automatic, Full, Limited 16:235
	audio: auto 
		supported: force-dvi, off, auto, on

Please try with kernel option acpi_osi=“!Windows 2015”
If that doesn’t help, try acpi_osi=! acpi_osi=“Windows 2009”

Neither of these helped. I also tried acpi_osi=“!Windows 2009” and it didn’t help either.

Feared so. I’ve found an acpidump of your machine and had a look at it and it seems that it’s affected by this
[url]Invalid Bug ID
Unluckily, your machine doesn’t test for OS before invoking the critical method, so no workaround that I can see.
But my knowledge on this is limited so you’d better post there and attach your acpidump. Maybe Leykenstein can find a workaround.
Edit: there’s also the infamous “ACPI FADT declares the system doesn’t support PCIe ASPM, so disable it” message in your dmesg.