LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-04-2013, 01:48 PM   #1
n4rf
Member
 
Registered: Nov 2013
Location: Córdoba, Argentina
Distribution: Slackware64 14.2
Posts: 36

Rep: Reputation: Disabled
Question Bumblebee [Optimus] BBswitch wont load anymore


Hi, Im here because I have this particular situation. I tried to google but couldnt find an answer.

I have an ASUS N53SV laptop with a Geforce 540M with Nvidia Optimus technology.

I had installed bumblebee and It worked perfectly fine, until 2 days ago, In wich I have no clue, BBSwitch wont load, I see the Nvidia video card ON, sucking on my battery and heating up my computer.

Im runing Slackware 14.1 x86_64 with multilib enabled.

What really bothers me is that it was working perfectly fine, and put of the nowehere it stoped loading.

First time, I installed it following this guide (a month ago, right after Slackware14.1 released and clean install)

http://docs.slackware.com/howtos:har...nvidia_optimus


I even installed it enabling COMPAT32 (32bits compatibility on a 64bits system)

then, when I noticed It wasnt working I decided to reinstall it, no changes.

Then, reinstalled it without COMPAT32. Nothing

Then, I checked this:

https://github.com/Bumblebee-Project/bbswitch

Where I tried to:

Code:
# cat /proc/acpi/bbswitch
and echoes this:
Quote:
cat: /proc/acpi/bbswitch: No such file or directory
I wondered what happened..

So, I decided to download and reinstall Bbswitch..

Donloaded from here:
https://github.com/Bumblebee-Project/bbswitch

and following the instruction:

Code:
make
make install
make load
Code:
n4rf@ASUS:~\>> cd Downloads/
n4rf@ASUS:~/Downloads\>> cd bbswitch-master
n4rf@ASUS:~/Downloads/bbswitch-master\>> su
Password: 
root@ASUS:/home/n4rf/Downloads/bbswitch-master# make
make -C /lib/modules/3.10.17/build M="$(pwd)" modules
make[1]: Entering directory `/usr/src/linux-3.10.17'
  Building modules, stage 2.
  MODPOST 1 modules
make[1]: Leaving directory `/usr/src/linux-3.10.17'
root@ASUS:/home/n4rf/Downloads/bbswitch-master# make install
mkdir -p /lib/modules/3.10.17/misc/bbswitch
install -m 0755 -o root -g root bbswitch.ko /lib/modules/3.10.17/misc/bbswitch
depmod -a
root@ASUS:/home/n4rf/Downloads/bbswitch-master# make load
rmmod bbswitch
rmmod: ERROR: Module bbswitch is not currently loaded
make: [load] Error 1 (ignored)
insmod bbswitch.ko
root@ASUS:/home/n4rf/Downloads/bbswitch-master#
then

if I go:

Code:
# cat /proc/acpi/bbswitch  
0000:01:00.0 ON
Now it seems BBswitch is loaded..
but

I get this issue

Turn the card off, respectively on:

Code:
# tee /proc/acpi/bbswitch <<<OFF
# tee /proc/acpi/bbswitch <<<ON

If the card stays on when trying to disable it, you've probably forgotten to unload the driver,
Code:
$ dmesg |tail -1
bbswitch: device 0000:01:00.0 is in use by driver 'nouveau', refusing OFF

Do not attempt to load a driver while the card is off or the card won't be usable until the PCI configuration space has been recovered (for example, after writing the contents manually or rebooting).

If I go:

Code:
dmesg | grep -C 10 bbswitch
[   32.054778] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   35.414690] wlan0: authenticate with 1c:bd:b9:75:97:7c
[   35.436856] wlan0: send auth to 1c:bd:b9:75:97:7c (try 1/3)
[   35.439130] wlan0: authenticated
[   35.439154] ath9k 0000:03:00.0 wlan0: disabling HT as WMM/QoS is not supported by the AP
[   35.439157] ath9k 0000:03:00.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP
[   35.439904] wlan0: associate with 1c:bd:b9:75:97:7c (try 1/3)
[   35.442653] wlan0: RX AssocResp from 1c:bd:b9:75:97:7c (capab=0x411 status=0 aid=2)
[   35.442963] wlan0: associated
[   35.442976] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  844.568296] bbswitch: version 0.7
[  844.568306] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[  844.568313] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.GFX0
[  844.569080] bbswitch: detected an Optimus _DSM function
[  844.569094] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on

Code:
root@ASUS:/home/n4rf/Downloads/bbswitch-master# uname -a
Linux ASUS 3.10.17 #2 SMP Wed Oct 23 16:34:38 CDT 2013 x86_64 Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz GenuineIntel GNU/Linux

BUt, here is the BIG BUT!

If I reboot, BBswitch is NO LONGER LOADED NEITHER AVAILABLE!

Im back to this!


Code:
# cat /proc/acpi/bbswitch

Quote:
cat: /proc/acpi/bbswitch: No such file or directory
Any ideas????
 
Old 12-06-2013, 10:03 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member Response

Hi,

Try using 'su -';
Quote:
excerpt from 'man su';
-, -l, --login
Provide an environment similar to what the user would expect had the user logged in directly.

When - is used, it must be specified as the last su option. The other forms (-l and --login) do not have this restriction.
 
Old 10-09-2015, 05:34 AM   #3
saeiddtsouth
LQ Newbie
 
Registered: Oct 2015
Posts: 1

Rep: Reputation: Disabled
had the same problem in my Slackware 14.1
after installing bbswitch you need to blacklist nouveau or other drivers to prevent loading after boot.
create "/etc/modprobe.d/nouveau_blacklist.conf" file and write the following:

Quote:
blacklist nouveau
options nouveau modeset=0

blacklist nvidia

options bbswitch load_state=0
The first line will block the nouveau module from being loaded automatically during start-up. The module will still be able to be loaded manually by a user or by the X server. Thus, the second line is added, so that should the nouveau module be loaded, it will be prevented from doing a kernel modeset, allowing the module to be unloaded.The last line disables the card on boot time.
Now you will need to create an initial RAM disk (“initrd” for short). The initrd functions as a temporary root file system during the initial stage of the kernel booting, and it helps get the actual root system mounted when your system boots. Run this, as root:

Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh
This command will not actually do anything. It is informational only, and will output something like this - depending on your kernel version, your hardware configuration, the root filesystem you chose when you installed Slackware and so on:
Code:
#                                                                                                                       
# mkinitrd_command_generator.sh revision 1.45                                                                           
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:

mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sdb2 -m usb-storage:ehci-hcd:usbhid:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz
Run the script's suggested mkinitrd commandline (as root) to generate the initrd.gz image.
If you have installed LILO (the default bootloader of Slackware), then you will also need to make changes to its configuration file "/etc/lilo.conf" by adding a section to your Slackware entry as follows:

Code:
image = /boot/vmlinuz
  initrd = /boot/initrd.gz  # add this line so that lilo sees initrd.gz
  root = /dev/sda1
  label = Slackware
  read-only
After making the changes to /etc/lilo.conf you have to save the file and then run:

Code:
lilo -v
To make your changes permanent, then reboot.
To make sure that nouveau is not loaded run:

Code:
lsmod | grep nouveau

If you still see nouveau in the output, there is some problem and the driver is not unloaded successfully.
If "/proc/acpi/bbswitch" is not there load it by reinstalling or start bumblebeed by
Code:
 /etc/rc.d/rc.bumblebeed start
it should be there,Now turn off your card:
Code:
tee /proc/acpi/bbswitch <<< OFF
To see results after anu command you can use "dmesg". You should be good now...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] nVidia Optimus / Bumblebee not working; Unknown header type 7f flokofcgulls Slackware 14 07-24-2013 07:33 PM
[SOLVED] Nvidia Optimus and Bumblebee Project, Finally Working? codeman1234 Linux - Desktop 7 06-12-2013 07:01 AM
3.2.28 Generic Kernel in Slackware (with nvidia optimus, bumblebee) TommyC7 Linux - Kernel 2 09-07-2012 02:10 PM
LXer: Bumblebee 3.0 Released (Nvidia Optimus GPU Switching For Linux) LXer Syndicated Linux News 0 01-20-2012 08:30 PM
Slackbuilds for Bumblebee - Nvidia Optimus jimmy_page_89 Slackware 5 12-31-2011 07:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration