Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bumblebee not working in Ubuntu 16.04 #759

Closed
sapjunior opened this issue Apr 22, 2016 · 53 comments
Closed

Bumblebee not working in Ubuntu 16.04 #759

sapjunior opened this issue Apr 22, 2016 · 53 comments
Assignees
Milestone

Comments

@sapjunior
Copy link

sapjunior commented Apr 22, 2016

Enviroment : Ubuntu 16.04 // Nvidia 364.15
optirun Error : Xlib: extension "GLX" missing on display ":8".
Interesting Xorg.8.log entry :

[   157.352] (II) LoadModule: "glx"
[   157.352] (II) Loading /usr/lib/nvidia-364/xorg/libglx.so
[   157.352] (EE) Failed to load /usr/lib/nvidia-364/xorg/libglx.so: libnvidia-tls.so.364.15: cannot open shared object file: No such file or directory

Full Xorg Log

[   157.349] 
X.Org X Server 1.18.3
Release Date: 2016-04-04
[   157.349] X Protocol Version 11, Revision 0
[   157.349] Build Operating System: Linux 3.13.0-85-generic x86_64 Ubuntu
[   157.349] Current Operating System: Linux Ton-Notebook 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64
[   157.349] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-21-generic.efi.signed root=UUID=cbaa5128-70d8-492a-ba6d-cdc8fdd96870 ro quiet splash vt.handoff=7
[   157.349] Build Date: 07 April 2016  09:18:50AM
[   157.349] xorg-server 2:1.18.3-1ubuntu2 (For technical support please see http://www.ubuntu.com/support) 
[   157.349] Current version of pixman: 0.33.6
[   157.349]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   157.349] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   157.349] (==) Log file: "/var/log/Xorg.8.log", Time: Fri Apr 22 12:00:51 2016
[   157.349] (++) Using config file: "/etc/bumblebee/xorg.conf.nvidia"
[   157.349] (++) Using config directory: "/etc/bumblebee/xorg.conf.d"
[   157.349] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   157.349] (==) ServerLayout "Layout0"
[   157.349] (==) No screen section available. Using defaults.
[   157.349] (**) |-->Screen "Default Screen Section" (0)
[   157.349] (**) |   |-->Monitor "<default monitor>"
[   157.349] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[   157.349] (**) |   |-->Device "DiscreteNvidia"
[   157.349] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[   157.349] (**) Option "AutoAddDevices" "false"
[   157.349] (**) Option "AutoAddGPU" "false"
[   157.349] (**) Not automatically adding devices
[   157.349] (==) Automatically enabling devices
[   157.349] (**) Not automatically adding GPU devices
[   157.349] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   157.349] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[   157.349]    Entry deleted from font path.
[   157.349] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[   157.349]    Entry deleted from font path.
[   157.349] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[   157.349]    Entry deleted from font path.
[   157.349] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[   157.349]    Entry deleted from font path.
[   157.349] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[   157.349]    Entry deleted from font path.
[   157.349] (==) FontPath set to:
    /usr/share/fonts/X11/misc,
    /usr/share/fonts/X11/Type1,
    built-ins
[   157.349] (++) ModulePath set to "/usr/lib/nvidia-364/xorg,/usr/lib/xorg/modules"
[   157.349] (==) |-->Input Device "<default pointer>"
[   157.349] (==) |-->Input Device "<default keyboard>"
[   157.349] (==) The core pointer device wasn't specified explicitly in the layout.
    Using the default mouse configuration.
[   157.349] (==) The core keyboard device wasn't specified explicitly in the layout.
    Using the default keyboard configuration.
[   157.349] (II) Loader magic: 0x55919a0c4da0
[   157.349] (II) Module ABI versions:
[   157.349]    X.Org ANSI C Emulation: 0.4
[   157.349]    X.Org Video Driver: 20.0
[   157.349]    X.Org XInput driver : 22.1
[   157.349]    X.Org Server Extension : 9.0
[   157.350] (--) using VT number 2

