X fails to initialize NVIDIA GPU after resume on Intel/940MX hybrid graphics laptop

On a rather new piece of hardware - Asus Zenbook UX310UQK - equipped with the following components, NVIDIA driver runs well in the first place:

00:02.0 VGA compatible controller: Intel Corporation Device 5916 (rev 02)
01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940MX] (rev a2)

Problem arises after a resume.

  • If suspended from the X session, computer comes back with black screen and unresponsive to any keys (including CTRL-ALT-Fx virtual console switch). Log in via SSH was possible and showed the X server process at 100% CPU usage.
  • If suspended from a text mode terminal, computer comes back okay and hangs only when trying to start X, same as before.

Relevant message from the X server appears to be

[   469.734] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA graphics device!

and from dmesg

[  467.144163] ACPI Warning: \_SB.PCI0.RP01.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)
[  467.145835] NVRM: RmInitAdapter failed! (0x26:0xffff:1097)
[  467.145871] NVRM: rm_init_adapter failed for device bearing minor number 0
[  467.771783] sddm[5408]: segfault at 0 ip 00007fe4abbc2ad3 sp 00007ffd4ca42450 error 4 in libQt5Core.so.5.6.1[7fe4ab90a000+4c6000]                                                                                                          
[  469.913718] vgaarb: this pci device is not a vga device

This is with a 4.8.0-40-generic Ubuntu kernel and NVIDIA binary driver - version 378.13 from the graphics-drivers PPA. Before, I tried NVIDIA driver version 375.39 also from the PPA, and 367.57 from the Ubuntu repository. They all behaved the same.
nvidia-bug-report.log.gz (76 KB)

Same issue on Arch Linux. Also happens when using Bumblebee (optimus)…
Driver used: nvidia 381.22-4
Kernel: 4.11.9-1-ARCH

I use GPU for CUDA computations. Asus Zenbook UX410UQK, Intel integrated GPU + GeForce 940MX. Fedora 26, exactly the same problem. Any solutions?

Tried kernel parameters?
acpi_osi=! acpi_osi=“Windows 2009”

Thank you for the tip, but unfortunately it did not help. :-(

Nvidia guys: any suggestions?

Hi All, Please test with 384.90 driver and attach nvidia bug report as soon as issue hit. Make sure you all are getting same error.

As adivsed, I retried with the 384.90 NVIDIA driver; Ubuntu meanwhile has advanced to kernel 4.10.0-35-generic.
The observed result is the same as described in my original post: When suspended from the X session, computer comes back with black screen and unresponsive to any keys (including CTRL-ALT-Fx virtual console switch). Log in via SSH was possible and showed the X server process at 100% CPU usage. I took the NVIDIA bug report from that state.

Relevant message from the X server is still

[  1188.931] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA GPU at PCI:1:0:0.  Please
[  1188.931] (EE) NVIDIA(GPU-0):     check your system's kernel log for additional error
[  1188.931] (EE) NVIDIA(GPU-0):     messages and refer to Chapter 8: Common Problems in the
[  1188.931] (EE) NVIDIA(GPU-0):     README for additional information.
[  1188.931] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA graphics device!

While in the dmesg output, I cannot identify any corresponding error message.

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

Version 384.90 of the driver was installed on my computer few days ago with last updates from Fedora.
It still does not work after resume as earlier versions. My computer is Asus Zenbook UX410UQK with dual GPU: integrated Intel + GeForce940MX. I do not use Nvidia GPU to display anything, but only for my programs which use CUDA and make computations on GPU. So, after resume my laptop is still usable (Intel graphics card is used), but I can not run my programs or any programs that use Nvidia GPU.

In /etc/X11/xorg.conf.d/10-nvidia.conf I have such configuration:

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "intel"
    Inactive "nvidia"
EndSection
 
Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
EndSection
 
Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration"
EndSection
 
Section "Device"
    Identifier "intel"
    Driver "modesetting"
EndSection
 
Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Before suspend, running:
sudo nvidia-xconfig --query-gpu-info

produces such output:

Number of GPUs: 1

GPU #0:
  Name      : GeForce 940MX
  UUID      : GPU-0b2022ec-7043-212f-c0bc-6ce21bfe1e48
  PCI BusID : PCI:1:0:0

  Number of Display Devices: 0

After suspend, running again:
sudo nvidia-xconfig --query-gpu-info

produces such output:

WARNING: Unable to use the nvidia-cfg library to query NVIDIA hardware.


ERROR: Unable to query GPU information

and dmesg shows:

[ 1191.400623] ACPI Warning: \_SB.PCI0.RP01.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
[ 1191.400802] ACPI Warning: \_SB.PCI0.RP01.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
[ 1191.400912] ACPI Warning: \_SB.PCI0.RP01.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
[ 1191.401012] ACPI Warning: \_SB.PCI0.RP01.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
[ 1191.401140] ACPI Warning: \_SB.PCI0.RP01.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
[ 1191.401294] ACPI Warning: \_SB.PCI0.RP01.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
[ 1191.401393] ACPI Warning: \_SB.PCI0.RP01.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
[ 1191.420993] ACPI Warning: \_SB.PCI0.RP01.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
[ 1191.509839] ACPI Warning: \_SB.PCI0.RP01.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
[ 1191.511735] NVRM: RmInitAdapter failed! (0x26:0xffff:1113)
[ 1191.511843] NVRM: rm_init_adapter failed for device bearing minor number 0

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

Nvidia guys: can you help us? It’s been more than a month and no solution suggested.

I have the same problem on Acer E5-575G. I have Intel GPU and Nvidia 940MX. Please help us!

I have the same problem with drier 410 on Lenovo P52 laptop with P1000 GPU on Ubuntu 18.04 kernel 4.19 (upgraded kernel from the one that comes with 18.04).
I find that when I set the display to “hybird” in the BIOS that I am able to entre suspended state by closing the laptop lid. Then opening it again, I have checkered pattern noise on the screen and the system is unresponsive. Briefly before the screen crashes I see a flash of the normal desktop screen. At this point I am unable to enter init 3 mode to use the terminal.

If I instead turn the gpu to “discrete” in the BIOS I am unable to enter suspended state by closing the lid.