Open LordAmit opened 8 years ago
Yes, that's related to the missing modprobe. Try to link it manually:
sudo ln -s /lib/nvidia-361/modprobe.conf /etc/modprobe.d/nvidia-tmp.conf sudo depmod
And set KernelDriver=nvidia and try again?
Went through
sudo ln -s /lib/nvidia-361/modprobe.conf /etc/modprobe.d/nvidia-tmp.conf
sudo depmod
then,
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia
sudo systemctl restart bumblebeed
optirun now works with glxgears.
$ cat /proc/acpi/bbswitch
0000:01:00.0 ON
amit@amit-laptop:~$ lsmod | grep nvidia
nvidia_modeset 745472 0
nvidia 10076160 1 nvidia_modeset
drm 360448 11 i915,drm_kms_helper,nvidia
Ok, so what is missing now is handling nvidia-modeset. I'm from the phone so can't be too precise, but you should have /etc/modprobe.d/bumblebee.conf and at the bottom a remove rule that says to remove nvidia-uvm when removing nvidia. Right after nvidia-uvm add nvidia-modeset, separated by a single space and try again
It has a line like this:
remove nvidia rmmod nvidia-uvm nvidia
Should I make it like this?
remove nvidia rmmod nvidia-uvm nvidia add nvidia-modeset
?
Without add
And after nvidia-uvm
remove nvidia rmmod nvidia-uvm nvidia-modeset nvidia
Done. is this ok now? What do I do after saving?
cat /proc/acpi/bbswitch
0000:01:00.0 ON
amit@amit-laptop:/etc/modprobe.d$ lsmod | grep nvidia
nvidia_modeset 745472 0
nvidia 10076160 1 nvidia_modeset
drm 360448 11 i915,drm_kms_helper,nvidia
sudo depmod And the try again
What's the output of sudo modprobe -v -r nvidia
Nothing. It outputs absolutely nothing after sudo modprobe -v -r nvidia
after sudo depmod
sudo systemctl restart bumblebeed
amit@amit-laptop:/etc/modprobe.d$ optirun -v -v glxgears
[ 4532.527166] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 4532.527470] [INFO]Configured driver: nvidia
[ 4532.527715] [DEBUG]optirun version 3.2.1 starting...
[ 4532.527734] [DEBUG]Active configuration:
[ 4532.527743] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 4532.527754] [DEBUG] X display: :8
[ 4532.527763] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-361:/usr/lib32/nvidia-current
[ 4532.527782] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 4532.527790] [DEBUG] Accel/display bridge: auto
[ 4532.527800] [DEBUG] VGL Compression: proxy
[ 4532.527809] [DEBUG] VGLrun extra options:
[ 4532.527819] [DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
[ 4532.527913] [DEBUG]Using auto-detected bridge primus
[ 4532.806976] [INFO]Response: Yes. X is active.
[ 4532.806996] [INFO]Running application using primus.
[ 4532.807134] [DEBUG]Process glxgears started, PID 10588.
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 153 (DRI2)
Minor opcode of failed request: 7 (DRI2GetBuffersWithFormat )
Resource id in failed request: 0x3a00002
Serial number of failed request: 527
Current serial number in output stream: 527
primus: warning: dropping a frame to avoid deadlock
primus: warning: timeout waiting for display worker
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
after 31 requests (31 known processed) with 0 events remaining.
[ 4536.851307] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 4536.851346] [DEBUG]Socket closed.
[ 4536.851374] [DEBUG]Killing all remaining processes.
amit@amit-laptop:/etc/modprobe.d$ cat /proc/acpi/bbswitch
0000:01:00.0 ON
amit@amit-laptop:/etc/modprobe.d$ lsmod | grep nvidia
nvidia_modeset 745472 0
nvidia 10076160 1 nvidia_modeset
drm 360448 11 i915,drm_kms_helper,nvidia
That's... weird. The rule is there. Why is it ignoring it?
Try:
sudo modprobe -v -v -v -r nvidia
Note that this problem will go away once this PR is merged: https://github.com/Bumblebee-Project/Bumblebee/pull/762
sudo modprobe -v -v -v -r nvidia
modprobe: INFO: ../libkmod/libkmod.c:364 kmod_set_log_fn() custom logging function 0x56270ef244a0 registered
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.dep.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.alias.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.symbols.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.builtin.bin
modprobe: DEBUG: ../libkmod/libkmod-module.c:556 kmod_module_new_from_lookup() input alias=nvidia, normalized=nvidia
modprobe: DEBUG: ../libkmod/libkmod.c:402 kmod_pool_get_module() get module name='nvidia_current_updates\nvidia' found=(nil)
modprobe: DEBUG: ../libkmod/libkmod.c:410 kmod_pool_add_module() add 0x562710714550 key='nvidia_current_updates\nvidia'
modprobe: DEBUG: ../libkmod/libkmod.c:402 kmod_pool_get_module() get module name='nvidia_361\nvidia' found=(nil)
modprobe: DEBUG: ../libkmod/libkmod.c:410 kmod_pool_add_module() add 0x562710714700 key='nvidia_361\nvidia'
modprobe: DEBUG: ../libkmod/libkmod-module.c:583 kmod_module_new_from_lookup() lookup nvidia=2, list=0x56271071bdc0
modprobe: DEBUG: ../libkmod/libkmod.c:501 lookup_builtin_file() use mmaped index 'modules.builtin' modname=nvidia_current_updates
modprobe: DEBUG: ../libkmod/libkmod-module.c:1744 kmod_module_get_initstate() could not open '/sys/module/nvidia_current_updates/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1754 kmod_module_get_initstate() could not open '/sys/module/nvidia_current_updates': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod.c:501 lookup_builtin_file() use mmaped index 'modules.builtin' modname=nvidia_361
modprobe: DEBUG: ../libkmod/libkmod-module.c:1744 kmod_module_get_initstate() could not open '/sys/module/nvidia_361/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1754 kmod_module_get_initstate() could not open '/sys/module/nvidia_361': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:468 kmod_module_unref() kmod_module 0x562710714550 released
modprobe: DEBUG: ../libkmod/libkmod.c:418 kmod_pool_del_module() del 0x562710714550 key='nvidia_current_updates\nvidia'
modprobe: DEBUG: ../libkmod/libkmod-module.c:468 kmod_module_unref() kmod_module 0x562710714700 released
modprobe: DEBUG: ../libkmod/libkmod.c:418 kmod_pool_del_module() del 0x562710714700 key='nvidia_361\nvidia'
modprobe: INFO: ../libkmod/libkmod.c:331 kmod_unref() context 0x562710714290 released
You are the expert here, boss. You know what's going around. Am merely following your lead :smile:
What if you make the rule you changed before in /etc/modprobe.d/bumblebee.conf like this:
remove nvidia rmmod nvidia_361-uvm nvidia_361-modeset nvidia
changed the line to
# remove nvidia rmmod nvidia-uvm nvidia-modeset nvidia
remove nvidia rmmod nvidia_361-uvm nvidia_361-modeset nvidia
then
sudo depmod
[sudo] password for amit:
amit@amit-laptop:/etc/modprobe.d$ sudo modprobe -v -r nvidia
amit@amit-laptop:/etc/modprobe.d$ sudo systemctl restart bumblebeed
amit@amit-laptop:/etc/modprobe.d$ optirun -v -v glxgears
[ 6547.195826] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 6547.196191] [INFO]Configured driver: nvidia
[ 6547.196526] [DEBUG]optirun version 3.2.1 starting...
[ 6547.196562] [DEBUG]Active configuration:
[ 6547.196567] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 6547.196572] [DEBUG] X display: :8
[ 6547.196602] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-361:/usr/lib32/nvidia-current
[ 6547.196614] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 6547.196650] [DEBUG] Accel/display bridge: auto
[ 6547.196660] [DEBUG] VGL Compression: proxy
[ 6547.196697] [DEBUG] VGLrun extra options:
[ 6547.196707] [DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
[ 6547.196802] [DEBUG]Using auto-detected bridge primus
[ 6547.459628] [INFO]Response: Yes. X is active.
[ 6547.459646] [INFO]Running application using primus.
[ 6547.459769] [DEBUG]Process glxgears started, PID 11295.
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 153 (DRI2)
Minor opcode of failed request: 7 (DRI2GetBuffersWithFormat )
Resource id in failed request: 0x3a00002
Serial number of failed request: 458
Current serial number in output stream: 458
primus: warning: dropping a frame to avoid deadlock
primus: warning: timeout waiting for display worker
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
after 31 requests (31 known processed) with 0 events remaining.
[ 6551.087573] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 6551.087620] [DEBUG]Socket closed.
[ 6551.087645] [DEBUG]Killing all remaining processes.
amit@amit-laptop:/etc/modprobe.d$ cat /proc/acpi/bbswitch
0000:01:00.0 ON
amit@amit-laptop:/etc/modprobe.d$ lsmod | grep nvidia
nvidia_modeset 745472 0
nvidia 10076160 1 nvidia_modeset
drm 360448 12 i915,drm_kms_helper,nvidia
amit@amit-laptop:/etc/modprobe.d$ sudo modprobe -v -v -v -r nvidia
modprobe: INFO: ../libkmod/libkmod.c:364 kmod_set_log_fn() custom logging function 0x55da0febd4a0 registered
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.dep.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.alias.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.symbols.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.builtin.bin
modprobe: DEBUG: ../libkmod/libkmod-module.c:556 kmod_module_new_from_lookup() input alias=nvidia, normalized=nvidia
modprobe: DEBUG: ../libkmod/libkmod.c:402 kmod_pool_get_module() get module name='nvidia_current_updates\nvidia' found=(nil)
modprobe: DEBUG: ../libkmod/libkmod.c:410 kmod_pool_add_module() add 0x55da1170c550 key='nvidia_current_updates\nvidia'
modprobe: DEBUG: ../libkmod/libkmod.c:402 kmod_pool_get_module() get module name='nvidia_361\nvidia' found=(nil)
modprobe: DEBUG: ../libkmod/libkmod.c:410 kmod_pool_add_module() add 0x55da1170c700 key='nvidia_361\nvidia'
modprobe: DEBUG: ../libkmod/libkmod-module.c:583 kmod_module_new_from_lookup() lookup nvidia=2, list=0x55da11713dd0
modprobe: DEBUG: ../libkmod/libkmod.c:501 lookup_builtin_file() use mmaped index 'modules.builtin' modname=nvidia_current_updates
modprobe: DEBUG: ../libkmod/libkmod-module.c:1744 kmod_module_get_initstate() could not open '/sys/module/nvidia_current_updates/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1754 kmod_module_get_initstate() could not open '/sys/module/nvidia_current_updates': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod.c:501 lookup_builtin_file() use mmaped index 'modules.builtin' modname=nvidia_361
modprobe: DEBUG: ../libkmod/libkmod-module.c:1744 kmod_module_get_initstate() could not open '/sys/module/nvidia_361/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1754 kmod_module_get_initstate() could not open '/sys/module/nvidia_361': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:468 kmod_module_unref() kmod_module 0x55da1170c550 released
modprobe: DEBUG: ../libkmod/libkmod.c:418 kmod_pool_del_module() del 0x55da1170c550 key='nvidia_current_updates\nvidia'
modprobe: DEBUG: ../libkmod/libkmod-module.c:468 kmod_module_unref() kmod_module 0x55da1170c700 released
modprobe: DEBUG: ../libkmod/libkmod.c:418 kmod_pool_del_module() del 0x55da1170c700 key='nvidia_361\nvidia'
modprobe: INFO: ../libkmod/libkmod.c:331 kmod_unref() context 0x55da1170c290 released
What about:
remove nvidia rmmod nvidia_361-uvm nvidia_361-modeset nvidia_361
after
# remove nvidia rmmod nvidia_361-uvm nvidia_361-modeset nvidia
remove nvidia rmmod nvidia_361-uvm nvidia_361-modeset nvidia_361
sudo depmod
[sudo] password for amit:
amit@amit-laptop:/etc/modprobe.d$ sudo modprobe -v -r nvidia
amit@amit-laptop:/etc/modprobe.d$ sudo systemctl restart bumblebeed
amit@amit-laptop:/etc/modprobe.d$ optirun -v -v glxgears
[ 7815.331484] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 7815.331790] [INFO]Configured driver: nvidia
[ 7815.331987] [DEBUG]optirun version 3.2.1 starting...
[ 7815.332032] [DEBUG]Active configuration:
[ 7815.332057] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 7815.332063] [DEBUG] X display: :8
[ 7815.332068] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-361:/usr/lib32/nvidia-current
[ 7815.332073] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 7815.332079] [DEBUG] Accel/display bridge: auto
[ 7815.332085] [DEBUG] VGL Compression: proxy
[ 7815.332090] [DEBUG] VGLrun extra options:
[ 7815.332096] [DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
[ 7815.332184] [DEBUG]Using auto-detected bridge primus
[ 7815.598713] [INFO]Response: Yes. X is active.
[ 7815.598728] [INFO]Running application using primus.
[ 7815.598856] [DEBUG]Process glxgears started, PID 11633.
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 153 (DRI2)
Minor opcode of failed request: 7 (DRI2GetBuffersWithFormat )
Resource id in failed request: 0x3a00002
Serial number of failed request: 464
Current serial number in output stream: 464
primus: warning: dropping a frame to avoid deadlock
primus: warning: timeout waiting for display worker
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
after 31 requests (31 known processed) with 0 events remaining.
[ 7819.270939] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 7819.270985] [DEBUG]Socket closed.
[ 7819.271011] [DEBUG]Killing all remaining processes.
amit@amit-laptop:/etc/modprobe.d$ cat /proc/acpi/bbswitch
0000:01:00.0 ON
amit@amit-laptop:/etc/modprobe.d$ lsmod | grep nvidia
nvidia_modeset 745472 0
nvidia 10076160 1 nvidia_modeset
drm 360448 12 i915,drm_kms_helper,nvidia
Sigh. Ok, I can reproduce this locally - this is a problem with Ubuntu's modprobe aliases. I will try to investigate locally and see what we can do.
sudo modprobe -v -v -v -r nvidia
modprobe: INFO: ../libkmod/libkmod.c:364 kmod_set_log_fn() custom logging function 0x5557bd94a4a0 registered
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.dep.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.alias.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.symbols.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.builtin.bin
modprobe: DEBUG: ../libkmod/libkmod-module.c:556 kmod_module_new_from_lookup() input alias=nvidia, normalized=nvidia
modprobe: DEBUG: ../libkmod/libkmod.c:402 kmod_pool_get_module() get module name='nvidia_current_updates\nvidia' found=(nil)
modprobe: DEBUG: ../libkmod/libkmod.c:410 kmod_pool_add_module() add 0x5557be68c550 key='nvidia_current_updates\nvidia'
modprobe: DEBUG: ../libkmod/libkmod.c:402 kmod_pool_get_module() get module name='nvidia_361\nvidia' found=(nil)
modprobe: DEBUG: ../libkmod/libkmod.c:410 kmod_pool_add_module() add 0x5557be68c700 key='nvidia_361\nvidia'
modprobe: DEBUG: ../libkmod/libkmod-module.c:583 kmod_module_new_from_lookup() lookup nvidia=2, list=0x5557be693dd0
modprobe: DEBUG: ../libkmod/libkmod.c:501 lookup_builtin_file() use mmaped index 'modules.builtin' modname=nvidia_current_updates
modprobe: DEBUG: ../libkmod/libkmod-module.c:1744 kmod_module_get_initstate() could not open '/sys/module/nvidia_current_updates/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1754 kmod_module_get_initstate() could not open '/sys/module/nvidia_current_updates': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod.c:501 lookup_builtin_file() use mmaped index 'modules.builtin' modname=nvidia_361
modprobe: DEBUG: ../libkmod/libkmod-module.c:1744 kmod_module_get_initstate() could not open '/sys/module/nvidia_361/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1754 kmod_module_get_initstate() could not open '/sys/module/nvidia_361': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:468 kmod_module_unref() kmod_module 0x5557be68c550 released
modprobe: DEBUG: ../libkmod/libkmod.c:418 kmod_pool_del_module() del 0x5557be68c550 key='nvidia_current_updates\nvidia'
modprobe: DEBUG: ../libkmod/libkmod-module.c:468 kmod_module_unref() kmod_module 0x5557be68c700 released
modprobe: DEBUG: ../libkmod/libkmod.c:418 kmod_pool_del_module() del 0x5557be68c700 key='nvidia_361\nvidia'
modprobe: INFO: ../libkmod/libkmod.c:331 kmod_unref() context 0x5557be68c290 released
I have absolutely no idea what's going on and what I am doing, btw. Want to give me a brief?
Unloading the kernel module does not work. This is because it's now split in 2 (and 3 in 364 and up) - nvidia and nvidia-modeset. rmmod nvidia won't work if there's something depending on it still loaded, like nvidia-modeset. In Debian we solve this problem with modprobe rules. You can define complicated rules that are followed when you run modprobe. For example, in Debian, when you do modprobe -r nvidia it will also unload automatically all other nvidia-* modules. This does not happen on Ubuntu, and that's the problem.
I was trying to find a combination that works for Ubuntu. I will try locally and see where I can get. I'll report back in a while. Thanks for the help!
To unload the module and turn the card off (to save power), a combination of these should work:
sudo modprobe -r nvidia-modeset sudo modprobe -r nvidia
or
sudo rmmod nvidia_modeset sudo rmmod nvidia
and finally, when lsmod | grep nvidia is empty,
sudo tee /proc/acpi/bbswitch <<<OFF
I see. Looks like only rmmod
works.
sudo modprobe -r nvidia-modeset
amit@amit-laptop:/etc/modprobe.d$ sudo modprobe -r nvidia
amit@amit-laptop:/etc/modprobe.d$ lsmod | grep nvidia
nvidia_modeset 745472 0
nvidia 10076160 1 nvidia_modeset
drm 360448 12 i915,drm_kms_helper,nvidia
amit@amit-laptop:/etc/modprobe.d$ sudo rmmod nvidia_modeset
amit@amit-laptop:/etc/modprobe.d$ sudo rmmod nvidia
amit@amit-laptop:/etc/modprobe.d$ lsmod | grep nvidia
amit@amit-laptop:/etc/modprobe.d$ sudo tee /proc/acpi/bbswitch <<<OFF
OFF
amit@amit-laptop:/etc/modprobe.d$ cat /proc/acpi/bbswitch
0000:01:00.0 OFF
I should make a short shell script to automate these.
BTW, I am seriously considering moving to Debian. I guess we are both taking a break until you come up with something, @bluca .
Once again, thank you for the patience and guidance. I really, really am grateful. :smile:
oh wait a sec. Try with this in /etc/modprobe.d/bumblebee.conf:
remove nvidia rmmod nvidia_uvm nvidia_modeset nvidia
should not I revert the rmmod I just did? as well as the bbswitch part? What do I do after modification?
No that will be done automatically by bumblebee
No it does not?
sudo depmod
amit@amit-laptop:/etc/modprobe.d$ sudo modprobe -v -r nvidia
amit@amit-laptop:/etc/modprobe.d$ sudo systemctl restart bumblebeed
amit@amit-laptop:/etc/modprobe.d$ optirun -v -v glxgears
[ 8775.488667] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 8775.489011] [INFO]Configured driver: nvidia
[ 8775.489258] [DEBUG]optirun version 3.2.1 starting...
[ 8775.489279] [DEBUG]Active configuration:
[ 8775.489284] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 8775.489289] [DEBUG] X display: :8
[ 8775.489293] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-361:/usr/lib32/nvidia-current
[ 8775.489298] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 8775.489302] [DEBUG] Accel/display bridge: auto
[ 8775.489306] [DEBUG] VGL Compression: proxy
[ 8775.489310] [DEBUG] VGLrun extra options:
[ 8775.489314] [DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
[ 8775.489411] [DEBUG]Using auto-detected bridge primus
[ 8775.570617] [INFO]Response: No - error: Could not load GPU driver
[ 8775.570647] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver
[ 8775.570683] [DEBUG]Socket closed.
[ 8775.570733] [ERROR]Aborting because fallback start is disabled.
[ 8775.570746] [DEBUG]Killing all remaining processes.
feel free to tell me where I went wrong.
Oh well, was worth trying. I guess sudo modprobe -v -v -v -r nvidia still doesn't work?
sudo modprobe -v -v -v -r nvidia
modprobe: INFO: ../libkmod/libkmod.c:364 kmod_set_log_fn() custom logging function 0x5599f2a804a0 registered
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.dep.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.alias.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.symbols.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.4.0-22-generic/modules.builtin.bin
modprobe: DEBUG: ../libkmod/libkmod-module.c:556 kmod_module_new_from_lookup() input alias=nvidia, normalized=nvidia
modprobe: DEBUG: ../libkmod/libkmod.c:402 kmod_pool_get_module() get module name='nvidia_current_updates\nvidia' found=(nil)
modprobe: DEBUG: ../libkmod/libkmod.c:410 kmod_pool_add_module() add 0x5599f2e61550 key='nvidia_current_updates\nvidia'
modprobe: DEBUG: ../libkmod/libkmod.c:402 kmod_pool_get_module() get module name='nvidia_361\nvidia' found=(nil)
modprobe: DEBUG: ../libkmod/libkmod.c:410 kmod_pool_add_module() add 0x5599f2e61700 key='nvidia_361\nvidia'
modprobe: DEBUG: ../libkmod/libkmod-module.c:583 kmod_module_new_from_lookup() lookup nvidia=2, list=0x5599f2e68dc0
modprobe: DEBUG: ../libkmod/libkmod.c:501 lookup_builtin_file() use mmaped index 'modules.builtin' modname=nvidia_current_updates
modprobe: DEBUG: ../libkmod/libkmod-module.c:1744 kmod_module_get_initstate() could not open '/sys/module/nvidia_current_updates/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1754 kmod_module_get_initstate() could not open '/sys/module/nvidia_current_updates': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod.c:501 lookup_builtin_file() use mmaped index 'modules.builtin' modname=nvidia_361
modprobe: DEBUG: ../libkmod/libkmod-module.c:1744 kmod_module_get_initstate() could not open '/sys/module/nvidia_361/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1754 kmod_module_get_initstate() could not open '/sys/module/nvidia_361': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:468 kmod_module_unref() kmod_module 0x5599f2e61550 released
modprobe: DEBUG: ../libkmod/libkmod.c:418 kmod_pool_del_module() del 0x5599f2e61550 key='nvidia_current_updates\nvidia'
modprobe: DEBUG: ../libkmod/libkmod-module.c:468 kmod_module_unref() kmod_module 0x5599f2e61700 released
modprobe: DEBUG: ../libkmod/libkmod.c:418 kmod_pool_del_module() del 0x5599f2e61700 key='nvidia_361\nvidia'
modprobe: INFO: ../libkmod/libkmod.c:331 kmod_unref() context 0x5599f2e61290 released
since optirun is not working anymore, should I revert back to the previous lines in bumblebee.conf in modprobe.d?
Yes go for it.
Still does not work. Optirun not running.
remove nvidia rmmod nvidia_361-uvm nvidia_361-modeset nvidia_361
sudo depmod
^[[Aamit@amit-laptop:/etc/modprobe.d$ sudo modprobe -v -r nvidia
amit@amit-laptop:/etc/modprobe.d$ sudo systemctl restart bumblebeed
amit@amit-laptop:/etc/modprobe.d$ optirun -v -v glxgears
[ 9021.673718] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 9021.674071] [INFO]Configured driver: nvidia
[ 9021.674317] [DEBUG]optirun version 3.2.1 starting...
[ 9021.674332] [DEBUG]Active configuration:
[ 9021.674342] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 9021.674352] [DEBUG] X display: :8
[ 9021.674362] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-361:/usr/lib32/nvidia-current
[ 9021.674372] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 9021.674386] [DEBUG] Accel/display bridge: auto
[ 9021.674411] [DEBUG] VGL Compression: proxy
[ 9021.674424] [DEBUG] VGLrun extra options:
[ 9021.674436] [DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
[ 9021.674536] [DEBUG]Using auto-detected bridge primus
[ 9021.754458] [INFO]Response: No - error: Could not load GPU driver
[ 9021.754483] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver
[ 9021.754493] [DEBUG]Socket closed.
[ 9021.754517] [ERROR]Aborting because fallback start is disabled.
[ 9021.754522] [DEBUG]Killing all remaining processes.
amit@amit-laptop:/etc/modprobe.d$ sudo modprobe -v -r nvidia_modeset
amit@amit-laptop:/etc/modprobe.d$ optirun -v -v glxgears
[ 9052.838546] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 9052.838813] [INFO]Configured driver: nvidia
[ 9052.839168] [DEBUG]optirun version 3.2.1 starting...
[ 9052.839185] [DEBUG]Active configuration:
[ 9052.839189] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 9052.839193] [DEBUG] X display: :8
[ 9052.839197] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-361:/usr/lib32/nvidia-current
[ 9052.839202] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 9052.839206] [DEBUG] Accel/display bridge: auto
[ 9052.839210] [DEBUG] VGL Compression: proxy
[ 9052.839214] [DEBUG] VGLrun extra options:
[ 9052.839235] [DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
[ 9052.839311] [DEBUG]Using auto-detected bridge primus
[ 9052.842018] [INFO]Response: No - error: Could not load GPU driver
[ 9052.842037] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver
[ 9052.842042] [DEBUG]Socket closed.
[ 9052.842064] [ERROR]Aborting because fallback start is disabled.
[ 9052.842071] [DEBUG]Killing all remaining processes.
the line should be:
remove nvidia rmmod nvidia-uvm nvidia
Nope, nothing even after changing the line to the one you mentioned above. I think I should've mentioned this earlier:
lsmod | grep nvidia
Shows nothing. bbswitch is ON.
Try with disabling the card before: sudo tee /proc/acpi/bbswitch <<<OFF
sudo tee /proc/acpi/bbswitch <<<OFF
OFF
amit@amit-laptop:/etc/modprobe.d$ sudo depmod
^[[Aamit@amit-laptop:/etc/modprobe.d$ sudo depmod
amit@amit-laptop:/etc/modprobe.d$ sudo modprobe -v -r nvidia
amit@amit-laptop:/etc/modprobe.d$
amit@amit-laptop:/etc/modprobe.d$ lsmod | grep nvidia
amit@amit-laptop:/etc/modprobe.d$ sudo systemctl restart bumblebeed
amit@amit-laptop:/etc/modprobe.d$ lsmod | grep nvidia
:/
cat /proc/acpi/bbswitch
0000:01:00.0 OFF
amit@amit-laptop:/etc/modprobe.d$ optirun -v -v glxgears
[10199.074466] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[10199.074723] [INFO]Configured driver: nvidia
[10199.074937] [DEBUG]optirun version 3.2.1 starting...
[10199.074958] [DEBUG]Active configuration:
[10199.074968] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[10199.074978] [DEBUG] X display: :8
[10199.074983] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-361:/usr/lib32/nvidia-current
[10199.074993] [DEBUG] Socket path: /var/run/bumblebee.socket
[10199.075000] [DEBUG] Accel/display bridge: auto
[10199.075008] [DEBUG] VGL Compression: proxy
[10199.075011] [DEBUG] VGLrun extra options:
[10199.075017] [DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
[10199.075080] [DEBUG]Using auto-detected bridge primus
[10199.154305] [INFO]Response: No - error: Could not load GPU driver
[10199.154341] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver
[10199.154363] [DEBUG]Socket closed.
[10199.154393] [ERROR]Aborting because fallback start is disabled.
[10199.154402] [DEBUG]Killing all remaining processes.
amit@amit-laptop:/etc/modprobe.d$ cat /proc/acpi/bbswitch
0000:01:00.0 ON
What is going on. What's in sudo journalctl -b --since "5 minutes ago"
:facepalm: Oops, wait. my bad. I commented out this line
remove nvidia rmmod nvidia-uvm nvidia
hold on.
remove nvidia rmmod nvidia-uvm nvidia
cat /proc/acpi/bbswitch
0000:01:00.0 OFF
amit@amit-laptop:/etc/modprobe.d$ lsmod | grep nvidia
amit@amit-laptop:/etc/modprobe.d$ sudo depmod
amit@amit-laptop:/etc/modprobe.d$ sudo modprobe -v -r nvidia
amit@amit-laptop:/etc/modprobe.d$ sudo systemctl restart bumblebeed
amit@amit-laptop:/etc/modprobe.d$ optirun -v -v glxgears
[10476.297871] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[10476.298167] [INFO]Configured driver: nvidia
[10476.298339] [DEBUG]optirun version 3.2.1 starting...
[10476.298354] [DEBUG]Active configuration:
[10476.298358] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[10476.298363] [DEBUG] X display: :8
[10476.298368] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-361:/usr/lib32/nvidia-current
[10476.298373] [DEBUG] Socket path: /var/run/bumblebee.socket
[10476.298377] [DEBUG] Accel/display bridge: auto
[10476.298382] [DEBUG] VGL Compression: proxy
[10476.298387] [DEBUG] VGLrun extra options:
[10476.298392] [DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
[10476.298478] [DEBUG]Using auto-detected bridge primus
[10476.379436] [INFO]Response: No - error: Could not load GPU driver
[10476.379467] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver
[10476.379474] [DEBUG]Socket closed.
[10476.379505] [ERROR]Aborting because fallback start is disabled.
[10476.379521] [DEBUG]Killing all remaining processes.
amit@amit-laptop:/etc/modprobe.d$ cat /proc/acpi/bbswitch
0000:01:00.0 ON
amit@amit-laptop:/etc/modprobe.d$ lsmod | grep nvidia
amit@amit-laptop:/etc/modprobe.d$
sudo journalctl -b --since "5 minutes ago"
-- Logs begin at Tue 2016-05-17 23:43:03 BDT, end at Wed 2016-05-18 02:37:47 BDT. --
May 18 02:32:54 amit-laptop kernel: bbswitch: enabling discrete graphics
May 18 02:32:54 amit-laptop bumblebeed[12294]: [10199.154256] [ERROR]Module nvidia could not be loaded (timeout?)
May 18 02:32:54 amit-laptop bumblebeed[12294]: [10199.154279] [ERROR]Could not load GPU driver
May 18 02:33:01 amit-laptop sudo[12349]: amit : TTY=pts/2 ; PWD=/etc/modprobe.d ; USER=root ; COMMAND=/usr/bin/tee /proc/acpi/bbswitch
May 18 02:33:01 amit-laptop sudo[12349]: pam_unix(sudo:session): session opened for user root by (uid=0)
May 18 02:33:01 amit-laptop kernel: bbswitch: disabling discrete graphics
May 18 02:33:01 amit-laptop kernel: ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
May 18 02:33:01 amit-laptop sudo[12349]: pam_unix(sudo:session): session closed for user root
May 18 02:35:29 amit-laptop sudo[12370]: pam_unix(sudo:auth): auth could not identify password for [amit]
May 18 02:35:34 amit-laptop sudo[12373]: amit : TTY=pts/0 ; PWD=/home/amit/Desktop ; USER=root ; COMMAND=/bin/journalctl -b --since 5 minutes ago
May 18 02:35:34 amit-laptop sudo[12373]: pam_unix(sudo:session): session opened for user root by (uid=0)
May 18 02:35:34 amit-laptop sudo[12373]: pam_unix(sudo:session): session closed for user root
May 18 02:35:48 amit-laptop gnome-session[1749]: [119B blob data]
May 18 02:35:48 amit-laptop gnome-session[1749]: [119B blob data]
May 18 02:37:12 amit-laptop sudo[12506]: amit : TTY=pts/2 ; PWD=/etc/modprobe.d ; USER=root ; COMMAND=/sbin/depmod
May 18 02:37:12 amit-laptop sudo[12506]: pam_unix(sudo:session): session opened for user root by (uid=0)
May 18 02:37:12 amit-laptop sudo[12506]: pam_unix(sudo:session): session closed for user root
May 18 02:37:21 amit-laptop sudo[12508]: amit : TTY=pts/2 ; PWD=/etc/modprobe.d ; USER=root ; COMMAND=/sbin/modprobe -v -r nvidia
May 18 02:37:21 amit-laptop sudo[12508]: pam_unix(sudo:session): session opened for user root by (uid=0)
May 18 02:37:21 amit-laptop sudo[12508]: pam_unix(sudo:session): session closed for user root
May 18 02:37:27 amit-laptop sudo[12510]: amit : TTY=pts/2 ; PWD=/etc/modprobe.d ; USER=root ; COMMAND=/bin/systemctl restart bumblebeed
May 18 02:37:27 amit-laptop sudo[12510]: pam_unix(sudo:session): session opened for user root by (uid=0)
May 18 02:37:27 amit-laptop bumblebeed[12294]: [10472.730516] [WARN]Received Terminated signal.
May 18 02:37:27 amit-laptop systemd[1]: Stopping Bumblebee C Daemon...
May 18 02:37:27 amit-laptop kernel: bbswitch: enabling discrete graphics
May 18 02:37:27 amit-laptop systemd[1]: Stopped Bumblebee C Daemon.
May 18 02:37:27 amit-laptop systemd[1]: Started Bumblebee C Daemon.
May 18 02:37:27 amit-laptop sudo[12510]: pam_unix(sudo:session): session closed for user root
May 18 02:37:27 amit-laptop bumblebeed[12514]: [10472.831394] [INFO]/usr/sbin/bumblebeed 3.2.1 started
May 18 02:37:27 amit-laptop kernel: bbswitch: disabling discrete graphics
May 18 02:37:27 amit-laptop kernel: ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
May 18 02:37:31 amit-laptop kernel: bbswitch: enabling discrete graphics
May 18 02:37:31 amit-laptop bumblebeed[12514]: [10476.379348] [ERROR]Module nvidia could not be loaded (timeout?)
May 18 02:37:31 amit-laptop bumblebeed[12514]: [10476.379383] [ERROR]Could not load GPU driver
May 18 02:37:47 amit-laptop sudo[12525]: amit : TTY=pts/0 ; PWD=/home/amit/Desktop ; USER=root ; COMMAND=/bin/journalctl -b --since 5 minutes ago
May 18 02:37:47 amit-laptop sudo[12525]: pam_unix(sudo:session): session opened for user root by (uid=0)
Is the symlink from /lib/nvidia-361/modprobe.conf to /etc/modprobe.d still there?
You mean this one?
sudo ln -s /lib/nvidia-361/modprobe.conf /etc/modprobe.d/nvidia-tmp.conf
Yes
/etc/modprobe.d$ ll
total 80
drwxr-xr-x 2 root root 4096 May 18 00:35 ./
drwxr-xr-x 157 root root 12288 May 18 00:15 ../
-rw-r--r-- 1 root root 2507 Jul 31 2015 alsa-base.conf
-rw-r--r-- 1 root root 325 Mar 13 19:36 blacklist-ath_pci.conf
-rw-r--r-- 1 root root 1907 May 1 02:47 blacklist.conf
-rw-r--r-- 1 root root 1603 May 1 02:47 blacklist.conf.bak
-rw-r--r-- 1 root root 210 Mar 13 19:36 blacklist-firewire.conf
-rw-r--r-- 1 root root 697 Mar 13 19:36 blacklist-framebuffer.conf
-rw-r--r-- 1 root root 156 Jul 31 2015 blacklist-modem.conf
lrwxrwxrwx 1 root root 41 Apr 30 14:56 blacklist-oss.conf -> /lib/linux-sound-base/noOSS.modprobe.conf
-rw-r--r-- 1 root root 583 Mar 13 19:36 blacklist-rare-network.conf
-rw-r--r-- 1 root root 1077 Mar 13 19:36 blacklist-watchdog.conf
-rw-r--r-- 1 root root 2445 May 18 02:36 bumblebee.conf
-rw-r--r-- 1 root root 127 Mar 12 2015 dkms.conf
-rw-r--r-- 1 root root 390 Apr 12 16:06 fbdev-blacklist.conf
-rw-r--r-- 1 root root 347 Mar 13 19:36 iwlwifi.conf
-rw-r--r-- 1 root root 104 Mar 13 19:36 mlx4.conf
-rw-r--r-- 1 root root 153 Apr 14 21:53 nvidia-361_hybrid.conf
lrwxrwxrwx 1 root root 29 May 18 00:35 nvidia-tmp.conf -> /lib/nvidia-361/modprobe.conf
-rw-r--r-- 1 root root 30 Mar 3 20:28 vmwgfx-fbdev.conf
I don't know anymore what is broken with these modprobe aliases. Again, I'll try locally. Meanwhile, you can get around it by setting KernelDriver=nvidia-361 in /etc/bumblebee/bumblebee.conf and turning the card off manually.
Alright then. I will get some sleep. Last night's lack of sleep took a toll on me >.>
.> I should really move to Debian.
Script for removing modules related to nvidia and turning off bbswitch:
#!/bin/bash
sudo rmmod nvidia_modeset
sudo modprobe -r nvidia-modeset
sudo modprobe -r nvidia
sudo rmmod nvidia_uvm
sudo modprobe -r nvidia
sudo rmmod nvidia
sudo tee /proc/acpi/bbswitch <<<OFF
@bluca - let me know if you need any additional information - BTW. Keep me updated please.
Will do, thanks for testing
In previous versions, Ubuntu used Upstart which has some auto-detection for the driver (see debian/bumblebee.bumblebeed.upstart or /etc/init/bumblebee.conf). The init.d shell script does not seem to perform auto-detection which might result in surprises upon updating.
We precisely avoided modprobe -r nvidia
in the past because it did not handle aliases well (modprobe nvidia-current
or modprobe nvidia-304
would make module nvidia
appear in lsmod
and /proc/modules
). I thought that this was fixed in recent kmod, if it is not, then the libkmod patch must be updated I guess.
Hopefully when this is merged this problem will go away: https://github.com/Bumblebee-Project/Bumblebee/pull/762
On Debian, modprobe -r nvidia works just fine (even with the new kernel modules), because we ship a working modprobe conf file. That is sadly not the case on Ubuntu, where they either are broken or aren't even configured and linked in /etc/modprobe.d.
Umm, hello. Today probably @bluca pushed an update to the testing repository. here is what happened.
sudo apt upgrade
.
Edit: Solution Found - Tweak edition We worked out a solution. In case
tl;dr
, please check this link: https://github.com/Bumblebee-Project/Bumblebee/issues/761#issuecomment-219561042Hi,
This is a few years old Optimus enabled graphics card. I was able to use it using bumblebee a few years ago as well, but in later versions of Ubuntu I have never been able to. I have tried setting it up using information from askubuntu, from ubuntu, from the various issues here, from different blogs. Nothing worked. Every single time I tried setting the latest nvidia driver (last attempt - last night 361) and rebooted, the login screen started flickering, pressing
Alt + Ctrl + F1
to access terminal didn't work, and I had to get in Ubuntu advanced recovery mode to purge everything and back to square one. Before that, I tried editingbumblebee.conf
andxorg.conf.nvidia
. I tried making the bumblebee daemon work, but it kept failing at nvidia_uvm, or nvidia, or something else. I am really sorry if all these sound a bit incoherent.Therefore, please guide me what I need to do. Here is my config:
I am using Ubuntu Gnome 16.04 LTS - with GDM3 Display Manager.
Laptop Details: http://www.ubuntu.com/certification/hardware/201209-11722/
Please, let me know if you need any other information. I will provide any information required to solve this.
Thank you in advance.