[   157.350] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[   157.350] (II) xfree86: Adding drm device (/dev/dri/card0)
[   157.351] (--) PCI: (0:3:0:0) 10de:1341:1043:12df rev 162, Mem @ 0xf6000000/16777216, 0xe0000000/268435456, 0xf0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288
[   157.352] (WW) "glamoregl" will not be loaded unless you've specified it to be loaded elsewhere.
[   157.352] (II) "glx" will be loaded by default.
[   157.352] (II) LoadModule: "glx"
[   157.352] (II) Loading /usr/lib/nvidia-364/xorg/libglx.so
[   157.352] (EE) Failed to load /usr/lib/nvidia-364/xorg/libglx.so: libnvidia-tls.so.364.15: cannot open shared object file: No such file or directory
[   157.352] (II) UnloadModule: "glx"
[   157.352] (II) Unloading glx
[   157.352] (EE) Failed to load module "glx" (loader failed, 7)
[   157.352] (II) LoadModule: "nvidia"
[   157.352] (II) Loading /usr/lib/nvidia-364/xorg/nvidia_drv.so
[   157.352] (II) Module nvidia: vendor="NVIDIA Corporation"
[   157.352]    compiled for 4.0.2, module version = 1.0.0
[   157.352]    Module class: X.Org Video Driver
[   157.352] (II) LoadModule: "mouse"
[   157.352] (WW) Warning, couldn't open module mouse
[   157.352] (II) UnloadModule: "mouse"
[   157.352] (II) Unloading mouse
[   157.352] (EE) Failed to load module "mouse" (module does not exist, 0)
[   157.352] (II) LoadModule: "kbd"
[   157.352] (WW) Warning, couldn't open module kbd
[   157.352] (II) UnloadModule: "kbd"
[   157.352] (II) Unloading kbd
[   157.352] (EE) Failed to load module "kbd" (module does not exist, 0)
[   157.352] (II) NVIDIA dlloader X Driver  364.15  Sat Apr  2 20:26:47 PDT 2016
[   157.352] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   157.352] (II) Loading sub module "fb"
[   157.352] (II) LoadModule: "fb"
[   157.352] (II) Loading /usr/lib/xorg/modules/libfb.so
[   157.352] (II) Module fb: vendor="X.Org Foundation"
[   157.352]    compiled for 1.18.3, module version = 1.0.0
[   157.352]    ABI class: X.Org ANSI C Emulation, version 0.4
[   157.352] (II) Loading sub module "wfb"
[   157.352] (II) LoadModule: "wfb"
[   157.353] (II) Loading /usr/lib/xorg/modules/libwfb.so
[   157.353] (II) Module wfb: vendor="X.Org Foundation"
[   157.353]    compiled for 1.18.3, module version = 1.0.0
[   157.353]    ABI class: X.Org ANSI C Emulation, version 0.4
[   157.353] (II) Loading sub module "ramdac"
[   157.353] (II) LoadModule: "ramdac"
[   157.353] (II) Module "ramdac" already built-in
[   157.353] (II) NVIDIA(0): Creating default Display subsection in Screen section
    "Default Screen Section" for depth/fbbpp 24/32
[   157.353] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[   157.353] (==) NVIDIA(0): RGB weight 888
[   157.353] (==) NVIDIA(0): Default visual is TrueColor
[   157.353] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[   157.353] (**) NVIDIA(0): Option "NoLogo" "true"
[   157.353] (**) NVIDIA(0): Option "ProbeAllGpus" "false"
[   157.353] (**) NVIDIA(0): Option "UseEDID" "false"
[   157.353] (**) NVIDIA(0): Option "UseDisplayDevice" "none"
[   157.353] (**) NVIDIA(0): Enabling 2D acceleration
[   157.353] (**) NVIDIA(0): Ignoring EDIDs
[   157.353] (**) NVIDIA(0): Option "UseDisplayDevice" set to "none"; enabling NoScanout
[   157.353] (**) NVIDIA(0):     mode
[   157.353] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
[   157.353] (EE) NVIDIA(0):     log file that the GLX module has been loaded in your X
[   157.353] (EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If
[   157.353] (EE) NVIDIA(0):     you continue to encounter problems, Please try
[   157.353] (EE) NVIDIA(0):     reinstalling the NVIDIA driver.
[   157.506] (II) NVIDIA(0): NVIDIA GPU GeForce 840M (GM108-A) at PCI:3:0:0 (GPU-0)
[   157.506] (--) NVIDIA(0): Memory: 2097152 kBytes
[   157.506] (--) NVIDIA(0): VideoBIOS: 82.08.14.00.6d
[   157.506] (II) NVIDIA(0): Detected PCI Express Link width: 4X
[   157.506] (II) NVIDIA(0): Validated MetaModes:
[   157.506] (II) NVIDIA(0):     "NULL"
[   157.506] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[   157.506] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[   157.506] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[   157.506] (--) Depth 24 pixmap format is 32 bpp
[   157.507] (II) NVIDIA: Using 3072.00 MB of virtual memory for indirect memory
[   157.507] (II) NVIDIA:     access.
[   157.531] (II) NVIDIA(0): Setting mode "NULL"
[   157.536] (==) NVIDIA(0): Disabling shared memory pixmaps
[   157.537] (==) NVIDIA(0): Backing store enabled
[   157.537] (==) NVIDIA(0): Silken mouse enabled
[   157.537] (==) NVIDIA(0): DPMS enabled
[   157.537] (II) Loading sub module "dri2"
[   157.537] (II) LoadModule: "dri2"
[   157.537] (II) Module "dri2" already built-in
[   157.537] (II) NVIDIA(0): [DRI2] Setup complete
[   157.537] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[   157.537] (--) RandR disabled
[   157.540] (II) SELinux: Disabled on system
[   157.556] (II) LoadModule: "mouse"
[   157.556] (WW) Warning, couldn't open module mouse
[   157.556] (II) UnloadModule: "mouse"
[   157.556] (II) Unloading mouse
[   157.556] (EE) Failed to load module "mouse" (module does not exist, 0)
[   157.556] (EE) No input driver matching `mouse'
[   157.556] (II) LoadModule: "kbd"
[   157.556] (WW) Warning, couldn't open module kbd
[   157.556] (II) UnloadModule: "kbd"
[   157.556] (II) Unloading kbd
[   157.556] (EE) Failed to load module "kbd" (module does not exist, 0)
[   157.556] (EE) No input driver matching `kbd'
[   157.561] (II) config/udev: Adding input device Power Button (/dev/input/event2)
[   157.561] (II) AutoAddDevices is off - not adding device.
[   157.561] (II) config/udev: Adding input device Video Bus (/dev/input/event4)
[   157.561] (II) AutoAddDevices is off - not adding device.
[   157.561] (II) config/udev: Adding input device Video Bus (/dev/input/event5)
[   157.561] (II) AutoAddDevices is off - not adding device.
[   157.561] (II) config/udev: Adding input device Lid Switch (/dev/input/event0)
[   157.561] (II) AutoAddDevices is off - not adding device.
[   157.562] (II) config/udev: Adding input device Sleep Button (/dev/input/event1)
[   157.562] (II) AutoAddDevices is off - not adding device.
[   157.562] (II) config/udev: Adding input device HDA Intel HDMI HDMI/DP,pcm=3 (/dev/input/event11)
[   157.562] (II) AutoAddDevices is off - not adding device.
[   157.562] (II) config/udev: Adding input device HDA Intel HDMI HDMI/DP,pcm=7 (/dev/input/event12)
[   157.562] (II) AutoAddDevices is off - not adding device.
[   157.562] (II) config/udev: Adding input device HDA Intel HDMI HDMI/DP,pcm=8 (/dev/input/event13)
[   157.562] (II) AutoAddDevices is off - not adding device.
[   157.562] (II) config/udev: Adding input device USB2.0 UVC HD Webcam (/dev/input/event10)
[   157.562] (II) AutoAddDevices is off - not adding device.
[   157.563] (II) config/udev: Adding input device HDA Intel PCH Mic (/dev/input/event7)
[   157.563] (II) AutoAddDevices is off - not adding device.
[   157.563] (II) config/udev: Adding input device HDA Intel PCH Headphone (/dev/input/event8)
[   157.563] (II) AutoAddDevices is off - not adding device.
[   157.563] (II) config/udev: Adding input device Asus WMI hotkeys (/dev/input/event9)
[   157.563] (II) AutoAddDevices is off - not adding device.
[   157.563] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event3)
[   157.563] (II) AutoAddDevices is off - not adding device.
[   157.563] (II) config/udev: Adding input device FocalTechPS/2 FocalTech FocalTech Touchpad (/dev/input/event6)
[   157.563] (II) AutoAddDevices is off - not adding device.
[   157.563] (II) config/udev: Adding input device FocalTechPS/2 FocalTech FocalTech Touchpad (/dev/input/mouse0)
[   157.563] (II) AutoAddDevices is off - not adding device.
[   157.735] (II) NVIDIA(GPU-0): Deleting GPU-0
[   157.735] (II) Server terminated successfully (0). Closing log file.
@sapjunior
Copy link
Author

sapjunior commented Apr 22, 2016

optirun -vv glxgears

[  656.931219] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[  656.931463] [INFO]Configured driver: nvidia
[  656.931579] [DEBUG]optirun version 3.2.1 starting...
[  656.931588] [DEBUG]Active configuration:
[  656.931596] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[  656.931602] [DEBUG] X display: :8
[  656.931613] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-364:/usr/lib32/nvidia-364
[  656.931621] [DEBUG] Socket path: /var/run/bumblebee.socket
[  656.931628] [DEBUG] Accel/display bridge: auto
[  656.931638] [DEBUG] VGL Compression: proxy
[  656.931642] [DEBUG] VGLrun extra options: 
[  656.931650] [DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
[  656.931701] [DEBUG]Using auto-detected bridge primus
[  657.591953] [INFO]Response: Yes. X is active.

[  657.591969] [INFO]Running application using primus.
[  657.592098] [DEBUG]Process glxgears started, PID 6174.
Xlib:  extension "GLX" missing on display ":8".
[  657.737156] [DEBUG]SIGCHILD received, but wait failed with No child processes
[  657.737177] [DEBUG]Socket closed.
[  657.737189] [DEBUG]Killing all remaining processes.

@nephilim1973
Copy link

nephilim1973 commented Apr 24, 2016

Same here (Ubuntu 16.04 amd64)

# lspci -vnn | grep '\''[030[02]\]'

00:02.0 VGA compatible controller [0300]: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller [8086:0416] (rev 06) (prog-if 00 [VGA controller])
01:00.0 3D controller [0302]: NVIDIA Corporation GM107M [GeForce GTX 860M] [10de:1392] (rev a2)

With none of the available drivers from "ppa:graphics-drivers/ppa" bumblebee is working.
"ppa:ubuntu-x-swat/x-updates" does not support 16.04.
Your Troubleshooting WIKI is outdated !

Probably should try "ppa:xorg-edgers/ppa" ???

PS: Ubuntu 14.04 and nvidia-352 runs perfectly.
PS2: Why you have deleted "bumblebee-ui" on GitHub ???

@Lekensteyn
Copy link
Member

This line should serve as starting point:

[   157.352] (EE) Failed to load /usr/lib/nvidia-364/xorg/libglx.so: libnvidia-tls.so.364.15: cannot open shared object file: No such file or directory

Apparently the ibnvidia-tls.so.364.15 library is not in the standard library path. Ubuntu must have moved it somewhere else so the library path in bumblebee.conf has to be adjusted.

About bumblebee-ui, it was removed on 5 March, perhaps @ArchangeGabriel knows more about it?

@melroy89
Copy link
Member

@Lekensteyn
Don't we need more write members for this Bumblebee repository?

@ArchangeGabriel
Copy link
Member

About bumblebee-ui: everyone implied in it, including @glyptostroboides, was agreeing on the useless state of the code (it wasn’t functionning anymore on any current distro, and it was even a reusable code base), while people where still opening issue about it not working. So, after a one week span for discussion where everyone involved in that repo as agreed, it has been removed.

For the state of this project, see #710. I’ll be back soon to handle all pending issues and fixes.

@sapjunior
Copy link
Author

sapjunior commented Apr 26, 2016

After many hours of trial, I finally get a solution for "optirun Error : Xlib: extension "GLX" missing on display ":8"."
For NVIDIA-364 driver

  1. add these lines in /etc/modprobe.d/bumblebee.conf [ These will make bbswitch work properly with nvidia-364 ]

alias nvidia-drm nvidia_364_drm
alias nvidia-uvm nvidia_364_uvm
alias nvidia-modeset nvidia_364_modeset
remove nvidia rmmod nvidia-drm nvidia-modeset nvidia-uvm nvidia

  1. correct x86_64-linux-gnu_gl_conf and and i386-linux-gnu_gl_conf path - run these command

sudo update-alternatives --config x86_64-linux-gnu_gl_conf [Choose the one with /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf]
sudo update-alternatives --config x86_64-linux-gnu_egl_conf [Choose the one with /usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf]
sudo update-alternatives --config i386-linux-gnu_gl_conf [ Same as above ]
sudo update-alternatives --config i386-linux-gnu_egl_conf

  1. add these line
    add /usr/lib/nvidia-364 to => /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
    add /usr/lib32/nvidia-364 to => /usr/lib/i386-linux-gnu/mesa/ld.so.conf
  2. sudo ldconfig

try to run glxinfo & optirun glxinfo to check that all the configurations are correct

@Queuecumber
Copy link

Queuecumber commented Apr 26, 2016

Yeah that fixed it for me, I was playing with aliases all afternoon but the real trick was in the path configs, great catch on that.

So any guesses on who broke it: ubuntu or nvidia?

Edit:

In order to make sure running CUDA applications works, I did have to add:

install nvidia_364 modprobe nvidia_364_uvm; modprobe -i nvidia_364

to /etc/modprobe.d/bumblebee.conf along with the other recommended additions in step 1 of @sapjunior s post

@sapjunior
Copy link
Author

In order to make CUDA application run without adding those lines (it will load necessary module automatically), you need to install nvidia-modprobe package by command

sudo apt-get install nvidia-modprobe

@Queuecumber
Copy link

Queuecumber commented Apr 28, 2016

Didn't seem to work.

When I commented out my addition, sudo apt install nvidia-modprobe, reboot:

% optirun /usr/local/cuda/samples/0_Simple/matrixMulCUBLAS/matrixMulCUBLAS
[Matrix Multiply CUBLAS] - Starting...
cudaGetDevice returned error code 30, line(166)

Starting glxgears:

% optirun glxgears &   
[1] 3222
% lsmod | grep nvidia
nvidia              10203136  51

nvidia_uvm is not loaded which is needed for CUDA.

@molecularentropy
Copy link

Check out my tutorial for getting bumblebee working on 16.04 LTS: http://lenovolinux.blogspot.com.au/

I finished it a few hours ago. It is well tested on a Lenovo laptop, but may work for you as well.

@ArchangeGabriel
Copy link
Member

So, this is a packaging issue specific to Ubuntu 16.04? A bit like #749 so… Definitively don’t like that distro. Anyway, this should probably be reported in Launchpad.

@ArchangeGabriel
Copy link
Member

Maybe a bug should be filed at https://bugs.launchpad.net/ubuntu/+source/bumblebee.

@bluca
Copy link
Member

bluca commented May 15, 2016

The only thing we can do (I'm about to) is to fix the modprobe blacklist to add the new drivers. The update-alternative, the modprobe aliases and the paths have to be configured manually on Ubuntu, because of how the drivers are packaged there.
In Debian we provide an update-alternative setup specifically for bumblebee, and the right modprobe aliases/rules, but those would have to be requested to the Ubuntu maintainers since the packaging is different, by filing bugs at https://bugs.launchpad.net/ubuntu/+source/nvidia-driver

@bluca
Copy link
Member

bluca commented May 20, 2016

I've published on the test repository a version that should fix all problems with the modules, if someone is available to help testing it would be great!

https://launchpad.net/~bumblebee/+archive/ubuntu/testing

Please make sure that /lib/nvidia-/modprobe.conf is symlinked in /etc/modprobe.d/, otherwise link it and run sudo depmod (and then open a bug in launchpad against nvidia-driver).

@bluca
Copy link
Member

bluca commented May 24, 2016

@sapjunior @Queuecumber - could you please give the testing PPA a shot and see if it solves your issues?

@Queuecumber
Copy link

I'll give it a shot today after reverting whatever I did that fixed it before

@grzjab
Copy link

grzjab commented May 31, 2016

@bluca Hi, I have used the testing PPA and got the following error:
`[ 32.928971] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 32.929132] [INFO]Configured driver: nvidia
[ 32.929280] [DEBUG]optirun version 3.2.1 starting...
[ 32.929288] [DEBUG]Active configuration:
[ 32.929289] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 32.929291] [DEBUG] X display: :8
[ 32.929293] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-361:/usr/lib32/nvidia-361
[ 32.929295] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 32.929296] [DEBUG] Accel/display bridge: auto
[ 32.929298] [DEBUG] VGL Compression: proxy
[ 32.929300] [DEBUG] VGLrun extra options:
[ 32.929301] [DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
[ 32.929533] [DEBUG]Using auto-detected bridge primus
[ 33.789044] [INFO]Response: Yes. X is active.

[ 33.789057] [INFO]Running application using primus.
[ 33.789141] [DEBUG]Process ./a.out started, PID 2666.
modprobe: FATAL: Module nvidia-uvm not found in directory /lib/modules/4.4.0-22-generic
[ 33.814380] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 33.814391] [DEBUG]Socket closed.
[ 33.814401] [DEBUG]Killing all remaining processes.
`

@bluca
Copy link
Member

bluca commented May 31, 2016

@grzjab - what is your KernelDriver settings in /etc/bumblebee.conf ? Also what's the output of sudo dkms status ? What is the content of /lib/modules/4.4.0-22-generic/updates/dkms ?

@grzjab
Copy link

grzjab commented May 31, 2016

grzegorz@gj-thinkpad:~$ cat /etc/bumblebee/bumblebee.conf
# Configuration file for Bumblebee. Values should **not** be put between quotes

## Server options. Any change made in this section will need a server restart
# to take effect.
[bumblebeed]
# The secondary Xorg server DISPLAY number
VirtualDisplay=:8
# Should the unused Xorg server be kept running? Set this to true if waiting
# for X to be ready is too long and don't need power management at all.
KeepUnusedXServer=false
# The name of the Bumbleblee server group name (GID name)
ServerGroup=bumblebee
# Card power state at exit. Set to false if the card shoud be ON when Bumblebee
# server exits.
TurnCardOffAtExit=false
# The default behavior of '-f' option on optirun. If set to "true", '-f' will
# be ignored.
NoEcoModeOverride=false
# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=nvidia
# Directory with a dummy config file to pass as a -configdir to secondary X
XorgConfDir=/etc/bumblebee/xorg.conf.d
# Xorg binary to run
XorgBinary=/usr/lib/xorg/Xorg

## Client options. Will take effect on the next optirun executed.
[optirun]
# Acceleration/ rendering bridge, possible values are auto, virtualgl and
# primus.
Bridge=auto
# The method used for VirtualGL to transport frames between X servers.
# Possible values are proxy, jpeg, rgb, xv and yuv.
VGLTransport=proxy
# List of paths which are searched for the primus libGL.so.1 when using
# the primus bridge
PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
# Should the program run under optirun even if Bumblebee server or nvidia card
# is not available?
AllowFallbackToIGC=false


# Driver-specific settings are grouped under [driver-NAME]. The sections are
# parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
# detection resolves to NAME).
# PMMethod: method to use for saving power by disabling the nvidia card, valid
# values are: auto - automatically detect which PM method to use
#         bbswitch - new in BB 3, recommended if available
#       switcheroo - vga_switcheroo method, use at your own risk
#             none - disable PM completely
# https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods

## Section with nvidia driver specific options, only parsed if Driver=nvidia
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia_361
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-361:/usr/lib32/nvidia-361
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-361/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

## Section with nouveau driver specific options, only parsed if Driver=nouveau
[driver-nouveau]
KernelDriver=nouveau
PMMethod=auto
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau

grzegorz@gj-thinkpad:~$ sudo dkms status
bbswitch, 0.8, 4.4.0-22-generic, x86_64: installed
nvidia-361, 361.42, 4.4.0-22-generic, x86_64: installed
tp-smapi, 0.41, 4.2.0-16-generic, x86_64: installed
tp-smapi, 0.41, 4.2.0-36-generic, x86_64: installed
tp-smapi, 0.41, 4.4.0-22-generic, x86_64: installed
vboxhost, 5.0.14, 4.2.0-16-generic, x86_64: installed
vboxhost, 5.0.14, 4.2.0-36-generic, x86_64: installed
vboxhost, 5.0.14, 4.4.0-22-generic, x86_64: installed
grzegorz@gj-thinkpad:~$ ls /lib/modules/4.4.0-22-generic/updates/dkms/
bbswitch.ko    nvidia_361_modeset.ko  tp_smapi.ko    vboxnetflt.ko
hdaps.ko       nvidia_361_uvm.ko      vboxdrv.ko     vboxpci.ko
nvidia_361.ko  thinkpad_ec.ko         vboxnetadp.ko

@bluca
Copy link
Member

bluca commented May 31, 2016

Try:

KernelDriver=nvidia-361

@krlmlr
Copy link

krlmlr commented Jun 6, 2016

My 2¢: I'm using Ubuntu 16.04, bumblebee and intel-virtual-output for feeding DVI outputs on a Lenovo T430. My configuration stopped working after upgrading to Ubuntu 16.04, here's what I did differently to the tutorial by @molecularentropy:

  • Install latest nvidia-367 from ppa:graphics-drivers/ppa

    • With nvidia-364, intel-virtual-output crashed inadvertedly
    • With nvidia-361, display mode detection didn't seem to work
  • Install latest bumblebee (3.2.1-96~xenialppa1) from ppa:bumblebee/testing

    • Stable bumblebee locks the nvidia_drm module, this kills power management
  • In /etc/bumblebee/bumblebee.conf:

    [driver-nvidia]
    # Module name to load, defaults to Driver if empty or unset
    KernelDriver=nvidia_367_drm
    PMMethod=bbswitch
    # colon-separated path to the nvidia libraries
    LibraryPath=/usr/lib/nvidia-367:/usr/lib32/nvidia-367
    # comma-separated path of the directory containing nvidia_drv.so and the
    # default Xorg modules path
    XorgModulePath=/usr/lib/nvidia-367/xorg,/usr/lib/xorg/modules
    XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
    

    This makes sure that nvidia_drm is loaded, which in turn enabled mode detection.

  • In /etc/bumblebee/xorg.conf.nvidia, add:

    • Option "AutoAddDevices" "true" to Section "ServerLayout"
    • Option "AllowEmptyInitialConfiguration" to Section "Device"

    Otherwise, optirun fails to start.

Blacklisting nvidia-drm and nvidia-modeset does not seem to be necessary in this configuration: After clean boot, lsmod | grep nvidia shows zero entries, cat /proc/acpi/bbswitch shows OFF. Same after termination of an optirun process.

Installing nvidia-modprobe didn't seem to make a difference~~, but I'll double-check if it does after reboot~~.

Note that uninstalling the nvidia driver, or installing a different one, fails brutally if the nvidia kernel module is locked. I had to switch to internal graphics in BIOS at some point to revert to a stable apt state.

I'm posting this as a self-reminder and in the hope that it will be useful.

@bluca
Copy link
Member

bluca commented Jun 6, 2016

Having KernelDriver=nvidia-367 doesn't load nvidia-drm automatically?

@krlmlr
Copy link

krlmlr commented Jun 6, 2016

@bluca: Doesn't.

@bluca
Copy link
Member

bluca commented Jun 6, 2016

Ok. So, with the testing PPA and that configuration, it is working ok for you then?

@krlmlr
Copy link

krlmlr commented Jun 6, 2016

Yes, optirun works fine with that configuration, and I'll post here tomorrow should intel-virtual-output fail to display on the secondary screens for some reason.

@grzjab
Copy link

grzjab commented Jun 6, 2016

@bluca nothing in /etc/modprobe.d
i have nvidia-modprobe installed, and glxgears works

@krlmlr
Copy link

krlmlr commented Jun 8, 2016

intel-virtual-output currently does not work with in this configuration.

@ArchangeGabriel
Copy link
Member

@krlmlr That’s unfortunate. Do you have any more details (logs or the like) about this?

@bluca Just in case, did you include #720 in testing? I think not but prefer to be sure.

@bluca
Copy link
Member

bluca commented Jun 10, 2016

No haven't backported that, would you like me to? I don't mind if it can be useful/needs testing

@ArchangeGabriel
Copy link
Member

It could have explain @krlmlr issue if you had backported it, that’s why I asked. I prefer to wait for nouveau to be dropped and my PR to be rebased against that before it’s integrated. ;)

@krlmlr
Copy link

krlmlr commented Jun 10, 2016

Chris Wilson, the maintainer of i-v-o, helped a lot sorting out the issue, it looks like a problem with the NVidia driver. I'm now on a patched version of i-v-o, I hope Chris will push a fix soon.

@ArchangeGabriel
Copy link
Member

OK, nice to hear. :)

@gdevenyi
Copy link

Installing from the https://launchpad.net/~bumblebee/+archive/ubuntu/testing PPA along with nvidia-367 on Ubuntu-gnome 16.04 breaks GDM on boot:

Jun 11 16:07:37 titan /usr/lib/gdm3/gdm-x-session[2569]: (EE) AIGLX error: dlopen of /usr/lib/x86_64-linux-gnu/dri/i965_dri.so failed (/usr/lib/x86_64-linux-gnu/dri/i965_dri.so: undefined symbol: _glapi_tls_Dispatch)
Jun 11 16:07:37 titan /usr/lib/gdm3/gdm-x-session[2569]: (EE) AIGLX: reverting to software rendering
Jun 11 16:07:37 titan /usr/lib/gdm3/gdm-x-session[2569]: (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)
Jun 11 16:07:37 titan /usr/lib/gdm3/gdm-x-session[2569]: (EE) GLX: could not load software renderer
Jun 11 16:07:37 titan /usr/lib/gdm3/gdm-x-session[2569]: (II) GLX: no usable GL providers found for screen 0

I suspect this is breakage in some of the update-alternatives?

@bluca
Copy link
Member

bluca commented Jun 11, 2016

Yes most likely, but we don't ship those in bumblebee, they are part of the driver packages. Try to re-configure them:

update-alternatives x86_64-linux-gnu_gl_conf
update-alternatives i386-linux-gnu_gl_conf

@gdevenyi
Copy link

> update-alternatives --query x86_64-linux-gnu_gl_conf
Name: x86_64-linux-gnu_gl_conf
Link: /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf
Value: /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf

Looks like it's pointed in the right place?

@eXt73
Copy link

eXt73 commented Jul 31, 2016

Hi
@gdevenyi You have right ... these are some of the elements that should be modified ... we are within our NeteXt'73 already provide support for Ubuntu / Kubuntu / ... 16.04 ... see how it works with optimized kernels etc.:

https://www.youtube.com/watch?v=P9owsZVVKIs

https://www.youtube.com/watch?v=V-usd-sF664

@pjf
Copy link

pjf commented Aug 12, 2016

Just here giving thanks. I'm on Ubuntu 14.04 with a 4.6.6 kernel and nvidia-367, and following both @molecularentropy and @krlmlr's instructions, and an extra run of sudo ldconfig, I managed to get everything working after upgrading from a 4.5.7 kernel with nvidia-352. Thank you!! (FWIW, I did have to blacklist modules)

@haarp
Copy link

haarp commented Aug 20, 2016

@krlmlr

Chris Wilson, the maintainer of i-v-o, helped a lot sorting out the issue, it looks like a problem with the NVidia driver. I'm now on a patched version of i-v-o, I hope Chris will push a fix soon.

