2

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.
  • You should not cross post, the questions are exactly the same with just the OS swapped, please ask on one stack exchange site or the other. – Mark Kirby Aug 9 '16 at 9:18
  • @MarkKirby: Since I just switched to Kubuntu with the hope of not experiencing this issue, I'll keep the question here. The downside is that I don't really have enough reputation to offer a bounty. – einpoklum Aug 9 '16 at 9:28
0

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.

0

I just installed CUDA on Ubuntu 16.04 successfully, and using only intel skylake gpu for display. The official installation document is better now, really helpful. You chould take a look at advanced setup and Faq. That fix my problem. I choosed Runfile installation.(section 4.2) Followings are my tips:

  1. Remove noveou driver first; check with lsmod |grep noveou
  2. stop X, run cuda-xx.run --no-opengl-libs
  3. copy the "device node verification" script and make it a startup script (I copy it into /etc/rc*.d/ ,care of the naming rule)
  4. source the previous script, check with ls /dev/nvidia*. If all things are fine, cuda should work.
  5. now edit xorg.conf, removing the nVIDIA video card.

if you see [drm] failed to open drm device for null, check and fix with step 4.

Since I use intel skylake, I install drm, guc firmware from 01.org. (check with lsmod | grep intel) or lspci -k | grep -A 2 VGA In xorg.conf,

Section "Device"
        Identifier  "Card0"
        Driver      "intel"
        BusID       "PCI:0:2:0"
EndSection
  • What's the "device node verification" script? Also, what do you mean by "guc"? – einpoklum Oct 18 '16 at 18:07
  • Also, I can't check your solution since my configuration has changed since I asked the question... at least it should help others experiencing the same issue. – einpoklum Oct 18 '16 at 18:09
  • device node verification see nvidia installation guide. The skylake part might not affects in your case. – 程柏硯 Oct 19 '16 at 1:54
  • if you goes to step 4, and run cuda-examples well. The remaing part is X. I simply removed nvidia gpu device from x server conf(xorg.conf), leaving only iGpu configuration ( Driver "intel" , BusID "PCI:0:2:0") inside. And it works ok now. – 程柏硯 Oct 19 '16 at 1:59
  • The most key part might be (1) install driver without opengl-lib, since we don't need it for display. (2) Run device node verification script at startup as root. (3) have a clean x server configuration without nvidia gpu inside. – 程柏硯 Oct 19 '16 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.