I have an ongoing problem where if I switch to the Nvidia GPU after a suspend/resume with the Intel GPU, I get constant dmesg spam like this:
[63280.031049] nvidia-nvlink: Nvlink Core is being initialized, major device number 240 [63280.031360] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none [63280.031378] NVRM: The NVIDIA GPU 0000:01:00.0 NVRM: (PCI ID: 10de:1c8d) installed in this system has NVRM: fallen off the bus and is not responding to commands. [63280.031419] nvidia: probe of 0000:01:00.0 failed with error -1 [63280.031430] NVRM: The NVIDIA probe routine failed for 1 device(s). [63280.031430] NVRM: None of the NVIDIA graphics adapters were initialized! [63280.031492] nvidia-nvlink: Unregistered the Nvlink Core, major device number 240
After a reboot, usually everything would work fine, but not any more: if I reboot with the Nvidia GPU selected, LightDM exits immediately; eventually systemd gives up starting it and I’m stuck at a black screen with a blinking cursor (though SysRq+R then Alt+F1 gets a TTY I can log in at).
Switching to the Intel GPU (
prime-select intel) in another TTY and then restarting LightDM (
systemctl start lightdm) works absolutely fine, so I have some ability to debug the system, but no way to use the Nvidia GPU.
Immediately before this started happening (using the Intel GPU), I installed the packages
beignet-opencl-icd, and then purged
beignet-opencl-icd. I then
prime-selected the Nvidia GPU and rebooted, and then ran into this problem.
When the system boots in Nvidia mode, the Nvidia drivers appear to be loaded – they appear in
dmesg reports that the kernel is tainted. LightDM appears to exit after X dies with SIGABRT, per
[+0.00s] DEBUG: Launching process 1435: /usr/bin/X -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch [+0.00s] DEBUG: XServer 0: Waiting for ready signal from X server :0 [+0.00s] DEBUG: Acquired bus name org.freedesktop.DisplayManager [+0.00s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0 [+0.00s] DEBUG: Loading users from org.freedesktop.Accounts [+0.00s] DEBUG: User /org/freedesktop/Accounts/User1000 added [+0.18s] DEBUG: Process 1435 terminated with signal 6
X seems to start but then immediately exit a few times (
(==) Using system config directory "/usr/share/X11/xorg.conf.d" xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted) (II) Server terminated successfully (0). Closing log file.
but then starts properly crashing:
(==) Using system config directory "/usr/share/X11/xorg.conf.d" xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted) xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted) (EE) Fatal server error: (EE) no screens found(EE) (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. (EE) (EE) Server terminated with error (1). Closing log file.
I’m running Ubuntu 18.04; my machine’s CPU is an Intel i7-8750H, and the discrete GPU is an Nvidia GTX 1050 (which is not supported by nouveau, so please don’t suggest using open-source drivers). Kernel version is 4.15.0-43-generic, and the installed Nvidia drivers are at version 390.77.
I’m happy to provide additional debugging information as necessary.