Yes, this appears to be a bug related to nvidia-drivers-364+. Could you share the i-v-o patches? Many thanks!

@krlmlr
Copy link

krlmlr commented Aug 20, 2016

@haarp: Here you go:

diff --git a/tools/virtual.c b/tools/virtual.c
index 77e6a58..bf85d74 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -631,12 +631,12 @@ static int disable_crtc(Display *dpy, XRRScreenResources *res, RRCrtc crtc)
    XRRPanning panning;

    if (crtc) {
-       XRRSetPanning(dpy, res, crtc, memset(&panning, 0, sizeof(panning)));
+       //XRRSetPanning(dpy, res, crtc, memset(&panning, 0, sizeof(panning)));

        if (XRRSetCrtcConfig(dpy, res, crtc, CurrentTime, 0, 0, None, RR_Rotate_0, NULL, 0) != Success)
            return 0;

-       if (XRRSetPanning(dpy, res, crtc, memset(&panning, 0, sizeof(panning))) != Success) {
+       if (0 && XRRSetPanning(dpy, res, crtc, memset(&panning, 0, sizeof(panning))) != Success) {
            DBG(XRR, ("%s failed to clear panning on CRTC:%ld\n", DisplayString(dpy), (long)crtc));
            if (verbose) {
                XRRCrtcInfo *c;

Works for me, but the XRRSetPanning() calls seem to be necessary in the general case, so ymmv.

@haarp
Copy link

haarp commented Aug 22, 2016

@krlmlr

Thank you, this works :)

@danielteichman
Copy link

@leo-bogert
Copy link

@krlmlr I'm trying to figure out whether Chris Wilson fixed this as you said he'd do and whether the fix has been deployed to Ubuntu 16.04 or a later version of Ubuntu. I'm having difficulty to do so on my own as I'm not familiar enough with the technical details of this yet. Can you have a look please?

Some links I gathered, perhaps they may help you:
Versions of the Intel XServer in Ubuntu: https://packages.ubuntu.com/search?keywords=xserver-xorg-video-intel
Git repository of it (possibly?): https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/

@krlmlr
Copy link

krlmlr commented Nov 8, 2017

Thanks. I'm not using Bumblebee anymore, on my new laptop external displays "just work".

@krlmlr
Copy link

krlmlr commented Nov 8, 2017

I remember using custom builds of ivo (intel-virtual-output) from the Git repo you linked, but in general it did seem to work quite well.

@leo-bogert
Copy link

@krlmlr Thank you. I've emailed Chris Wilson about this and will cite his answer here.

Also can someone here give me a summary of whether any other non-configuration-only fixes are needed on Ubuntu 16.04 or above besides the patch to intel-virtual-output?
I.e. I'm fine with tweaking some file paths in configuration files of e.g. Bumblebee manually, I'd just prefer not to touch the source code of any locally installed packages. Makes things easier to maintain if package updates can be installed as-is.
For security reasons I'd also like to NOT depend on using PPAs, I'd really like to stick to the regular packages of Ubuntu.

@D0048
Copy link

D0048 commented Jan 10, 2018

https://d0048.github.io/blog/2017/12/25/Fix-Xlib-extension-GLX-missing-on-display-8-error-running-Gui-programs/

Here's a summary of steps addressing this issue that worked for me.

@echuber2
Copy link

Thanks to everyone in this thread. Adding the nvidia paths to the ld.so.conf files seemed to be what finally fixed it for me.

@molecularentropy
Copy link

I have created a new guide on setting up Bumblebee on Ubuntu 17.10. Check it out, if you like: http://lenovolinux.blogspot.com.au/2018/02/bumblebee-on-lenovo-t440p-nvidia-gt.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests