GithubHelp home page GithubHelp logo

bbswitch's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bbswitch's Issues

Bumblebee on Lenovo G780

Distro: Ubuntu 13.04
[ 57.413734] [ERROR]Cannot access secondary GPU - error: XORG No devices detected.

[ 57.413772] [ERROR]Aborting because fallback start is disabled.

help with a new distro issues?

Sorry to bother but I feel I am close to having bumblebee work. maybe. hehe. So maybe someone can give me some advice?

I am using centos 6 as my distro of choice. We use it where I work.

I installed the nvidia binary blob install. Then using Samsagax's suggestion, I was able to fix the 3d in my intel card. :)

So all the nvidia files are where the installer put them except for the conflicting files which have been moved to:

/usr/lib/nvidia-bumblebee/libGL.so
/usr/lib/nvidia-bumblebee/libGL.so.1
/usr/lib/nvidia-bumblebee/libGL.so.290.10
/usr/lib64/nvidia-bumblebee/libGL.so
/usr/lib64/nvidia-bumblebee/libGL.so.1
/usr/lib64/nvidia-bumblebee/libGL.so.290.10
/usr/lib64/nvidia-bumblebee/xorg/modules/extensions/libglx.so
/usr/lib64/nvidia-bumblebee/xorg/modules/extensions/libglx.so.290.10

I guessed at the configure options...

./configure CONF_DRIVER=nvidia CONF_LDPATH_NVIDIA=/usr/lib64:/usr/lib CONF_MODPATH_NVIDIA=/usr/lib64/nvidia-bumblebee/xorg/modules

when I try to start bumblebeed, i get errors in my /var/log/messages file.

Feb 9 20:49:44 localhost bumblebeed[5985]: Invalid configuration: no driver configured.
Feb 9 20:50:35 localhost bumblebeed[6059]: Invalid configuration: no driver configured.
Feb 9 21:01:16 localhost bumblebeed[6258]: Switching method 'bbswitch' is available and will be used.
Feb 9 21:01:16 localhost bumblebeed[6258]: Invalid configuration: no driver configured.

Maybe my configuration file is missing something or I needed to configure with more options before make? Any help or advice would be awesome. All this graphics stuff is so new to me.

handle hack doesnt work on 3.7.3-101.fc17.x86_64

Hi,

i once enabled the acpi handle hack and bbswitch and didn't care about it a long time. Some days ago i noticed that my notebook runs hotter than usually. So i looked for the acpi-handle-hack and found out it stopped working.

kernel log says:
[21434.927730] acpi_handle_hack: No ACPI handle found for discrete video card

i have installed the 0.0.2 version.
any suggestions?

greetings

Valentin

Error on install

Hi ,

After downloading bbswitch tar.gz and extracting it , I Tried to follow the instructions provided in the readme but I'm getting errors .

Could you please provide me with the exact instructions to execute for a successful installation I hope .

Thank you .

Machine does not need acpi-handle-hack

Hello Everyone,

i am running Fedora 17 with Kernel 3.4.5-2.fc17.x86_64 on a Lenovo IdeaPad Y570. On my way to disable the Nvidia graphics card i came upon this acpi-handle-hack to enable the bbswitch kernel module. So i downloaded and installed the acpi-handle-hack module. But, when loading the module nothing happens and dmesg says: "Machine does not need ACPI handle hack" :(.

Here are my module versions:
acpi-handle-hack, 0.0.1, 3.4.5-2.fc17.x86_64, x86_64: installed
bbswitch, 0.4.1, 3.4.5-2.fc17.x86_64, x86_64: installed

Any suggestions?

Can't build on 3.8.1-grsec

make -C /lib/modules/3.8.1-grsec/build M="$(pwd)" modules
rmake[1]: Entering directory `/usr/src/linux-3.8.1'
  CC [M]  /home/******/bbswitch-master/bbswitch.o
/home/******/bbswitch-master/bbswitch.c: In function ‘bbswitch_init’:
/home/******/bbswitch-master/bbswitch.c:428:5: error: assignment of member ‘notifier_call’ in read-only object
make[2]: *** [/home/******/bbswitch-master/bbswitch.o] Error 1
make[1]: *** [_module_/home/******/bbswitch-master] Error 2
make[1]: Leaving directory `/usr/src/linux-3.8.1'
make: *** [default] Error 2

Seems to be due to a grsecurity gcc plugin.

bbswitch makefile produces error

Hello,

I tried to install bbswitch on openSuse 12.1. After executing "make" (as normal user as well as su) I got the following error message:

make -C /lib/modules/3.1.9-1.4-desktop/build M="$(pwd)" modules
make: *** /lib/modules/3.1.9-1.4-desktop/build: Datei oder Verzeichnis nicht gefunden. Schluss.
make: *** [default] Fehler 2
(The second line is something like this: "File or directory not found")

If there are any ideas to solve this, they would be welcome...

Thanks,
hamiltonian

Kernel failure while loading module

I get a 'kernel oops' when I try to load the bbswitch module. I cloned the repo and followed the build instructions but I get an error when I'm trying to load the module by issuing

sudo make load

What happens is that I get switched to a virtual console where some kernel messages are displayed. The system also becomes unresponsive so I can't save the message. However, looking at this: http://pastebin.com/F2uk0nNQ , someone seem to have had the same issue. I get the exact same message (I think). I will try to capture the message in a few days.

System:
ASUS U36SD (Mobile Intel HM65 Express, Intel Core i7 2620M, NVIDIA GeForce GT 520M, ...)
OS: Ubuntu 11.10
Kernel: 3.0.0-15-generic

Linux 3.6 and bbswitch power on / off issues.

I recently upgraded to linux 3.6 out of the testing repo in ArchLinux and now bbswitch won't power on and off the card.
I've come from a working bumblebee installation on linux 3.5 and seems that maybe something's changed in the acpi setup.

Here's my dmesg: http://pastebin.archlinux.fr/450067

I have nvidia and nouveau blacklisted and all combinations of bbswitch module options yield the same result.

License of bbswitch

During license review of packaging bbswitch for official Debian repository, we've found that there isn't an indication of what license that bbswitch is used. Could you please give a clear statement, like adding a COPYING/LICENSE to the source?

Thank you very much.

Kernel WARNING on 3.9rc8

I've tried Ubuntu mainline kernel today, so basically this is quite untouched 3.9rc8, and I've seen this:

Apr 26 18:56:26 gandalf kernel: [   25.810663] bbswitch: module verification failed: signature and/or required key missing - tainting kernel
Apr 26 18:56:26 gandalf kernel: [   25.810881] bbswitch: version 0.6
Apr 26 18:56:26 gandalf kernel: [   25.810887] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.VGA_
Apr 26 18:56:26 gandalf kernel: [   25.810892] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.RP00.VGA_
Apr 26 18:56:26 gandalf kernel: [   25.810980] bbswitch: detected an Optimus _DSM function
Apr 26 18:56:26 gandalf kernel: [   25.810989] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
Apr 26 18:56:26 gandalf kernel: [   25.831148] bbswitch: disabling discrete graphics
Apr 26 18:56:26 gandalf kernel: [   25.831277] ------------[ cut here ]------------
Apr 26 18:56:26 gandalf kernel: [   25.831285] WARNING: at /home/apw/COD/linux/drivers/pci/pci.c:1397 pci_disable_device+0x90/0xa0()
Apr 26 18:56:26 gandalf kernel: [   25.831286] Hardware name: U43Jc
Apr 26 18:56:26 gandalf kernel: [   25.831288] Device pci
Apr 26 18:56:26 gandalf kernel: [   25.831288] disabling already-disabled device
Apr 26 18:56:26 gandalf kernel: [   25.831289] Modules linked in: bbswitch(OF) rfcomm bnep ext2 snd_hda_codec_hdmi uvcvideo snd_hda_codec_realtek videobuf2_vmalloc videobuf2_memops videobuf2_core videodev arc4 snd_hda_intel snd_hda_codec snd_hwdep snd_pcm coretemp snd_page_alloc ath9k kvm ath9k_common snd_seq_midi ath9k_hw snd_seq_midi_event snd_rawmidi snd_seq joydev ath snd_seq_device snd_timer mac80211 snd i915 btusb soundcore video microcode drm_kms_helper bluetooth cfg80211 drm i2c_algo_bit mac_hid mxm_wmi psmouse serio_raw intel_ips lpc_ich wmi mei asus_laptop sparse_keymap input_polldev lp parport ahci libahci atl1c
Apr 26 18:56:26 gandalf kernel: [   25.831328] Pid: 1419, comm: bumblebeed Tainted: GF          O 3.9.0-030900rc8-generic #201304211835
Apr 26 18:56:26 gandalf kernel: [   25.831330] Call Trace:
Apr 26 18:56:26 gandalf kernel: [   25.831338]  [<ffffffff8105a8cf>] warn_slowpath_common+0x7f/0xc0
Apr 26 18:56:26 gandalf kernel: [   25.831342]  [<ffffffffa00a03d0>] ? bbswitch_off+0x1e0/0x1e0 [bbswitch]
Apr 26 18:56:26 gandalf kernel: [   25.831345]  [<ffffffff8105a9c6>] warn_slowpath_fmt+0x46/0x50
Apr 26 18:56:26 gandalf kernel: [   25.831347]  [<ffffffff8138c160>] pci_disable_device+0x90/0xa0
Apr 26 18:56:26 gandalf kernel: [   25.831349]  [<ffffffffa00a02a5>] bbswitch_off+0xb5/0x1e0 [bbswitch]
Apr 26 18:56:26 gandalf kernel: [   25.831351]  [<ffffffffa00a0485>] bbswitch_proc_write+0xb5/0xd0 [bbswitch]
Apr 26 18:56:26 gandalf kernel: [   25.831355]  [<ffffffff81203bde>] proc_reg_write+0x7e/0xc0
Apr 26 18:56:26 gandalf kernel: [   25.831359]  [<ffffffff8119e613>] vfs_write+0xb3/0x180
Apr 26 18:56:26 gandalf kernel: [   25.831361]  [<ffffffff8119eab2>] sys_write+0x52/0xa0
Apr 26 18:56:26 gandalf kernel: [   25.831367]  [<ffffffff817089fe>] ? do_page_fault+0xe/0x10
Apr 26 18:56:26 gandalf kernel: [   25.831370]  [<ffffffff8170d41d>] system_call_fastpath+0x1a/0x1f
Apr 26 18:56:26 gandalf kernel: [   25.831371] ---[ end trace 50ad26fb23245cad ]---
Apr 26 18:56:26 gandalf kernel: [   25.843454] pci 0000:01:00.0: Refused to change power state, currently in D0
Apr 26 18:56:27 gandalf kernel: [   26.267750] pci 0000:01:00.0: power state changed by ACPI to D3cold

Is that something to worry about?

bbswitch disables keyboard brightness controls

First of all I apologise if this is not the place to report this. If it's not, tell me where it is and I'll happily submit it there.

I have an Asus UL80VT with an Nvidia G210M. AFAIK, no Optimus (I have to manually switch between cards in Windows). After fresh install of Linux Mint 15 Cinnamon edition, the Fn+F5 and Fn+F6 shows OSD but the brightness is not changed, and the nvidia card is turned on draining battery.

I installed bbswitch and it successfully turns off the discrete card, but i can no longer adjust the brightness using the fn keys. The "showkey" command shows that the ACPI events are not detected. I tested again after uninstalling bbswitch and the events are detected correctly.

Manually running the 'sudo setpci -s '00:02.0' F4.B=XX' command changes the brightness, so I guess that the only problem is that the fn+F5 and fn+F6 keys presses are somehow "masked" by bbswitch.

Is there any way to be able to use them again?

The relevant information is below. Please let me know if you need more info. Thanks in advance!

dmesg: http://pastebin.com/fCk9FS1f
Kernel version:
Linux martin-UL80VT 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Distro: Linux Mint 15 Cinnamon edition.

ACPI dump Info: http://pastebin.com/XLP5fYcZ

bbswitch precludes reboot on L502X (with workaround)

EDIT: CROSS-REPORTED ON LP:

https://bugs.launchpad.net/lpbugreporter/+bug/752542/comments/559

Hello,

I've been using bbswitch for a few months, but when I moved to Fedora 17, reboot stopped working. I finally found a solution ( see bug 862067 ).

Here is my system data:

dmesg | grep -C 10 bbswitch

[ 17.238420] usbcore: registered new interface driver uvcvideo
[ 17.238423] USB Video Class driver (1.1.1)
[ 19.429069] Adding 12287996k swap on /dev/sda7. Priority:0 extents:1 across:12287996k
[ 20.288849] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)
[ 20.288857] SELinux: initialized (dev sda6, type ext4), uses xattr
[ 20.318948] fuse init (API version 7.20)
[ 20.342840] SELinux: initialized (dev fusectl, type fusectl), uses genfs_contexts
[ 21.417739] SELinux: initialized (dev sda8, type fuseblk), uses genfs_contexts
[ 21.702554] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[ 21.740380] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 22.069109] bbswitch: version 0.5
[ 22.069116] bbswitch: Found integrated VGA device 0000:00:02.0: SB.PCI0.GFX0
[ 22.069122] bbswitch: Found discrete VGA device 0000:01:00.0: SB.PCI0.PEG0.PEGP
[ 22.069300] bbswitch: detected an Optimus _DSM function
[ 22.069306] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[ 22.192605] bbswitch: disabling discrete graphics
[ 22.203244] pci 0000:01:00.0: Refused to change power state, currently in D0
[ 22.248326] pci 0000:01:00.0: power state changed by ACPI to D3cold
[ 23.052063] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S
[ 23.059282] iwlwifi 0000:03:00.0: Radio type=0x0-0x0-0x3
[ 23.109036] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S
[ 23.116214] iwlwifi 0000:03:00.0: Radio type=0x0-0x0-0x3
[ 23.160124] Bluetooth: Core ver 2.16
[ 23.160180] NET: Registered protocol family 31
[ 23.160182] Bluetooth: HCI device and connection manager initialized
[ 23.160183] Bluetooth: HCI socket layer initialized

uname -a

Linux 3.6.7-4.fc17.x86_64 #1 SMP Tue Nov 20 19:40:01 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Distribution and version

Fedora 17 64bits

Xorg

Version : 1.12.3
Release : 2.fc17

Nouveau

Epoch : 1
Version : 0.0.16
Release : 37.20120306gitf5d1cd2.fc17

/proc/acpi/dump_info

0000:00:00.0 060000
0000:00:01.0 060400 SB.PCI0.PEG0
0000:00:02.0 030000 SB.PCI0.GFX0
0000:00:16.0 078000
0000:00:1a.0 0c0320 SB.PCI0.EHC2
0000:00:1b.0 040300 SB.PCI0.HDEF
0000:00:1c.0 060400 SB.PCI0.RP01
0000:00:1c.1 060400 SB.PCI0.RP02
0000:00:1c.3 060400 SB.PCI0.RP04
0000:00:1c.4 060400 SB.PCI0.RP05
0000:00:1c.5 060400 SB.PCI0.RP06
0000:00:1d.0 0c0320 SB.PCI0.EHC1
0000:00:1f.0 060100 SB.PCI0.LPCB
0000:00:1f.2 010601 SB.PCI0.SAT0
0000:00:1f.3 0c0500 SB.PCI0.SBUS
0000:01:00.0 030000 SB.PCI0.PEG0.PEGP
0000:03:00.0 028000 SB.PCI0.RP02.PXSX
0000:04:00.0 0c0330 SB.PCI0.RP04.PXSX
0000:06:00.0 020000 SB.PCI0.RP06.PXSX

Samsung QX412 no discreete card found

switched to bbswitch and get

[ 333.726718] bbswitch: No discrete VGA device found

lspci: 
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b4)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 04)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
01:00.0 3D controller: nVidia Corporation Device 1050 (rev a1)
02:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
04:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)

https://bugs.launchpad.net/lpbugreporter/+bug/752542/comments/470

crash bbswitch and update-initramfs issue

Hi everyone,

I have some issues during my kernel updates: update-initramfs just don't want to end and I need to stop the process. This issue started in the same time than the bbswitch crash. I noticed a bbswitch crash when I boot my computer, when I try to shutdown it and when I try to install or reinstall bumblebee.
This is the crash log:

[  168.707665] bbswitch: version 0.4.2
[  168.707671] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[  168.707677] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[  168.707854] bbswitch: detected an Optimus _DSM function
[  168.707861] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[  168.707869] BUG: unable to handle kernel paging request at ffff8802ffdc04d8
[  168.708616] IP: [<ffffffff810b14b8>] module_put+0x28/0x90
[  168.709381] PGD 1c0c063 PUD 0 
[  168.710205] Oops: 0002 [#1] SMP 
[  168.710961] CPU 7 
[  168.710969] Modules linked in: bbswitch(O) autofs4 parport_pc ppdev rfcomm bnep nfsd binfmt_misc nfs lockd fscache auth_rpcgss nfs_acl sunrpc snd_hda_codec_hdmi snd_hda_codec_idt coretemp kvm_intel kvm ghash_clmulni_intel cryptd dell_wmi sparse_keymap dell_laptop dcdbas snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi snd_rawmidi microcode snd_seq_midi_event rts5139(C) snd_seq uvcvideo videobuf2_core videodev videobuf2_vmalloc videobuf2_memops arc4 lpc_ich ath3k joydev i915 btusb drm_kms_helper bluetooth drm psmouse i2c_algo_bit ath9k serio_raw snd_timer snd_seq_device mac80211 ath9k_common ath9k_hw snd ath cfg80211 soundcore snd_page_alloc mei wmi video mac_hid lp parport hid_generic usbhid hid r8169
[  168.715565] 
[  168.716406] Pid: 4101, comm: modprobe Tainted: G         C O 3.5.0-21-generic #32-Ubuntu Dell Inc.          Inspiron 5720/0JVJ94
[  168.717302] RIP: 0010:[<ffffffff810b14b8>]  [<ffffffff810b14b8>] module_put+0x28/0x90
[  168.718214] RSP: 0018:ffff88018edb9f28  EFLAGS: 00010286
[  168.719115] RAX: 0000000140a004d0 RBX: ffffffffa066c100 RCX: 0000000000000112
[  168.720025] RDX: 0000000000000000 RSI: 0000000000000286 RDI: ffffffffa066c100
[  168.720938] RBP: ffff88018edb9f48 R08: 0000000000000000 R09: 0000000000000000
[  168.721902] R10: 0000000000000000 R11: 0000000000000006 R12: ffffffffa066c100
[  168.722817] R13: 0000000002451430 R14: 0000000000000000 R15: 000000000244a588
[  168.723729] FS:  00007f66e9a57700(0000) GS:ffff8801bf3c0000(0000) knlGS:0000000000000000
[  168.724654] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  168.725575] CR2: ffff8802ffdc04d8 CR3: 0000000194533000 CR4: 00000000001407e0
[  168.726524] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  168.727469] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  168.728406] Process modprobe (pid: 4101, threadinfo ffff88018edb8000, task ffff88019fb0dc00)
[  168.729374] Stack:
[  168.730418]  ffff88018edb9f48 ffffffffa066c100 0000000000000000 0000000002451430
[  168.731412]  ffff88018edb9f78 ffffffff810b5bbe 000000000244a588 000000000244a570
[  168.732403]  0000000002449080 0000000002451550 0000000002451430 ffffffff8168b969
[  168.733421] Call Trace:
[  168.734463]  [<ffffffff810b5bbe>] sys_init_module+0x11e/0x230
[  168.735487]  [<ffffffff8168b969>] system_call_fastpath+0x16/0x1b
[  168.736517] Code: 1f 40 00 55 48 89 e5 48 83 ec 20 48 89 5d e8 4c 89 65 f0 4c 89 6d f8 0f 1f 44 00 00 48 85 ff 49 89 fc 74 1c 48 8b 87 50 02 00 00 <65> 48 ff 40 08 4c 8b 6d 08 0f 1f 44 00 00 41 83 3c 24 02 74 3d 
[  168.739085] RIP  [<ffffffff810b14b8>] module_put+0x28/0x90
[  168.740271]  RSP <ffff88018edb9f28>
[  168.741795] CR2: ffff8802ffdc04d8
[  168.760055] ---[ end trace 8b86aa65bb0d0dbd ]---
uname -a
Linux savagnin 3.5.0-21-generic #32-Ubuntu SMP Tue Dec 11 18:51:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

tarball

Disabling the card aslo disables the touchpad!

Hello, thanks for the work you've done with bumblebee and bbswitch.
I've got an ASUS NS53sv with a NVIDIA® GeForce® GT 540M. I run Ubuntu 11.10 64bit with kernel 3.0.0-15-generic., my versoin of Xorg is 1:7.6+7ubuntu7 and i have no nvidia driver installed (I just use bbswitch to turn-off the card, I don't need optirun).
I installed the module with DKMS and then i manually run the command sudo tee /proc/acpi/bbswitch <<<OFF. For the first time under linux the led which shows if the nvdia card is on is working, and that's really great!
But I have a really strange problem, as soons as i run the command my touchpad stops working (but a usb connected mouse works fine).
I can't explain this behaviour, could you help me maybe?

If it can help this is the output of dmesg | grep -C 10 bbswitch:

[    3.563976] Refined TSC clocksource calibration: 1995.467 MHz.
[    3.563989] Switching to clocksource tsc
[    3.564840] hub 2-1:1.0: USB hub found
[    3.564937] hub 2-1:1.0: 6 ports detected
[    3.636054] usb 1-1.1: new full speed USB device number 3 using ehci_hcd
[    3.800009] usb 1-1.2: new high speed USB device number 4 using ehci_hcd
[    3.954358] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
[   21.714464] udevd[375]: starting version 173
[   21.805437] Adding 6346748k swap on /dev/sda6.  Priority:-1 extents:1 across:6346748k 
[   21.975967] lp: driver loaded but no devices found
[   22.018442] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.GFX0
[   22.018530] bbswitch: detected an Optimus _DSM function
[   22.018544] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[   22.220690] wmi: Mapper loaded
[   22.336222] type=1400 audit(1326570597.923:2): apparmor="STATUS" operation="profile_load" name="/sbin/dhclient" pid=909 comm="apparmor_parser"
[   22.336551] type=1400 audit(1326570597.923:3): apparmor="STATUS" operation="profile_load" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=909 comm="apparmor_parser"
[   22.336761] type=1400 audit(1326570597.923:4): apparmor="STATUS" operation="profile_load" name="/usr/lib/connman/scripts/dhclient-script" pid=909 comm="apparmor_parser"
[   22.338389] type=1400 audit(1326570597.927:5): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=911 comm="apparmor_parser"
[   22.338703] type=1400 audit(1326570597.927:6): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=911 comm="apparmor_parser"
[   22.338893] type=1400 audit(1326570597.927:7): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=911 comm="apparmor_parser"
[   22.339623] Bluetooth: Core ver 2.16
[   22.339640] NET: Registered protocol family 31
[   22.339641] Bluetooth: HCI device and connection manager initialized
--
[   30.160019] cfg80211:     (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[   30.160022] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[   30.160025] cfg80211:     (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[   30.160027] cfg80211:     (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)
[   30.179598] cfg80211: Found new beacon on frequency: 2472 MHz (Ch 13) on phy0
[   31.001769] EXT4-fs (sda5): re-mounted. Opts: errors=remount-ro,commit=600
[   31.308579] EXT4-fs (sda7): re-mounted. Opts: commit=600
[   31.480282] wlan0: IPv6 duplicate address fe80::e2b9:a5ff:fe44:fd53 detected!
[   39.673026] show_signal_msg: 33 callbacks suppressed
[   39.673030] python[3793]: segfault at 10 ip 000000000049c51b sp 00007fff070bd590 error 4 in python2.7[400000+233000]
[   49.022763] bbswitch: disabling discrete graphics
[   49.022866] bbswitch: Result of Optimus _DSM call: 01000059
[   49.037601] pci 0000:01:00.0: Refused to change power state, currently in D0
[   49.137730] pci 0000:01:00.0: power state changed by ACPI to D3
[   70.359030] usb 2-1.2: new low speed USB device number 3 using ehci_hcd
[   70.571607] input: Logitech USB Laser Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/input/input12
[   70.571701] generic-usb 0003:046D:C062.0001: input,hidraw0: USB HID v1.10 Mouse [Logitech USB Laser Mouse] on usb-0000:00:1d.0-1.2/input0
[   70.571717] usbcore: registered new interface driver usbhid
[   70.571718] usbhid: USB HID core driver
[  146.623783] keyboard: can't emulate rawmode for keycode 240
[  146.623809] keyboard: can't emulate rawmode for keycode 240
[  146.623820] asus_wmi: Unknown key 58 pressed

Thanks again for your great work!

bbswitch not permanent

Hi everyone,

Thanks for this great tool but i have a little issue.

tee /proc/acpi/bbswitch <<<OFF command works great. My card goes off.

But when i reboot my system and try to look my cards status with cat /proc/acpi/bbswitch it says cat: /proc/acpi/bbswitch: No such file or directory

I have to run

make
make load
tee /proc/acpi/bbswitch <<<OFF

again, to turn off the card. It's weird that i have to build again the bbswitch.

My system is Debian 6.0.5. And i'll be happy to share any required information.

after turn off nvidia card,acpi error occur

i use lenovo y460
os: ubuntu 10.04 x86_64

i want to turn off the nvidia card because i find my screen flicker .

there are repeat line occur in xorg.0.log

when use acpi_call or bbswitch there something wrong in the kernel.log, i gusee there are another software want to use the nvidia card after i turn it off.


Jan 18 16:18:54 wliment-laptop kernel: [ 3905.880785] ACPI Error: [^^^GFX0.DSWR] Namespace lookup failure, AE_NOT_FOUND (20110623/psargs-359)
Jan 18 16:18:54 wliment-laptop kernel: [ 3905.880797] ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_._Q79] (Node ffff8801b1063fa0), AE_NOT_FOUND (20110623/psparse-536)
Jan 18 16:18:54 wliment-laptop kernel: [ 3906.379986] ACPI Error: [^^^GFX0.DSWR] Namespace lookup failure, AE_NOT_FOUND (20110623/psargs-359)
Jan 18 16:18:54 wliment-laptop kernel: [ 3906.380009] ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_._Q79] (Node ffff8801b1063fa0), AE_NOT_FOUND (20110623/psparse-536)
Jan 18 16:19:08 wliment-laptop kernel: [ 3919.804801] ACPI Error: [^^^GFX0.DSWR] Namespace lookup failure, AE_NOT_FOUND (20110623/psargs-359)
Jan 18 16:19:08 wliment-laptop kernel: [ 3919.804814] ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_._Q79] (Node ffff8801b1063fa0), AE_NOT_FOUND (20110623/psparse-536)

bbswitch won't leave nvidia card turned ON on boot

Hello,

I'm trying to get my two external monitors to work with my Asus X93SM laptop.

I've followed the instructions in README.md on the module options to turn the card on, but dmesg still says

bbswitch: disabling discrete graphics

I have no problems with running Bumblebee:

$ optirun glxspheres

works like a charm (about 75 times faster).

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

also works: lshw detects the Nvidia card while ON, but not when I turn it OFF.

I've done the following:

# modprobe bbswitch load_state=1
# echo 'bbswitch load_state=1' >> /etc/modules && update-initramfs -u

After reboot:

$ dmesg | grep -C 10 bbswitch
[   11.508525] bbswitch: version 0.4.2
[   11.508531] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[   11.508536] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[   11.508600] bbswitch: detected an Optimus _DSM function
[   11.508606] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
...
[   14.026273] bbswitch: disabling discrete graphics
[   14.026437] bbswitch: Result of Optimus _DSM call: 11000059
[   14.040316] pci 0000:01:00.0: power state changed by ACPI to D3

$ cat /proc/acpi/bbswitch 
0000:01:00.0 OFF

One other thing that I've noticed is that when I have additional monitor connected to my display port it comes on when I run anything using optirun. But it remains off when I run tee /proc/acpi/bbswitch <<<ON.

My laptop is Asus X93SM

$ uname -a
Linux asusx 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

bbswitch dont work on Fedora 18 (Linux 3.7)

I test longtime bumblebee+bswitch combination, but without succes - discrete card is always powered.
I have executed command "tee /proc/acpi/bbswitch <<<OFF"
but "cat /proc/acpi/bbswitch" always shows "ON"

i get disabled discrete graphics card only with switcheroo

HOW can i debug bbswitch and help you ?

suspend not working with optirun

My info already on launchpad (qx412).
Steps to reproduce:
run optirun something
check whether card on or off
when on, try to suspend with KDE suspend
optirun something is required, of you only simple turn on the card, suspend works

SNAIL INSTALL

[uptikool@sunmon ~]$ echo OFF | sudo tee /proc/acpi/bbswitch
[sudo] password for uptikool: 
tee: /proc/acpi/bbswitch: No such file or directory
OFF
[uptikool@sunmon ~]$ echo ON | sudo tee /proc/acpi/bbswitch
tee: /proc/acpi/bbswitch: No such file or directory
ON
[uptikool@sunmon ~]$ dmesg | tail -n128 # to pastebin.com
[   21.240212] cfg80211: Calling CRDA for country: US
[   21.242155] Linux media interface: v0.10
[   21.245081] cfg80211: Regulatory domain changed to country: US
[   21.245083] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   21.245086] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   21.245087] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[   21.245089] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   21.245091] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   21.245093] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   21.245095] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[   21.303008] Linux video capture interface: v2.00
[   21.321480] uvcvideo: Found UVC 1.00 device Lenovo EasyCamera (5986:a006)
[   21.338294] input: Lenovo EasyCamera as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/input/input9
[   21.338549] usbcore: registered new interface driver uvcvideo
[   21.338566] USB Video Class driver (1.1.1)
[   21.405497] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[   21.637974] snd_hda_intel 0000:00:1b.0: irq 52 for MSI/MSI-X
[   21.852993] Adding 12287996k swap on /dev/sda2.  Priority:0 extents:1 across:12287996k 
[   22.059799] systemd-fsck[891]: /dev/sda5: Superblock last write time is in the future.
[   22.059819] systemd-fsck[891]: (by less than a day, probably due to the hardware clock being incorrectly set).  FIXED.
[   22.071371] systemd-fsck[891]: /dev/sda5: clean, 16102/6406144 files, 4897745/25599488 blocks
[   22.193162] systemd-fsck[886]: /dev/sda1: Superblock last write time is in the future.
[   22.193342] systemd-fsck[886]: (by less than a day, probably due to the hardware clock being incorrectly set).  FIXED.
[   22.200027] systemd-fsck[886]: /dev/sda1: clean, 252/32768 files, 24604/131072 blocks
[   22.315881] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
[   22.354210] ALSA sound/pci/hda/patch_realtek.c:1253 SKU: Nid=0x1d sku_cfg=0x40179a2d
[   22.354224] ALSA sound/pci/hda/patch_realtek.c:1255 SKU: port_connectivity=0x1
[   22.354242] ALSA sound/pci/hda/patch_realtek.c:1256 SKU: enable_pcbeep=0x1
[   22.354247] ALSA sound/pci/hda/patch_realtek.c:1257 SKU: check_sum=0x00000007
[   22.354253] ALSA sound/pci/hda/patch_realtek.c:1258 SKU: customization=0x0000009a
[   22.354258] ALSA sound/pci/hda/patch_realtek.c:1259 SKU: external_amp=0x5
[   22.354263] ALSA sound/pci/hda/patch_realtek.c:1260 SKU: platform_type=0x1
[   22.354268] ALSA sound/pci/hda/patch_realtek.c:1261 SKU: swap=0x0
[   22.354273] ALSA sound/pci/hda/patch_realtek.c:1262 SKU: override=0x1
[   22.354472] ALSA sound/pci/hda/hda_codec.c:4927 autoconfig: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[   22.354479] ALSA sound/pci/hda/hda_codec.c:4931    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   22.354486] ALSA sound/pci/hda/hda_codec.c:4935    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   22.354491] ALSA sound/pci/hda/hda_codec.c:4936    mono: mono_out=0x0
[   22.354496] ALSA sound/pci/hda/hda_codec.c:4939    dig-out=0x1e/0x0
[   22.354501] ALSA sound/pci/hda/hda_codec.c:4940    inputs:
[   22.354507] ALSA sound/pci/hda/hda_codec.c:4944  Internal Mic=0x12
[   22.354512] ALSA sound/pci/hda/hda_codec.c:4944  Mic=0x18
[   22.354517] ALSA sound/pci/hda/hda_codec.c:4946 
[   22.356131] ALSA sound/pci/hda/patch_realtek.c:1316 realtek: No valid SSID, checking pincfg 0x40179a2d for NID 0x1d
[   22.356138] ALSA sound/pci/hda/patch_realtek.c:1332 realtek: Enabling init ASM_ID=0x9a2d CODEC_ID=10ec0272
[   22.446763] HDMI status: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=0
[   22.446835] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
[   22.447163] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
[   22.447263] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[   22.604427] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[   22.938172] bluetoothd[951]: Bluetooth daemon 4.96
[   22.938373] bluetoothd[951]: bluetoothd[951]: Bluetooth daemon 4.96
[   22.971092] sandbox[952]: Starting sandbox[  OK  ]
[   23.081864] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[   23.094611] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   23.110177] NetworkManager[983]: <info> NetworkManager (version 0.9.4-3.git20120403.fc16) is starting...
[   23.110211] NetworkManager[983]: <info> Read config file /etc/NetworkManager/NetworkManager.conf
[   23.139151] abrtd[989]: Init complete, entering main loop
[   23.150752] mcelog[990]: mcelog read: No such device
[   23.153967] iptables.init[956]: iptables: Applying firewall rules: [  OK  ]
[   23.165055] /usr/sbin/crond[982]: (CRON) INFO (running with inotify support)
[   23.166861] acpid[999]: starting up with netlink and the input layer
[   23.167308] acpid[999]: skipping incomplete file /etc/acpi/events/videoconf
[   23.167483] acpid[999]: 1 rule loaded
[   23.167562] acpid[999]: waiting for events: event logging is off
[   23.206081] ip6tables.init[958]: ip6tables: Applying firewall rules: [  OK  ]
[   23.208670] smartd[1000]: smartd 5.42 2011-10-20 r3458 [x86_64-linux-3.3.6-3.fc16.x86_64] (local build)
[   23.208677] smartd[1000]: Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
[   23.208737] smartd[1000]: Opened configuration file /etc/smartd.conf
[   23.208841] smartd[1000]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices
[   23.209133] ntpd[1002]: ntpd [email protected] Thu Oct  6 15:37:57 UTC 2011 (1)
[   23.209200] ntpd[1002]: proto: precision = 0.047 usec
[   23.209236] ntpd[1002]: 0.0.0.0 c01d 0d kern kernel time sync enabled
[   23.209440] ntpd[1002]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
[   23.209670] ntpd[1002]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
[   23.213217] smartd[1000]: Device: /dev/sda, type changed from 'scsi' to 'sat'
[   23.213236] smartd[1000]: Device: /dev/sda [SAT], opened
[   23.213584] ntpd[1002]: Listen and drop on 1 v6wildcard :: UDP 123
[   23.213718] ntpd[1002]: Listen normally on 2 lo 127.0.0.1 UDP 123
[   23.213800] ntpd[1002]: Listen normally on 3 lo ::1 UDP 123
[   23.213873] ntpd[1002]: peers refreshed
[   23.213909] ntpd[1002]: Listening on routing socket on fd #20 for interface updates
[   23.214811] ntpd[1002]: Deferring DNS for 0.fedora.pool.ntp.org 1
[   23.217431] smartd[1000]: Device: /dev/sda [SAT], WDC WD7500BPVT-24HXZT1, S/N:WD-WX51A41H1447, WWN:5-0014ee-6568e92a7, FW:02.01A02, 750 GB
[   23.217931] ntpd[1002]: Deferring DNS for 1.fedora.pool.ntp.org 1
[   23.218087] ntpd[1002]: Deferring DNS for 2.fedora.pool.ntp.org 1
[   23.218184] ntpd[1002]: Deferring DNS for 3.fedora.pool.ntp.org 1
[   23.218285] ntpd[1002]: 0.0.0.0 c016 06 restart
[   23.218305] ntpd[1002]: 0.0.0.0 c012 02 freq_set kernel 2.956 PPM
[   23.218385] ntpd[1008]: signal_no_reset: signal 17 had flags 4000000
[   23.222952] smartd[1000]: Device: /dev/sda [SAT], found in smartd database: Western Digital Scorpio Blue Serial ATA (Adv. Format)
[   23.295343] bumblebeed[1011]: FATAL: Module bbswitch not found.
[   23.295777] bumblebeed[1011]: [ERROR]Module bbswitch could not be loaded (timeout?)
[   23.295786] bumblebeed[1011]: [WARN]No switching method available. The dedicated card will always be on.
[   23.315470] avahi-daemon[1012]: Found user 'avahi' (UID 70) and group 'avahi' (GID 70).
[   23.315676] avahi-daemon[1012]: Successfully dropped root privileges.
[   23.316160] avahi-daemon[1012]: avahi-daemon 0.6.30 starting up.
[   23.894456] tg3 0000:07:00.0: irq 53 for MSI/MSI-X
[   23.894462] tg3 0000:07:00.0: irq 54 for MSI/MSI-X
[   23.894466] tg3 0000:07:00.0: irq 55 for MSI/MSI-X
[   23.894471] tg3 0000:07:00.0: irq 56 for MSI/MSI-X
[   23.894475] tg3 0000:07:00.0: irq 57 for MSI/MSI-X
[   23.960227] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   23.960232] Bluetooth: BNEP filters: protocol multicast
[   23.982669] bumblebeed[1011]: [INFO]/opt/bumblebee/sbin/bumblebeed 3.0 started
[   24.012990] Bluetooth: RFCOMM TTY layer initialized
[   24.013006] Bluetooth: RFCOMM socket layer initialized
[   24.013012] Bluetooth: RFCOMM ver 1.11
[   24.355532] ADDRCONF(NETDEV_UP): em1: link is not ready
[   24.357246] iwlwifi 0000:08:00.0: L1 Enabled; Disabling L0S
[   24.423017] iwlwifi 0000:08:00.0: L1 Enabled; Disabling L0S
[   24.483185] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   24.907369] FS-Cache: Loaded
[   24.929130] FS-Cache: Netfs 'nfs' registered for caching
[   26.144490] wlan0: authenticate with 00:21:29:ac:f2:1f (try 1)
[   26.147941] wlan0: authenticated
[   26.161465] wlan0: associate with 00:21:29:ac:f2:1f (try 1)
[   26.164739] wlan0: RX AssocResp from 00:21:29:ac:f2:1f (capab=0x411 status=0 aid=2)
[   26.164746] wlan0: associated
[   26.164753] wlan0: moving STA 00:21:29:ac:f2:1f to state 1
[   26.164757] wlan0: moving STA 00:21:29:ac:f2:1f to state 2
[   26.169548] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   26.169619] wlan0: moving STA 00:21:29:ac:f2:1f to state 3
[   26.180686] lp: driver loaded but no devices found
[   26.184067] ppdev: user-space parallel port driver
[   37.088515] wlan0: no IPv6 routers present
[  128.801885] fuse init (API version 7.18)
[  143.459791] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[uptikool@sunmon ~]$ lspci | grep VGA # to pastebin.com
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: nVidia Corporation Device 0deb (rev a1)

3.9.4-1-ARCH kernel WARNING

bbswitch creates the following trace back with the following system configuration:

┌─[root]0[dexter][~]
└──╼ lspci -v
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
Subsystem: Lenovo Device 21f6
Flags: bus master, fast devsel, latency 0
Capabilities: [e0] Vendor Specific Information: Len=0c <?>

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00005000-00005fff
Memory behind bridge: f0000000-f10fffff
Prefetchable memory behind bridge: 00000000c0000000-00000000d1ffffff
Capabilities: [88] Subsystem: Lenovo Device 21f6
Capabilities: [80] Power Management version 3
Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [a0] Express Root Port (Slot+), MSI 00
Capabilities: [100] Virtual Channel
Capabilities: [140] Root Complex Link
Capabilities: [d94] #19
Kernel driver in use: pcieport
Kernel modules: shpchp

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
Subsystem: Lenovo Device 21f5
Flags: bus master, fast devsel, latency 0, IRQ 43
Memory at f1400000 (64-bit, non-prefetchable) [size=4M]
Memory at e0000000 (64-bit, prefetchable) [size=256M]
I/O ports at 6000 [size=64]
Expansion ROM at [disabled]
Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [d0] Power Management version 2
Capabilities: [a4] PCI Advanced Features
Kernel driver in use: i915
Kernel modules: i915

00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04) (prog-if 30 [XHCI])
Subsystem: Lenovo Device 21f6
Flags: bus master, medium devsel, latency 0, IRQ 44
Memory at f3920000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [70] Power Management version 2
Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
Kernel driver in use: xhci_hcd
Kernel modules: xhci_hcd

00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
Subsystem: Lenovo Device 21f6
Flags: bus master, fast devsel, latency 0, IRQ 46
Memory at f3935000 (64-bit, non-prefetchable) [size=16]
Capabilities: [50] Power Management version 3
Capabilities: [8c] MSI: Enable+ Count=1/1 Maskable- 64bit+
Kernel driver in use: mei
Kernel modules: mei

00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
Subsystem: Lenovo Device 21f3
Flags: bus master, fast devsel, latency 0, IRQ 255
Memory at f3900000 (32-bit, non-prefetchable) [size=128K]
Memory at f393b000 (32-bit, non-prefetchable) [size=4K]
I/O ports at 6080 [size=32]
Capabilities: [c8] Power Management version 2
Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [e0] PCI Advanced Features
Kernel modules: e1000e

00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) (prog-if 20 [EHCI])
Subsystem: Lenovo Device 21f6
Flags: bus master, medium devsel, latency 0, IRQ 16
Memory at f393a000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Debug port: BAR=1 offset=00a0
Capabilities: [98] PCI Advanced Features
Kernel driver in use: ehci-pci
Kernel modules: ehci_pci

00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
Subsystem: Lenovo Device 21f6
Flags: bus master, fast devsel, latency 0, IRQ 47
Memory at f3930000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
Capabilities: [100] Virtual Channel
Capabilities: [130] Root Complex Link
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
I/O behind bridge: 00004000-00004fff
Memory behind bridge: f3100000-f38fffff
Prefetchable memory behind bridge: 00000000f1800000-00000000f1ffffff
Capabilities: [40] Express Root Port (Slot+), MSI 00
Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
Capabilities: [90] Subsystem: Lenovo Device 21f6
Capabilities: [a0] Power Management version 2
Kernel driver in use: pcieport
Kernel modules: shpchp

00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
Memory behind bridge: f3000000-f30fffff
Capabilities: [40] Express Root Port (Slot+), MSI 00
Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
Capabilities: [90] Subsystem: Lenovo Device 21f6
Capabilities: [a0] Power Management version 2
Kernel driver in use: pcieport
Kernel modules: shpchp

00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=04, subordinate=0b, sec-latency=0
I/O behind bridge: 00003000-00003fff
Memory behind bridge: f2800000-f2ffffff
Prefetchable memory behind bridge: 00000000f2000000-00000000f27fffff
Capabilities: [40] Express Root Port (Slot+), MSI 00
Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
Capabilities: [90] Subsystem: Lenovo Device 21f6
Capabilities: [a0] Power Management version 2
Kernel driver in use: pcieport
Kernel modules: shpchp

00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) (prog-if 20 [EHCI])
Subsystem: Lenovo Device 21f6
Flags: bus master, medium devsel, latency 0, IRQ 23
Memory at f3939000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Debug port: BAR=1 offset=00a0
Capabilities: [98] PCI Advanced Features
Kernel driver in use: ehci-pci
Kernel modules: ehci_pci

00:1f.0 ISA bridge: Intel Corporation QM77 Express Chipset LPC Controller (rev 04)
Subsystem: Lenovo Device 21f6
Flags: bus master, medium devsel, latency 0
Capabilities: [e0] Vendor Specific Information: Len=0c <?>
Kernel driver in use: lpc_ich
Kernel modules: lpc_ich

00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode](rev 04) (prog-if 01 [AHCI 1.0])
Subsystem: Lenovo Device 21f6
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 45
I/O ports at 60a8 [size=8]
I/O ports at 60b4 [size=4]
I/O ports at 60a0 [size=8]
I/O ports at 60b0 [size=4]
I/O ports at 6060 [size=32]
Memory at f3938000 (32-bit, non-prefetchable) [size=2K]
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [70] Power Management version 3
Capabilities: [a8] SATA HBA v1.0
Capabilities: [b0] PCI Advanced Features
Kernel driver in use: ahci
Kernel modules: ahci

00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
Subsystem: Lenovo Device 21f6
Flags: medium devsel, IRQ 18
Memory at f3934000 (64-bit, non-prefetchable) [size=256]
I/O ports at efa0 [size=32]
Kernel driver in use: i801_smbus
Kernel modules: i2c_i801

01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [NVS 5400M](rev ff) (prog-if ff)
!!! Unknown header type 7f
Kernel modules: nouveau, nvidia

02:00.0 System peripheral: Ricoh Co Ltd MMC/SD Host Controller (rev 08) (prog-if 01)
Subsystem: Lenovo Device 21f6
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at f3100000 (32-bit, non-prefetchable) [size=256]
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Power Management version 3
Capabilities: [80] Express Endpoint, MSI 00
Capabilities: [100] Virtual Channel
Capabilities: [800] Advanced Error Reporting
Kernel driver in use: sdhci-pci
Kernel modules: sdhci_pci

03:00.0 Network controller: Intel Corporation Centrino Ultimate-N 6300 (rev 3e)
Subsystem: Intel Corporation Centrino Ultimate-N 6300 3x3 AGN
Flags: bus master, fast devsel, latency 0, IRQ 48
Memory at f3000000 (64-bit, non-prefetchable) [size=8K]
Capabilities: [c8] Power Management version 3
Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [e0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Device Serial Number 24-77-03-ff-ff-a6-d8-10
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi

┌─[root]0[dexter][~]
└──╼ uname -r
3.9.4-1-ARCH

[ 3.025456] bbswitch: detected an Optimus _DSM function
[ 3.025471] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[ 3.029526] bbswitch: disabling discrete graphics
[ 3.031046] ------------[ cut here ]------------
[ 3.031062] WARNING: at drivers/pci/pci.c:1393 pci_disable_device+0x84/0x90()
[ 3.031064] systemd-logind[448]: Watching system buttons on /dev/input/event3 (Power Button)
[ 3.031070] Hardware name: 2359CTO
[ 3.031073] Device pci
disabling already-disabled device
[ 3.031076] Modules linked in:
[ 3.031080] bbswitch(O) nls_cp437 vfat fat arc4 iTCO_wdt iTCO_vendor_support intel_powerclamp ip6t_REJECT coretemp crc32_pclmul crc32c_intel ghash_clmulni_intel iwldvm aesni_intel aes_x86_64 xt_hl xts mac80211 ip6t_rt lrw gf128mul ablk_helper cryptd nf_conntrack_ipv6 nf_defrag_ipv6 psmouse snd_hda_codec_realtek microcode serio_raw iwlwifi i2c_i801 ipt_REJECT pcspkr snd_hda_intel xt_LOG cfg80211 snd_hda_codec lpc_ich snd_hwdep mei xt_limit xt_tcpudp thermal wmi xt_addrtype tpm_tis battery tpm tpm_bios ac acpi_cpufreq mperf nf_conntrack_ipv4 nf_defrag_ipv4 evdev xt_conntrack processor ip6table_filter tun usbnet ip6_tables mii nf_conntrack_netbios_ns nf_conntrack_broadcast nf_nat_ftp nf_nat nf_conntrack_ftp nf_conntrack thinkpad_acpi iptable_filter nvram rfkill ip_tables uinput x_tables kvm_intel kvm
[ 3.031186] sg snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_timer snd soundcore jfs sr_mod cdrom sd_mod ahci libahci ehci_pci libata sdhci_pci ehci_hcd xhci_hcd sdhci scsi_mod mmc_core usbcore usb_common i915 video button i2c_algo_bit drm_kms_helper drm i2c_core intel_agp intel_gtt
[ 3.031239] Pid: 450, comm: bumblebeed Tainted: G W O 3.9.4-1-ARCH #1
[ 3.031242] Call Trace:
[ 3.031246] systemd-logind[448]: Watching system buttons on /dev/input/event4 (Video Bus)
[ 3.031255] [] warn_slowpath_common+0x70/0xa0
[ 3.031265] [] ? bbswitch_pm_handler+0x70/0x70 [bbswitch]
[ 3.031272] [] warn_slowpath_fmt+0x4c/0x50
[ 3.031279] [] ? bbswitch_pm_handler+0x70/0x70 [bbswitch]
[ 3.031287] [] ? __pci_set_master+0x2d/0xd0
[ 3.031295] [] pci_disable_device+0x84/0x90
[ 3.031303] [] bbswitch_off+0xa6/0x240 [bbswitch]
[ 3.031310] [] bbswitch_proc_write+0x9d/0xac [bbswitch]
[ 3.031321] [] proc_reg_write+0x71/0xb0
[ 3.031331] [] vfs_write+0x9b/0x170
[ 3.031338] [] sys_write+0x49/0xa0
[ 3.031347] [] system_call_fastpath+0x1a/0x1f
[ 3.031352] ---[ end trace b296bb176d6444f8 ]---

Kind Regards,
Edward.

dkms build bbswitch-0.4.2

If I try to make bbswitch with dkms I get this error

/home/x/linux/Bumblebee-Project-bbswitch-979fbcf # make -f Makefile.dkms
mkdir -p '/usr/src/bbswitch-0.4.2'
cp Makefile bbswitch.c '/usr/src/bbswitch-0.4.2'
sed 's/#MODULE_VERSION#/0.4.2/' dkms/dkms.conf > '/usr/src/bbswitch-0.4.2/dkms.conf'
dkms build 'bbswitch/0.4.2'

Error! Invalid number of parameters passed.
Usage: build -m -v
make: *** [build] Error 1

Additional info

dkms --version

dkms: 2.1.1.2

Regressions: Disactivation on boot and activation on lid close

Running Arch: kernel 3.7.4-1-ARCH

After updating to kernel vesion 3.7.4 I'm having the following issues:

  • On boot, the card disactivates and then is instantly activated again. nvidia and nouveau are blacklisted, bbswitch is initialised with load_state=0. Bumblebeed is started as a system service.
    Log output: http://sprunge.us/IGL
    I noticed mentions of VGA switcheroo and nouveau in there, not sure why..
  • When the lid of my laptop is shut, the card activates (this did not happen on 3.6 kernel versions) and then my laptop fan goes full blast and it gets very hot. On opening the lid the card stays activated. I have to restart the bumblebee daemon on reopening the lid via acpi's handler.sh which is not ideal.

User can't read bbswitch proc entry

The proc entry /proc/acpi/bbswitch is created with 0660 permissions, which doesn't allow my normal user to read it.

$ ls /proc/acpi/bbswitch
-rw-rw---- 1 root root 0 Jan 19 11:57 /proc/acpi/bbswitch

I built it with 0644, but is there some specific reason for 0660?

Difficulty installing hack on Raring Ringtail

A few months ago on my Lenovo y580 I used this hack to get my graphics card (gtx660m) working. Now that I updated to Raring bumblebee disappeared so I had to reinstall it. I installed but when I ran "optirun glxshperes" I get the error:

[ 2581.141664] [ERROR]Cannot access secondary GPU - error: XORG NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the

[ 2581.141729] [ERROR]Aborting because fallback start is disabled.
[/code]

I set off to try installing the bbswitch hack but when I execute "sudo dkms install -m acpi-handle-hack -v 0.0.2" I get:

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.8.0-11-generic KVERSION=3.8.0-11-generic >modname=acpi-handle-hack....(bad exit status: 2)
ERROR (dkms apport): binary package for acpi-handle-hack: 0.0.2 not found
Error! Bad return status for module build on kernel: 3.8.0-11-generic (i686)
Consult /var/lib/dkms/acpi-handle-hack/0.0.2/build/make.log for more information.

Also from "cat /var/log/kern.log | grep -A5 bbswitch" I get a part:

API mismatch: the client has the version 310.14, but this kernel module has the version >304.84. Please make sure that this kernel module and all NVIDIA driver components >have the same version.

So could the 310 drivers be causing it? I installed them because I couldn't get it to work with the old ones.

All help is very much appreciated!

Problems with the power management in Fedora

Hello, all!

First of all, I would like to thank everyone for the project, it is of real importance and I am really thankful for it. Keep up with the good job..

I am having some trouble with the whole disable-card and power management in Fedora 16.
My laptop is
The temperature is still high ( 65 º C with the card OFF and 78 º C and more with the card ON ) and sometimes the card is not really disabled on boot time, so I have to disable it manually. I compiled things from source following a tutorial found here http://fedoraforum.org/forum/showthread.php?t=272692

Did I miss something?

Anyway, here is some output that may be helpful..

http://pastebin.com/wVtvr8YW
http://pastebin.com/7btLE4a1

Typo that switch the idea in the doc

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670497

In README.md, one can read:

For example, if you want to have bbswitch disable the card immediately when
loading the module while disabling the card on unload, load the module with:
# modprobe bbswitch load_state=0 unload_state=1

Should not it be:

For example, if you want to have bbswitch disable the card immediately when
loading the module while enabling the card on unload, load the module with:
# modprobe bbswitch load_state=0 unload_state=1

not working on Dell XPS L502X

I have above mentioned laptop with nvidia 5xx series graphic card of 1 GB. I followed the guide from here :
https://wiki.ubuntu.com/Bumblebee

but unfortunately the bbswitch command is not found on my computer ( it is not installed rather ).

I want to save my laptop battery since I rarely use the nvidia graphic card, kindly suggest something.

Acer Aspire 5745g: No Suitable _DSM call found

[ 6.629192] bbswitch: Found discrete VGA device 0000:01:00.0: SB.PCI0.P0P2.PEGP
[ 6.629283] bbswitch: No suitable _DSM call found.

Linux bean_laptop 3.1.7-1-ARCH #1 SMP PREEMPT Wed Jan 4 08:11:16 CET 2012 x86_64 Intel(R) Core(TM) i5 CPU M 430 @ 2.27GHz GenuineIntel GNU/Linux

Arch Linux

01:00.0 VGA compatible controller: nVidia Corporation GT218 [GeForce 310M](rev a2)

Neither nouveau nor nvidia driver was loaded.

cat /proc/acpi/dump_info
0000:00:00.0 
0000:00:01.0 \_SB_.PCI0.P0P2
0000:00:02.0 \_SB_.PCI0.GFX0
0000:00:16.0 
0000:00:1a.0 \_SB_.PCI0.EHC2
0000:00:1b.0 \_SB_.PCI0.HDEF
0000:00:1c.0 \_SB_.PCI0.RP01
0000:00:1c.5 
0000:00:1d.0 \_SB_.PCI0.EHC1
0000:00:1e.0 \_SB_.PCI0.P0P1
0000:00:1f.0 \_SB_.PCI0.LPCB
0000:00:1f.2 \_SB_.PCI0.AHCI
0000:00:1f.3 \_SB_.PCI0.SBUS
0000:00:1f.6 
0000:01:00.0 \_SB_.PCI0.P0P2.PEGP
0000:01:00.1 \_SB_.PCI0.P0P2.PEGA
0000:02:00.0 \_SB_.PCI0.RP01.PXSX
0000:03:00.0 
0000:3f:00.0 
0000:3f:00.1 \_SB_.CPBG.IMCH
0000:3f:02.0 
0000:3f:02.1 
0000:3f:02.2 
0000:3f:02.3 

Link to ACPI information:
http://dl.dropbox.com/u/57246352/Acer-Aspire_5745G.tar.gz

hda-intel: spurious response

On video card that also have an audio output, the logs are spammed with hda-intel: spurious response when the card is disabled.

During enumeration of the devices, perhaps there is a way to restrict to the vga device only.

I need a machine for testing as I don't own a machine which has a nvidia card with audio (via HDMI?) output. You can check whether you've this output by running lspci -d10de: -nn. If you have two devices, it'll a PCI bus ID like 02:00.0 and 02:00.1.

Possible helpful links:
https://bugzilla.kernel.org/show_bug.cgi?id=43155
http://www.mail-archive.com/[email protected]/msg22444.html

Related informations:
Bumblebee-Project/Bumblebee#112

bbswitch won't work, while acpi_call does on Lenovo T410s

Hi all, I have been using acpi_call to power off and on the discrete card on my laptop; lately, I tried bbswitch out, but it does not work.
I'm on Linux 3.2.1; these are the successful commands with acpi_call:

\_SB.PCI0.PEG.VID._PS3 and \_SB.PCI0.PEG.VID._OFF to disable the card, and \_SB.PCI0.PEG.VID._ON and \_SB.PCI0.PEG.VID._PS0 to enable it.

bbswitch reports the following on dmesg when being loaded and trying to disable the card:

[   15.234248] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.VID_
[   15.234268] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG_.VID_
[   15.235092] bbswitch: detected an Optimus _DSM function
[   15.235102] bbswitch: disabling discrete graphics
[   15.236212] bbswitch: Result of Optimus _DSM call: 11000059
[   15.247048] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on

As it results, the discrete card is still on.

If you need more information to track the issue, please let me know.

Kernel 3.9 Dell XPS L502X dmesg report

[10553.012722] bbswitch: version 0.6
[10553.012735] bbswitch: Found integrated VGA device 0000:00:02.0: SB.PCI0.GFX0
[10553.012744] bbswitch: Found discrete VGA device 0000:01:00.0: SB.PCI0.PEG0.PEGP
[10553.013147] bbswitch: detected an Optimus _DSM function
[10553.013168] bbswitch: disabling discrete graphics
[10553.013302] ------------[ cut here ]------------
[10553.013308] WARNING: at drivers/pci/pci.c:1397 pci_disable_device+0x73/0x80()
[10553.013309] Hardware name: Dell System XPS L502X
[10553.013310] Device pci
[10553.013310] disabling already-disabled device
[10553.013311] Modules linked in: bbswitch(O+) 8021q garp mrp hid_generic hidp hid ebtable_nat ebtables tun bridge stp llc parport_pc ppdev lp parport rfcomm bnep snd_hrtimer nf_conntrack_ipv6 nf_defrag_ipv6 xt_hl pci_stub vboxpci(O) ip6t_rt vboxnetadp(O) vboxnetflt(O) ip6table_filter ip6_tables vboxdrv(O) ipt_MASQUERADE iptable_nat nf_nat_ipv4 cpufreq_powersave cpufreq_stats nf_nat cpufreq_userspace xt_CHECKSUM cpufreq_conservative iptable_mangle ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp iptable_filter binfmt_misc ip_tables x_tables uinput fuse nfsd auth_rpcgss nfs_acl nfs lockd fscache sunrpc loop ecryptfs snd_hda_codec_hdmi uvcvideo snd_hda_codec_realtek videobuf2_vmalloc videobuf2_memops videobuf2_core videodev intel_powerclamp coretemp kvm_intel kvm btusb bluetooth crc32c_intel joydev ghash_clmulni_intel aesni_intel aes_x86_64 ablk_helper snd_hda_intel i915 snd_hda_codec snd_hwdep drm_kms_helper drm snd_pcm_oss snd_mixer_oss snd_pcm cryptd xts lrw gf128mul arc4 snd_page_alloc iwldvm mac80211 dell_wmi iTCO_wdt iTCO_vendor_support snd_seq_midi snd_seq_midi_event sparse_keymap lpc_ich snd_rawmidi psmouse snd_seq iwlwifi snd_timer snd_seq_device snd cfg80211 ehci_pci rfkill soundcore serio_raw ehci_hcd pcspkr acpi_cpufreq mperf processor video ac battery dell_laptop wmi evdev dcdbas button i2c_algo_bit i2c_i801 mfd_core i2c_core microcode ext4 crc16 jbd2 mbcache btrfs xor raid6_pq crc32c libcrc32c zlib_deflate dm_mod nbd sg sr_mod sd_mod cdrom crc_t10dif ahci libahci xhci_hcd usbcore usb_common libata r8169 scsi_mod mii thermal thermal_sys
[10553.013385] Pid: 17319, comm: modprobe Tainted: G O 3.9.0 #16
[10553.013386] Call Trace:
[10553.013391] [] ? warn_slowpath_common+0x79/0xc0
[10553.013393] [] ? warn_slowpath_fmt+0x45/0x50
[10553.013395] [] ? pci_disable_device+0x73/0x80
[10553.013399] [] ? bbswitch_off+0x88/0x1c0 [bbswitch]
[10553.013402] [] ? bbswitch_init+0x249/0x1000 [bbswitch]
[10553.013406] [] ? 0xffffffffa00a6fff
[10553.013410] [] ? do_one_initcall+0x12a/0x180
[10553.013413] [] ? load_module+0x1b27/0x2480
[10553.013416] [] ? unset_module_init_ro_nx+0x80/0x80
[10553.013420] [] ? sys_init_module+0xb1/0xe0
[10553.013423] [] ? system_call_fastpath+0x16/0x1b
[10553.013424] ---[ end trace 97b11c71c9a4477b ]---
[10553.029114] pci 0000:01:00.0: Refused to change power state, currently in D0
[10553.065097] pci 0000:01:00.0: power state changed by ACPI to D3cold
[10553.065109] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is off

[SOLVED] Unable to build bbswitch-dkms 0.5 module in kernel 2.6.32-45

Hey,

today I received official package updates for my Ubuntu Lucid 10.04 LTS 32-bit installation via repositories.

My current kernel version is 2.6.32-45-generic-pae
DKMS version is 2.1.1.2

However, I'm unable to install bbswitch-dkms module in kernel. After several failures I downloaded the source and tried compile the bbswitch-dkms package without success, even with all build dependencies installed.

According to /var/lib/dkms/bbswitch/0.5/build/make.log, building of DKMS module fails to the following message:


DKMS make.log for bbswitch-0.5 for kernel 2.6.32-45-generic-pae (i686)
tu 26.2.2013 15.20.24 +0200
make[1]: Entering directory "/var/lib/dkms/bbswitch/0.5/build"
make -C /lib/modules/2.6.32-45-generic-pae/build M="$(pwd)" modules
make[2]: Entering directory "/usr/src/linux-headers-2.6.32-45-generic-pae"
CC [M] /var/lib/dkms/bbswitch/0.5/build/bbswitch.o
/var/lib/dkms/bbswitch/0.5/build/bbswitch.c: In function ‘acpi_call_dsm’:
/var/lib/dkms/bbswitch/0.5/build/bbswitch.c:120: error: implicit declaration of function ‘pr_warn’
make[3]: *** [/var/lib/dkms/bbswitch/0.5/build/bbswitch.o] Error 1
make[2]: *** [module/var/lib/dkms/bbswitch/0.5/build] Error 2
make[2]: Leaving directory "/usr/src/linux-headers-2.6.32-45-generic-pae"
make[1]: *** [default] Error 2
make[1]: Leaving directory "/var/lib/dkms/bbswitch/0.5/build"


This package (bbswitch-dkms) was acquired with the packages bumblebee and bumblebee-nvidia.

I have also tried installing bbswitch with command (At first, I unloaded the the module from kernel with command "rmmod bbswitch")


sudo make -f Makefile.dkms

mkdir -p '/usr/src/bbswitch-0.5'
cp Makefile bbswitch.c '/usr/src/bbswitch-0.5'
sed 's/#MODULE_VERSION#/0.5/' dkms/dkms.conf > '/usr/src/bbswitch-0.5/dkms.conf'
dkms build -m bbswitch -v 0.5

Error! DKMS tree does not contain: bbswitch-0.5
Build cannot continue without the proper tree.
make: *** [build] Error 2


Thus I have a partially broken DPKG.

With normal APT install procedures, the messages in terminal are


Setting up bbswitch-dkms (0.5-1~lucidppa1) ...
Removing old bbswitch-0.5 DKMS files...


Deleting module version: 0.5

completely from the DKMS tree.

Done.
Loading new bbswitch-0.5 DKMS files...
Building only for 2.6.32-45-generic-pae
Building initial module for 2.6.32-45-generic-pae

Error! Bad return status for module build on kernel: 2.6.32-45-generic-pae (i686)
Consult the make.log in the build directory
/var/lib/dkms/bbswitch/0.5/build/ for more information.
dpkg: error processing bbswitch-dkms (--configure):
subprocess installed post-installation script returned error exit status 10
dpkg: dependency problems prevent configuration of bumblebee:
bumblebee depends on bbswitch-dkms; however:
Package bbswitch-dkms is not configured yet.
dpkg: error processing bumblebee (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of bumblebee-nvidia:
bumblebee-nvidia depends on bumblebee (= 3.1-1~lucidppa1); however:
Package bumblebee is not configured yet.
dpkg: error processing bumblebee-nvidia (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
bbswitch-dkms
bumblebee
bumblebee-nvidia
E: Sub-process /usr/bin/dpkg returned an error code (1)


I suspect that the key error message is in make.log and states:

/var/lib/dkms/bbswitch/0.5/build/bbswitch.c:120: error: implicit declaration of function ‘pr_warn’

I wish someone could figure this out...thank you.

Greetings,
Fincer

BBSwitch doesn't work on Lenovo Z500: no /proc/acpi/bbswitch device

dmesg | grep -C 10 bbswitch:

[   54.704967] CPU5: Package power limit notification (total events = 1)
[   56.915557] CPU1: Package power limit normal
[   56.915560] CPU0: Package power limit normal
[   56.915565] CPU2: Package power limit normal
[   56.915567] CPU3: Package power limit normal
[   56.915571] CPU5: Package power limit normal
[   56.915574] CPU4: Package power limit normal
[   56.915578] CPU6: Package power limit normal
[   56.915580] CPU7: Package power limit normal
[   71.861317] cfg80211: Found new beacon on frequency: 2472 MHz (Ch 13) on phy0
[   80.936632] bbswitch: version 0.6
[   80.936639] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[   80.936644] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.VGA_
[   80.936655] bbswitch: failed to evaluate _DSM {0xF8,0xD8,0x86,0xA4,0xDA,0x0B,0x1B,0x47,0xA7,0x2B,0x60,0x42,0xA6,0xB5,0xBE,0xE0} 0x100 0x0 {0x00,0x00,0x00,0x00}: AE_NOT_FOUND
[   80.936668] bbswitch: failed to evaluate _DSM {0xA0,0xA0,0x95,0x9D,0x60,0x00,0x48,0x4D,0xB3,0x4D,0x7E,0x5F,0xEA,0x12,0x9F,0xD4} 0x102 0x0 {0x00,0x00,0x00,0x00}: AE_NOT_FOUND
[   80.936698] bbswitch: No suitable _DSM call found.
[   85.829748] nvidia: module license 'NVIDIA' taints kernel.
[   85.829751] Disabling lock debugging due to kernel taint
[   85.837391] nvidia 0000:01:00.0: enabling device (0006 -> 0007)
[   85.837403] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=none
[   85.837493] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  304.84  Wed Feb 27 04:58:49 PST 2013
[   87.098704] NVRM: failed to copy vbios to system memory.
[   87.101121] NVRM: RmInitAdapter failed! (0x30:0xffffffff:867)
[   87.101128] NVRM: rm_init_adapter(0) failed
[  206.773268] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[  228.090419] NVRM: failed to copy vbios to system memory.

uname -a :

Linux caspar 3.5.0-26-generic #42-Ubuntu SMP Fri Mar 8 23:18:20 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a

Distributor ID: LinuxMint
Description:    Linux Mint 14 Nadia
Release:    14
Codename:   nadia

Xorg version : X.Org X Server 1.13.0

NVIDIA driver version:

NVRM version: NVIDIA UNIX x86_64 Kernel Module  304.84  Wed Feb 27 04:58:49 PST 2013
GCC version:  gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) 

Tried on amilo XI 3650: module loading fails

NB : all information about this laptop (demidecode, iasl, ...) is already recorded on hybrid graphic database.

bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.P0P2.PEGP
BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [<ffffffffa00004ae>] acpi_call_dsm+0x102/0x224 [bbswitch]
PGD 0 
Oops: 0000 [#1] PREEMPT SMP 
CPU 0 
Modules linked in: bbswitch(O+)

Pid: 5030, comm: insmod Tainted: G           O 3.2.6 #44 FUJITSU SIEMENS AMILO Xi 3650/XY680   
RIP: 0010:[<ffffffffa00004ae>]  [<ffffffffa00004ae>] acpi_call_dsm+0x102/0x224 [bbswitch]
RSP: 0018:ffff8800b77e9da8  EFLAGS: 00010246
RAX: ffffffff81722a9b RBX: ffff8800b77e9db0 RCX: 0000000000000000
RDX: 0000000000000005 RSI: 0000000000013650 RDI: 0000000000000000
RBP: ffff8800b77e9ec8 R08: ffffea0002d2d100 R09: ffff8800b77e9ee4
R10: 0000000000000246 R11: ffffffffa00006d0 R12: 0000000000000000
R13: 0000000000000005 R14: ffffffffa0000bf0 R15: 0000000000000000
FS:  00007ff71580e700(0000) GS:ffff88013fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 0000000090054000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process insmod (pid: 5030, threadinfo ffff8800b77e8000, task ffff8800b4ac3f40)
Stack:
 000000000000faad 000000000000001a ffff8800b77e9ec8 0000000000000000
 00007ff716bc5180 ffffffffa0000bf0 0000000000000000 ffffffffa0000474
 ffff8800b77e9ee4 ffffffff81722a9b ffff8800b77e9de8 00000100b77e9e48
Call Trace:
 [<ffffffffa0000474>] ? acpi_call_dsm+0xc8/0x224 [bbswitch]
 [<ffffffff811cbe74>] ? pci_do_find_bus+0x3c/0x3c
 [<ffffffffa00005fa>] ? has_dsm_func+0x2a/0x4e [bbswitch]
 [<ffffffffa0003120>] ? bbswitch_init+0x120/0x26f [bbswitch]
 [<ffffffffa0003000>] ? 0xffffffffa0002fff
 [<ffffffff81000206>] ? do_one_initcall+0x76/0x128
 [<ffffffff81053e32>] ? load_module+0x1389/0x1513
 [<ffffffff8105403c>] ? sys_init_module+0x80/0x1c5
 [<ffffffff81583afb>] ? system_call_fastpath+0x16/0x1b
Code: 00 00 00 48 89 a5 30 ff ff ff 89 c7 48 83 ec 40 e8 10 8e 20 e1 48 8d 5c 24 0f 4c 89 e1 48 83 e3 f0 48 89 85 28 ff ff ff 45 31 e4 <0f> be 11 4a 8d 3c 23 31 c0 48 c7 c6 d5 06 00 a0 48 89 8d 20 ff 
RIP  [<ffffffffa00004ae>] acpi_call_dsm+0x102/0x224 [bbswitch]
 RSP <ffff8800b77e9da8>
CR2: 0000000000000000
---[ end trace f7341762b9e37be1 ]---

Lenovo Y570 missing dsm call

Update 2013-03-16: Linux 3.9-rc1 finally fixed the bug, everyone using 3.9-rc1 or newer can drop the acpi-handle-hack. ~L
Update 2013-03-29: Linux 3.8.5 also got the fix, you do not need any patching yourself for that kernel and newer!

Those who are looking for a solution, look at #2 (comment)


[17735.060526] bbswitch: No suitable _DSM call found.
[17773.660017] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.VGA_

Linux simon-fedora 3.1.6-1.fc16.x86_64 #1 SMP Wed Dec 21 22:41:17 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Running Fedora 16

01:00.0 VGA compatible controller: nVidia Corporation Device 0deb (rev a1) (prog-if 00 [VGA controller])
    Subsystem: Lenovo Device 3981
    Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Interrupt: pin A routed to IRQ 16
    Region 0: Memory at f0000000 (32-bit, non-prefetchable) [size=16M]
    Region 1: Memory at c0000000 (64-bit, prefetchable) [size=256M]
    Region 3: Memory at d0000000 (64-bit, prefetchable) [size=32M]
    Region 5: I/O ports at 2000 [size=128]
    Expansion ROM at f1000000 [disabled] [size=512K]
    Capabilities: <access denied>
    Kernel modules: nouveau, nvidiafb

bbswitch is preventing the nvidia module from loading on Fedora 19

I had to disable the bbswitch module 'dkms remove bbswitch/0.6.0 --all' on Fedora 19 and reboot in order to get the nvidia module to load.

Before disabling it I would get error messages like "nvidia: probe of 0000:01:00.0 failed with error -1" when trying to load the build/load the nvidia module.

This all worked as advertised before upgrading from F18 on the 3.9.4-200 kernel. Currently using Fedora 19 with 3.9.4-300.

To be clear, bbswitch is loading on boot, which leaves this in dmesg:

[   43.944823] bbswitch: version 0.6
[   43.944843] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[   43.944855] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[   43.944987] bbswitch: detected an Optimus _DSM function
[   43.944998] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[   43.951333] bbswitch: disabling discrete graphics
[   43.951472] ------------[ cut here ]------------
[   43.951478] WARNING: at drivers/pci/pci.c:1393 pci_disable_device+0x84/0x90()
[   43.951479] Hardware name: Aspire V3-571G
[   43.951480] Device pci
disabling already-disabled device
[   43.951481] Modules linked in:
[   43.951482]  bbswitch(OF) xt_LOG nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack snd_hda_codec_hdmi snd_hda_codec_realtek ath3k snd_hda_intel btusb bluetooth arc4 snd_hda_codec ath9k snd_hwdep acpi_cpufreq snd_seq snd_seq_device ath9k_common snd_pcm uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core ath9k_hw ath videodev snd_page_alloc mperf media snd_timer tg3 acer_wmi coretemp mac80211 snd ptp kvm_intel sparse_keymap pps_core sdhci_pci sdhci mmc_core cfg80211 kvm iTCO_wdt iTCO_vendor_support lpc_ich rfkill mei mfd_core i2c_i801 soundcore joydev microcode uinput binfmt_misc dm_crypt i915 crc32_pclmul crc32c_intel i2c_algo_bit drm_kms_helper ghash_clmulni_intel drm i2c_core video wmi [last unloaded: nvidia]
[   43.951503] Pid: 699, comm: bumblebeed Tainted: PF          O 3.9.4-300.fc19.x86_64 #1
[   43.951504] Call Trace:
[   43.951509]  [<ffffffff8105cda6>] warn_slowpath_common+0x66/0x80
[   43.951511]  [<ffffffff8105ce0c>] warn_slowpath_fmt+0x4c/0x50
[   43.951514]  [<ffffffff8131b06d>] ? __pci_set_master+0x2d/0xd0
[   43.951515]  [<ffffffff8131d9f4>] pci_disable_device+0x84/0x90
[   43.951519]  [<ffffffffa05381f6>] bbswitch_off+0xa6/0x240 [bbswitch]
[   43.951521]  [<ffffffffa05385cd>] bbswitch_proc_write+0xad/0xbc [bbswitch]
[   43.951523]  [<ffffffff811fe4d9>] proc_reg_write+0x69/0xa0
[   43.951527]  [<ffffffff81199caf>] vfs_write+0x9f/0x170
[   43.951528]  [<ffffffff81199fa9>] sys_write+0x49/0xa0
[   43.951531]  [<ffffffff8164e3d9>] system_call_fastpath+0x16/0x1b
[   43.951532] ---[ end trace 0841c3a5f469c176 ]---
[   43.961754] pci 0000:01:00.0: Refused to change power state, currently in D0
[   43.962507] pci 0000:01:00.0: power state changed by ACPI to D3cold

/proc/acpi/bbswitch shows the card is off and the nvidia driver does not load automatically.

After disabling bbswitch and rebooting (dms remove bbswitch/0.6.0 -all) the nvidia driver will load automatically.

I was also getting lots of weird errors about being unable to load the module, not having a supported card, and other strange stuff prior to disabling bbswitch when trying to run bumblebee-nvidia --debug --force. nouveau was blacklisted and not loaded. Now that it is built it seems I can manually load it if I turn the card on first.

Adding either of these to /etc/modprobe.d/bbwitch.conf and running dracut -f had no affect on the message above:
options bbswitch load_state=1 unload_state=1
options bbswitch load_state=-1 unload_state=-1

kernel panic?

Hi!
I use Fedora 19 (64 bit), bumblebee-nvidia (from repo), kernel 3.9.4-300. ASUS U35Jc (Core i3 + GT 310M)
Every time when system starts I get notification about problem (from default Fedora's bugreport utility). optirun works correctly.

There are only next information:
WARNING: at drivers/pci/pci.c:1393 pci_disable_device+0x84/0x90()
A kernel problem occurred, but your kernel has been tainted (flags:PFO). Kernel maintainers are unable to diagnose tainted reports. Tainted modules: bbswitch.

Screen attached.

Is this real problem with bbswitch module? If it is a problem I can get some useful info for you (only talk to me how to get it). I am C++ linux programmer, I know how to get core dump for applications, but never work with kernel modules and don't know how to get call stack from them.

screenshot from 2013-06-02 21 43 57

skip_optimus_dsm=1 also required for Lenovo T410

Hi!
I just tried to use bumblebee/bbswitch on a Lenovo T410 with openSUSE Tumbleweed x64.
Switching is only possible when bbswitch is loaded with the option skip_optimus_dsm=1.

In the case of openSUSE 12.3 the file to edit is /etc/modprobe.d/bbswitch.conf . To load the module on startup, bbswitch has to be added to INITRD_MODULES="bbswitch" in /etc/sysconfig/kernel. After that, its neccessary to update initrd by running the command mkinitrd in the terminal.

It took me a long time to figure this things out so it would be great if two things could be changed in the README:

  1. Adding the T410 to the list of computers which require skip_optimus_dsm=1
  2. Adding the mentioned way to get bbswitch loaded on startup and working for at least openSUSE. (I am not sure if this way is openSUSE specific, it maybe works for all distros which use systemd now)

Kind Regards
Martin

BBSwitch won't disable after restarting kernel

In reference to /issues/46 and Bumblebee-Project/Bumblebee#358, I would like to add few things.

Thank you to make bbswitch work with 3.8.x and I can confirm that.
There is some notes that need to be aware off.

After upgrading kernel or rebooting different kernel, bbswitch would run fine and able to turn off the nvidia/discrete graphics without any issue.
However, if we are rebooting the computer on the same kernel, bbswitch would not be able to turn the discrete card off.

I have tested this from 3.8.3-201 to the latest one 3.8.3-203.
I noticed that if I reboot on same kernel more than once, 3.8.3-203, the nvidia module will fail to compile, as such bumblebeed will fail to start, causing bbswitch losing ability to switch off the discrete card.

Working around this, reboot to 3.8.3-201, bbswitch will be working fine (cause nvidia module can be compiled ok and bumblebeed started). Turn off. Then reboot again to 3.8.3-203 to allow recompilation of nvidia modules.
But should it be the way?

If any of you need the test output, I will email you separately because it's kind of long.

In addition, once the bbswitch is on (ie. optirun glxspheres), it can't be turned off even the application is already exited, so restarting is the only option.

Thanks.

Bumblebee: problem with Gt 630m

I have toshiba p870 with nvidia optimus GT 630m running ubuntu 12.10, kernel 3.5.0-21-generic.

00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166](rev 09) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108 [GeForce GT 630M] [10de:0de9](rev a1) (prog-if 00 [VGA controller])

I have been trying to make my nvidia card work but no hope so I'm here to seek some help from you!! I have done every step that is available on this site even looked at some troubleshoots and tried them still no hope than I tried the hack method but it screwed up my OS!! I had to reinstall ubuntu again and went to install bumblebee, got the same issues with nvidia not working.
here is some info:
When rum optirun firefox
[ 1059.904867] [ERROR]Cannot access secondary GPU - error: XORG NVIDIA(0): Failed to initialize the NVIDIA GPU at PCI:1:0:0. Please
[ 1059.904898] [ERROR]Aborting because fallback start is disabled.
I changed DFP to CRT no luck

Xorg.8.log http://pastebin.com/f8u1t0EL
Bumblebee.conf http://pastebin.com/BjnvSnXd

Cheers!

FATAL: Error inserting bbswitch (/lib/modules/3.2.0-0.bpo.4-amd64/updates/dkms/bbswitch.ko): No such device

I am trying to use bbswitch on my debian system. I tried following instructions from:

https://github.com/Bumblebee-Project/bbswitch#reporting-bugs

I initially reported the issue as:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707783

Most of the information can be found at:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707783#17

I hope this is enough to diagnosticate the issue.

Thanks much

Compatibility with Linux 3.8

On Linux 3.8, the card is not turned off on a fresh boot. The kernel log reads this on Linux 3.8 (at least v3.8-rc5-218-ga56e160, likely the final 3.8 too)

Feb 13 18:14:32 al kernel: bbswitch: version 0.5
Feb 13 18:14:32 al kernel: bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
Feb 13 18:14:32 al kernel: bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.P0P2.PEGP
Feb 13 18:14:32 al kernel: bbswitch: detected an Optimus _DSM function
Feb 13 18:14:32 al kernel: bbswitch: disabling discrete graphics
Feb 13 18:14:32 al kernel: pci 0000:01:00.0: Refused to change power state, currently in D0
Feb 13 18:14:32 al kernel: ACPI: Cannot transition to non-D0 state from D3
Feb 13 18:14:32 al kernel: bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on

This happens because the initial device state is unknown (ACPI_STATE_UNKNOWN). A workaround is implemented in:

  • 5593d95 Linux 3.8 compatibility hack

However, that was a workaround. A patch for Linux is around in mainline now:

commit b3785492268f9f3cdaa9722facb84b266dcf8bf6
Author: Rafael J. Wysocki <[email protected]>
Date:   Fri Feb 1 23:43:02 2013 +0100

    ACPI / PM: Do not power manage devices in unknown initial states

I need to ping Rafael when 3.9-rc1 is out, then a backport to 3.8 will be made.

Allow switching bios to discrete card on next reboot

Hi everyone,
first of all thanks a lot for your work on that. I have myself maintained a bit of time the special sony-laptop-zseries module [1], a replacement for the in-kernel sony-laptop module, to allow switching between graphics cards.

Most of the added functionality that was in the sony-laptop-zseries modules has now been included in the development branch of sony-laptop [2], but not all, namely the discrete gpu switching. For that I was planning to use bbswitch.

Unfortunately, it seems that the inner workings of my laptop (Sony Z11 old series VGN-Z11) and many others are a bit different. We have a hardware switch Stamina-Speed, which is now also recognized by the sony-laptop module and exported as acppi event.

Using bbswitch I can turn on and off the nvidia card, but the actual graphic output cannot be switched by that, or at least I haven't found out how. The terminal, the kernel, always boots into intel graphics mode.

To give you an idea how it worked before:

  • I added acpi_osi="!Windows 2006" to the kernel boot parameter: this is essential (as far as I know)
  • then, when turning the speed-stamina switch to speed or stamina resp, on the next reboot already the bios worked with the respective card, thus also linux of course.
  • When I keep this parameter and boot up into linux the nvidia card is completely disabled, i.e., does not show up in the lspci, nor can bbswitch find it

I tried unloading the module with the unload_state set to 1, but that didn't help either.

It would be great if one could switch on/off the actual output of the card, too.

Here the additional information as requested:

[   21.380889] bbswitch: version 0.4.2
[   21.382324] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.OVGA
[   21.383784] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEGP.DGPU
[   21.385352] bbswitch: detected a nVidia _DSM function
[   21.386769] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
...
[  124.713535] usbcore: registered new interface driver btusb
[  176.484079] usb 8-2: USB disconnect, device number 2
[  206.200313] bbswitch: disabling discrete graphics
[  206.216082] pci 0000:01:00.0: power state changed by ACPI to D3
[  206.230006] bbswitch: Result of _DSM call for OFF: 00000000
uname -a
Linux mithrandir 3.4.0+ #68 SMP PREEMPT Mon May 21 22:35:57 JST 2012 x86_64 GNU/Linux

Debian/unstable up to date, kernel build from git

xserver-xorg: 1:7.6+13 (Debian)
from xorg.0.log: X.Org X Server 1.12.1.902 (1.12.2 RC 2)
module intel: compiled for 1.12.1, module version = 2.18.0

/proc/acpi/dump_info:
0000:00:00.0 060000 
0000:00:01.0 060400 \_SB_.PCI0.PEGP
0000:00:02.0 030000 \_SB_.PCI0.OVGA
0000:00:19.0 020000 \_SB_.PCI0.LANC
0000:00:1a.0 0c0300 \_SB_.PCI0.UHC3
0000:00:1a.1 0c0300 \_SB_.PCI0.UHC4
0000:00:1a.2 0c0300 \_SB_.PCI0.UHC5
0000:00:1a.7 0c0320 \_SB_.PCI0.EHC2
0000:00:1b.0 040300 
0000:00:1c.0 060400 \_SB_.PCI0.EXP1
0000:00:1c.1 060400 \_SB_.PCI0.EXP2
0000:00:1c.3 060400 \_SB_.PCI0.EXP4
0000:00:1d.0 0c0300 \_SB_.PCI0.UHC0
0000:00:1d.1 0c0300 \_SB_.PCI0.UHC1
0000:00:1d.2 0c0300 \_SB_.PCI0.UHC2
0000:00:1d.7 0c0320 \_SB_.PCI0.EHC1
0000:00:1e.0 060401 \_SB_.PCI0.P32_
0000:00:1f.0 060100 \_SB_.PCI0.LPC_
0000:00:1f.2 010601 \_SB_.PCI0.SAT0
0000:00:1f.3 0c0500 \_SB_.PCI0.SBUS
0000:01:00.0 030000 \_SB_.PCI0.PEGP.DGPU
0000:06:00.0 028000 \_SB_.PCI0.EXP2.WLAN
0000:0b:04.0 060700 \_SB_.PCI0.P32_.CBC0
0000:0b:04.1 0c0010 
0000:0b:04.2 080500 
0000:0b:04.4 088000 

Links
[1] sony-laptop-zseries adapted module code: http://gitorious.org/sony-laptop-zseries/sony-laptop-zseries/blobs/master/sony-laptop.c
[2] kernel driver development tree for sony-laptop: http://git.kamineko.org/cgi-bin/gitweb.cgi?p=linux-sony-2.6.git;a=summary

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.