Bumblebee-Project / bbswitch

Disable discrete graphics (currently nvidia only)
GNU General Public License v2.0
487 stars 78 forks source link

Noob--reinstalled `bbswitch` but the file `/proc/acpi/bbswitch` is missing? #164

Open xtiansimon opened 6 years ago

xtiansimon commented 6 years ago

My laptop has Nvidia Optimus (Intel integrated GPU/NVIDIA dedicated GPU). I've been testing bumblebee on Lenovo W541 and troubleshooting the "cannot turn off" nvidia issue. I uninstalled bumblebee and bbswitch on Arch install using sudo pacman -Rs [package] (only uninstalled the target). Now, I've reinstalled bbswitch-lts/bbwsitch twice, but the /proc/acpi/bbswitch file is missing after several restarts. What am I doing wrong?

Lekensteyn commented 6 years ago

bbswitch is not loaded automatically, it is usually loaded via bumblebee. Alternative is to put it in /etc/modules-load.d/bbswitch.conf to make it load automatically at boot.

xtiansimon commented 6 years ago

I should have mentioned what I did to install bbswitch. The Arch Wiki page for Nvidia-xrun gives instructions for installation:

Load bbswitch module on boot # echo 'bbswitch ' > /etc/modules-load.d/bbswitch Disable the nvidia module on boot: # echo 'options bbswitch load_state=0 unload_state=1' /etc/modprobe.d/bbswitch.conf After a reebot, the nvidia card will be off. This can bee seen by querying bbswitch's status: $ cat /proc/acpi/bbswitch

The files in /etc/modules-load.d/bbswitch and bbswitch.conf have permissions 644.

The directory /proc/acpi/ has just two directries and a file: button, ibm, and wakeup.

dmesg and lsmod don't show anything for bbswitch.

And looking at the installed packages, pacman shows:

$ pacman -Qs bbswitch
local/bbswitch 0.8-83
local/bbswitch-lts 0.8.40

Right--as lsmod shows--the module isn't loading.

UPDATE, $ sudo modprobe bbswitch will load the module; The file is created $ cat /proc/acpi/bbswitch. I can't get the module to load on boot: # echo 'bbswitch ' > /etc/modules-load.d/bbswitch. I've followed the instructions from Arch wiki page on Nvidia-xrun. This uses bbswitch.conf to turn off the Nvidia card, but after loading bbswitch with modprobe, bbswitch reports: ...nvidia...refusing OFF

dmesg | grep bbswitch   
[  148.139465] bbswitch: version 0.8
[  148.139469] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.VID_
[  148.139475] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG_.VID_
[  148.139709] bbswitch: detected an Optimus _DSM function
[  148.139743] bbswitch: device 0000:01:00.0 is in use by driver 'nvidia', refusing OFF
[  148.139745] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[  214.617186] bbswitch: device 0000:01:00.0 is in use by driver 'nvidia', refusing OFF

I don't have an Xorg.conf file in use right now. This is what I have installed for nvidia, intel, mesa,

$ sudo pacman -Qs nvidia                                                                                                            ~
local/libvdpau 1.1.1+3+ga21bf7a-1
local/libxnvctrl 387.22-1
local/nvidia 387.34-3
local/nvidia-lts 387.34-1
local/nvidia-utils 387.34-1

$sudo pacman -Qs intel                                                                                                             ~
local/intel-ucode 20171117-1
local/mesa 17.2.5-1
local/xf86-video-intel 1:2.99.917+800+g37a682aa-1 (xorg-drivers)
Tknott95 commented 6 years ago

I have a config up and running after the issue (also using lts) if anything arises I can compare our packages installed. It looks like you had the missing piece to my issue as I may to yours.