Tuesday, February 21, 2017

drivers - X won't start with Intel on-board graphics + nVIDIA card



I run Kubuntu 16.04 (just installed it from the ISO). My computer has on-chip Intel graphics, which is what I use for the display. I also have a GTX 650 Ti Boost card which I DO NOT WANT TO USE for display (just for CUDA work).




  • When nVIDIA driver 361.62 or 367.35 (the latest) is installed, Xorg loads to a black screen (but when I run binaries which use CUDA run fine).

  • When the nVIDIA driver is not installed, Xorg loads fine; it loads the nouveau modules (even though supposedly I don't need them) - but CUDA apps don't run.




The Xorg error with the nVIDIA driver installed is:



(EE) NOUVEAU(G0): [XvMC] Failed to initialize extension.
...
(EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)


If I uninstall the nVIDIA driver, X works properly again (will quote some log messages here soon).



How can I get both X working and CUDA installed (i.e. drivers installed and functioning)?




Due disclosure: I had asked about the same question regarding Debian Stretch on unix.SX, but deleted it since I just switched to Kubuntu.






Update:



So I uninstalled Nouveau completely to explore this further. When I generate an xorg.conf, I get (clipped input-device-related and files lines and sections):



Section "ServerLayout"

Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
EndSection

Section "Module"
Load "glx"
EndSection

section "Monitor"

Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection

Section "Monitor"
Identifier "Monitor1"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection


Section "Device"
Identifier "Card0"
Driver "fbdev"
BusID "PCI:0:2:0"
EndSection

Section "Device"
Identifier "Card1"
Driver "fbdev"

BusID "PCI:2:0:0"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 24

EndSubSection
EndSection

Section "Screen"
Identifier "Screen1"
Device "Card1"
Monitor "Monitor1"
SubSection "Display"
Viewport 0 0
Depth 24

EndSubSection
EndSection


(note that PCI 2:0:0 is the nVIDIA card and 0:2:0 is the on-chip graphics.)



Now,




  • If I use this configuration with the nVDIAI drivers - blank screen.


  • If I comment-out the sections regarding the nVIDIA card (card 1, monitor 1) and change the ServerLayout section - blank screen.

  • If I disable the loading of the GLX module(s), which produce errors in the log - blank screen (and it's not clear the module loading is the issue)

  • I even went into the /usr/lib/xorg/modules, removing nvidia's libglx.so and/or restoring the non-nvidia libglx.so - still, blank screen.



I do get differet error messages though. With the most extensive subset of the above, I have:



[  1952.022] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Aug 10 10:07:20 2016
[ 1952.022] (==) Using config file: "/etc/X11/xorg.conf"
[ 1952.022] (==) Using system config directory "/usr/share/X11/xorg.conf.d"

[ 1952.022] (==) ServerLayout "X.org Configured"
[ 1952.022] (**) |-->Screen "Screen0" (0)
[ 1952.022] (**) | |-->Monitor "Monitor0"
[ 1952.022] (**) | |-->Device "Card0"
[ 1952.022] (**) |-->Input Device "Mouse0"
[ 1952.022] (**) |-->Input Device "Keyboard0"
[ 1952.022] (==) Automatically adding devices
[ 1952.022] (==) Automatically enabling devices
[ 1952.022] (==) Automatically adding GPU devices
...

1952.024] (II) xfree86: Adding drm device (/dev/dri/card1)
[ 1952.024] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 1952.026] (--) PCI:*(0:0:2:0) 8086:0162:1565:110f rev 9, Mem @ 0xf7400000/4194304, 0xd0000000/268435456, I/O @ 0x0000f000/64
[ 1952.026] (--) PCI: (0:2:0:0) 10de:11c2:19da:1281 rev 161, Mem @ 0xf6000000/16777216, 0xe0000000/134217728, 0xe8000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288
[ 1952.026] (II) LoadModule: "glx"
[ 1952.026] (II) Loading /usr/lib/xorg/modules/extensions-nvidia-leave-me-alone/libglx.so
[ 1952.026] (II) Module glx: vendor="X.Org Foundation"
[ 1952.026] compiled for 1.18.3, module version = 1.0.0
[ 1952.026] ABI class: X.Org Server Extension, version 9.0
[ 1952.026] (==) AIGLX enabled

[ 1952.026] (II) LoadModule: "fbdev"
[ 1952.027] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 1952.027] (II) Module fbdev: vendor="X.Org Foundation"
[ 1952.027] compiled for 1.18.1, module version = 0.4.4
[ 1952.027] Module class: X.Org Video Driver
[ 1952.027] ABI class: X.Org Video Driver, version 20.0
[ 1952.027] (II) FBDEV: driver for framebuffer: fbdev
[ 1952.033] (II) Loading sub module "fbdevhw"
[ 1952.033] (II) LoadModule: "fbdevhw"
[ 1952.033] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so

[ 1952.033] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 1952.033] compiled for 1.18.3, module version = 0.0.2
[ 1952.033] ABI class: X.Org Video Driver, version 20.0
[ 1952.033] (**) FBDEV(0): claimed PCI slot 0@0:2:0
[ 1952.033] (II) FBDEV(0): using default device
[ 1952.033] (==) FBDEV(0): Depth 24, (==) framebuffer bpp 32
[ 1952.033] (==) FBDEV(0): RGB weight 888
[ 1952.033] (==) FBDEV(0): Default visual is TrueColor
[ 1952.033] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[ 1952.033] (II) FBDEV(0): hardware: inteldrmfb (video memory: 8100kB)

[ 1952.033] (II) FBDEV(0): checking modes against framebuffer device...
[ 1952.033] (II) FBDEV(0): checking modes against monitor...
[ 1952.033] (--) FBDEV(0): Virtual size is 1920x1080 (pitch 1920)
[ 1952.033] (**) FBDEV(0): Built-in mode "current"
[ 1952.033] (==) FBDEV(0): DPI set to (96, 96)
[ 1952.033] (II) Loading sub module "fb"
[ 1952.033] (II) LoadModule: "fb"
[ 1952.033] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 1952.034] (II) Module fb: vendor="X.Org Foundation"
[ 1952.034] compiled for 1.18.3, module version = 1.0.0

[ 1952.034] ABI class: X.Org ANSI C Emulation, version 0.4
[ 1952.034] (**) FBDEV(0): using shadow framebuffer
[ 1952.034] (II) Loading sub module "shadow"
[ 1952.034] (II) LoadModule: "shadow"
[ 1952.034] (II) Loading /usr/lib/xorg/modules/libshadow.so
[ 1952.034] (II) Module shadow: vendor="X.Org Foundation"
[ 1952.034] compiled for 1.18.3, module version = 1.1.0
[ 1952.034] ABI class: X.Org ANSI C Emulation, version 0.4
[ 1952.034] (==) Depth 24 pixmap format is 32 bpp
[ 1952.079] (==) FBDEV(0): Backing store enabled

[ 1952.080] (EE) FBDEV(0): FBIOPUTCMAP: Invalid argument
... repeated many times
[ 1952.082] (==) FBDEV(0): DPMS enabled
[ 1952.082] (==) RandR enabled
[ 1952.087] (II) SELinux: Disabled on system
[ 1952.087] (II) AIGLX: Screen 0 is not DRI2 capable
[ 1952.087] (EE) AIGLX: reverting to software rendering
[ 1952.101] (EE) AIGLX error: dlopen of /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so failed (/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: undefined symbol: _glapi_tls_Dispatch)
[ 1952.101] (EE) GLX: could not load software renderer
[ 1952.101] (II) GLX: no usable GL providers found for screen 0

...
[ 2201.199] (II) config/udev: removing GPU device /sys/devices/pci0000:00/0000:00:01.1/0000:02:00.0/drm/card1 /dev/dri/card1
[ 2201.199] xf86: remove device 0 /sys/devices/pci0000:00/0000:00:01.1/0000:02:00.0/drm/card1



  • I also tried forcing the use of the "intel" driver. This works when the nVIDIA drivers are not installed, but it's the same old blank screen when they are.



Interestingly enough, this problem is not solvable since it's not really the problem: In fact, X is not blank-screening; it is the X display manager Kubuntu defaults to - sddm.




If you replace sddm with, say, lxdm, you'll see the login screen (at least - using the intel driver and the edited xorg.conf; probably even without it), and you'll be able to login.



This is not the end of your troubles, though. If you start a KDE session, Plasma will crash unceremoniously. The session will still "work" in the sense that restored apps will come up and function properly, and Alt+F2 for launching will work too.



If, however, you install another desktop environment (e.g. LXDE) and start that - it should work.



Annoying.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...