You are not logged in.

#1 2013-03-26 15:37:57

bwrsandman
Member
Registered: 2012-06-04
Posts: 10

[SOLVED] Lenovo Y580 and bbswitch

Hello all,

After recent updates, I just can't get bumblebee to run properly.

When I run optirun or primusrun, I get this message:

$ optirun -vv --debug glxgears -info
[  387.681347] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[  387.681825] [INFO]Configured driver: nvidia
[  387.682149] [DEBUG]optirun version 3.1 starting...
[  387.682185] [DEBUG]Active configuration:
[  387.682192] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[  387.682200] [DEBUG] X display: :8
[  387.682206] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-bumblebee:/usr/lib32/nvidia-bumblebee
[  387.682213] [DEBUG] Socket path: /var/run/bumblebee.socket
[  387.682220] [DEBUG] Accel/display bridge: auto
[  387.682227] [DEBUG] VGL Compression: proxy
[  387.682301] [DEBUG]Using auto-detected bridge virtualgl
[  387.705356] [INFO]Response: No - error: [XORG] (EE) NVIDIA(0): Failed to initialize the NVIDIA GPU at PCI:1:0:0.  Please

[  387.705392] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(0): Failed to initialize the NVIDIA GPU at PCI:1:0:0.  Please

[  387.705404] [DEBUG]Socket closed.
[  387.705436] [ERROR]Aborting because fallback start is disabled.
[  387.705446] [DEBUG]Killing all remaining processes.

When checking the status of bumblebeed, I see that it cannot load the bbswitch module

# systemctl status bumblebeed -n 20
bumblebeed.service - Bumblebee C Daemon
	  Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled)
	  Active: active (running) since Tue 2013-03-26 11:27:52 EDT; 55s ago
	Main PID: 1507 (bumblebeed)
	  CGroup: name=systemd:/system/bumblebeed.service
		  └─1507 /usr/sbin/bumblebeed

Mar 26 11:27:52 ArchLenovo systemd[1]: Starting Bumblebee C Daemon...
Mar 26 11:27:52 ArchLenovo systemd[1]: Started Bumblebee C Daemon.
Mar 26 11:27:52 ArchLenovo bumblebeed[1507]: modprobe: ERROR: could not insert 'bbswitch': No such device
Mar 26 11:27:52 ArchLenovo bumblebeed[1507]: [  647.374844] [ERROR]Module bbswitch could not be loaded (timeout?)
Mar 26 11:27:52 ArchLenovo bumblebeed[1507]: [  647.374882] [WARN]No switching method available. The dedicated card will always be on.
Mar 26 11:27:52 ArchLenovo bumblebeed[1507]: [  647.377192] [INFO]/usr/sbin/bumblebeed 3.1 started
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511738] [WARN][XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511768] [WARN][XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511799] [WARN][XORG] (WW) NVIDIA: This server has an unsupported input driver ABI version (have 19.1, need < 19.0).  The drive...e strangely.
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511827] [ERROR][XORG] (EE) NVIDIA(0): Failed to initialize the NVIDIA GPU at PCI:1:0:0.  Please
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511835] [ERROR][XORG] (EE) NVIDIA(0):     check your system's kernel log for additional error
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511841] [ERROR][XORG] (EE) NVIDIA(0):     messages and refer to Chapter 8: Common Problems in the
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511846] [ERROR][XORG] (EE) NVIDIA(0):     README for additional information.
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511852] [ERROR][XORG] (EE) NVIDIA(0): Failed to initialize the NVIDIA graphics device!
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511857] [ERROR][XORG] (EE) NVIDIA(0): Failing initialization of X screen 0
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511863] [ERROR][XORG] (EE) Screen(s) found, but none have a usable configuration.
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511869] [ERROR][XORG] (EE)
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511878] [ERROR][XORG] (EE) Please also check the log file at "/var/log/Xorg.8.log" for additional information.
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511884] [ERROR][XORG] (EE)
Mar 26 11:28:42 ArchLenovo bumblebeed[1507]: [  697.511892] [ERROR]X did not start properly

As far as I can tell, there is no bbswitch module.

cat /proc/acpi/bbswitch 
cat: /proc/acpi/bbswitch: No such file or directory

And bbswitch can't find a handle for my Nvidia card

$ dmesg | grep bbswitch
[   15.578006] bbswitch: version 0.6
[   15.578017] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[   15.578024] bbswitch: cannot find ACPI handle for VGA device 0000:01:00.0
[   15.578028] bbswitch: No discrete VGA device found

Here's my setup.

nvidia 313.26-2
nvidia-utils-bumblebee 313.26-2
bbswitch 0.6-1
primus-git 20130325-1
bumblebee 3.1-2
linux 3.8.4-1
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation Device 0fd4 (rev a1)

I have also tried with nvidia-bumblebee and bbswitch-git

Help is much appreciated.
Thanks

=====================

Solution:

Using ABS, retrieve the core/linux sources
add bumblebee.patch from https://bugzilla.kernel.org/attachment.cgi?id=89731
Edit the PKGBUILD to use the patch.
Compile, install and the bbswitch module should be present.

Last edited by bwrsandman (2013-03-26 19:55:16)

Offline

#2 2013-03-26 16:00:05

vilehost
Member
Registered: 2013-03-26
Posts: 6

Re: [SOLVED] Lenovo Y580 and bbswitch

install dkms versions of bbswitch and nvidia, i think you have to everytime a kernel update applies, atleast with the non-dkms versions.

after you install dkms-bbswitch modprobe it, then optirun will probably give you another error, about a mouse pointer probably, if it does, then you install the dkms-nvidia package.

that's what i do basically just rebuild everytime it breaks from kernel updates

im not positive but i think dkms versions automatically update their kernel modules or something

Last edited by vilehost (2013-03-26 16:06:14)

Offline

#3 2013-03-26 17:13:23

bwrsandman
Member
Registered: 2012-06-04
Posts: 10

Re: [SOLVED] Lenovo Y580 and bbswitch

vilehost wrote:

install dkms versions of bbswitch and nvidia, i think you have to everytime a kernel update applies, atleast with the non-dkms versions.

after you install dkms-bbswitch modprobe it, then optirun will probably give you another error, about a mouse pointer probably, if it does, then you install the dkms-nvidia package.

that's what i do basically just rebuild everytime it breaks from kernel updates

im not positive but i think dkms versions automatically update their kernel modules or something

Hmm... That doesn't seem to work. I installed dkms-bbswitch, rebooted and I still get:

modprobe: ERROR: could not insert 'bbswitch': No such device

Offline

#4 2013-03-26 17:30:48

vilehost
Member
Registered: 2013-03-26
Posts: 6

Re: [SOLVED] Lenovo Y580 and bbswitch

bwrsandman wrote:
vilehost wrote:

install dkms versions of bbswitch and nvidia, i think you have to everytime a kernel update applies, atleast with the non-dkms versions.

after you install dkms-bbswitch modprobe it, then optirun will probably give you another error, about a mouse pointer probably, if it does, then you install the dkms-nvidia package.

that's what i do basically just rebuild everytime it breaks from kernel updates

im not positive but i think dkms versions automatically update their kernel modules or something

Hmm... That doesn't seem to work. I installed dkms-bbswitch, rebooted and I still get:

modprobe: ERROR: could not insert 'bbswitch': No such device

what does bumblebeed report now

Offline

#5 2013-03-26 17:36:59

bwrsandman
Member
Registered: 2012-06-04
Posts: 10

Re: [SOLVED] Lenovo Y580 and bbswitch

vilehost wrote:
bwrsandman wrote:
vilehost wrote:

install dkms versions of bbswitch and nvidia, i think you have to everytime a kernel update applies, atleast with the non-dkms versions.

after you install dkms-bbswitch modprobe it, then optirun will probably give you another error, about a mouse pointer probably, if it does, then you install the dkms-nvidia package.

that's what i do basically just rebuild everytime it breaks from kernel updates

im not positive but i think dkms versions automatically update their kernel modules or something

Hmm... That doesn't seem to work. I installed dkms-bbswitch, rebooted and I still get:

modprobe: ERROR: could not insert 'bbswitch': No such device

what does bumblebeed report now

# bumblebeed --daemon
modprobe: ERROR: could not insert 'bbswitch': No such device

Same as before.
systemctl status is also the exact same.

Offline

#6 2013-03-26 17:45:59

vilehost
Member
Registered: 2013-03-26
Posts: 6

Re: [SOLVED] Lenovo Y580 and bbswitch

go ahead and install the nvidia-dkms package, modprobe nvidia then bumblebeed --daemon

if it still fails even after a reboot, revert back to the non-dkms versions after that, switch nvidia back to dkms first, then re bumblebeed --daemon and see if it gives a different error.

sorry i know these methods aren't really that clear, all i know is i get the problem every kernel update, everytime it'll give me a cannot access secondary gpu error, either a mouse pointer error, something about libgl, or nvidia not being found. then after i reinstall it usually works fine,

just out of curiosity what's your bumblebee.conf look like

Offline

#7 2013-03-26 17:52:46

bwrsandman
Member
Registered: 2012-06-04
Posts: 10

Re: [SOLVED] Lenovo Y580 and bbswitch

It's the newest default one, I just explicitly stated Driver=nvidia

/etc/bumblebee/bumblebee.conf

# Configuration file for Bumblebee. Values should **not** be put between quotes

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

## Client options. Will take effect on the next optirun executed.
[optirun]
# Acceleration/ rendering bridge, possible values are auto, virtualgl and
# primus.
Bridge=auto
# The method used for VirtualGL to transport frames between X servers.
# Possible values are proxy, jpeg, rgb, xv and yuv.
VGLTransport=proxy
# Should the program run under optirun even if Bumblebee server or nvidia card
# is not available?
AllowFallbackToIGC=false


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

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

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

Offline

#8 2013-03-26 17:55:56

vilehost
Member
Registered: 2013-03-26
Posts: 6

Re: [SOLVED] Lenovo Y580 and bbswitch

bwrsandman wrote:

It's the newest default one, I just explicitly stated Driver=nvidia

/etc/bumblebee/bumblebee.conf

# Configuration file for Bumblebee. Values should **not** be put between quotes

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

## Client options. Will take effect on the next optirun executed.
[optirun]
# Acceleration/ rendering bridge, possible values are auto, virtualgl and
# primus.
Bridge=auto
# The method used for VirtualGL to transport frames between X servers.
# Possible values are proxy, jpeg, rgb, xv and yuv.
VGLTransport=proxy
# Should the program run under optirun even if Bumblebee server or nvidia card
# is not available?
AllowFallbackToIGC=false


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

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

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

mightaswell go ahead and change pmmethod to bbswitch

Offline

#9 2013-03-26 18:06:09

bwrsandman
Member
Registered: 2012-06-04
Posts: 10

Re: [SOLVED] Lenovo Y580 and bbswitch

I tried with different configurations and changing the PMMethod, it still get the same problem:
Bumblebeed:

modprobe: ERROR: could not insert 'bbswitch': No such device

primusrun:

primus: fatal: Bumblebee daemon reported: error: [XORG] (EE) NVIDIA(0): Failed to initialize the NVIDIA GPU at PCI:1:0:0.

Offline

#10 2013-03-26 18:23:48

bwrsandman
Member
Registered: 2012-06-04
Posts: 10

Re: [SOLVED] Lenovo Y580 and bbswitch

bbswitch seems to be doing *something*

$ dmesg | grep -C 10 bbswitch
[   10.073553] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)
[   10.351703] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
[   10.445711] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[   10.472164] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[   10.697134] systemd-journald[206]: Received SIGUSR1
[   12.503173] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   12.503181] Bluetooth: BNEP socket layer initialized
[   12.551670] Bluetooth: RFCOMM TTY layer initialized
[   12.551691] Bluetooth: RFCOMM socket layer initialized
[   12.551694] Bluetooth: RFCOMM ver 1.11
[   15.393766] bbswitch: version 0.6
[   15.393772] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[   15.393775] bbswitch: cannot find ACPI handle for VGA device 0000:01:00.0
[   15.393777] bbswitch: No discrete VGA device found
[   15.790326] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S
[   15.797878] iwlwifi 0000:03:00.0: Radio type=0x2-0x0-0x0
[   16.163563] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S
[   16.171077] iwlwifi 0000:03:00.0: Radio type=0x2-0x0-0x0
[   16.370108] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   17.665495] wlan0: authenticate with 00:7c:56:57:d5:56
[   17.672306] wlan0: capabilities/regulatory prevented using AP HT/VHT configuration, downgraded
[   17.674555] wlan0: send auth to 00:7c:56:57:d5:56 (try 1/3)
[   17.677335] wlan0: authenticated
[   17.677817] wlan0: associate with 00:7c:56:57:d5:56 (try 1/3)
[   17.680604] wlan0: RX AssocResp from 00:7c:56:57:d5:56 (capab=0x411 status=0 aid=3)
[   17.686016] wlan0: associated
[   17.686065] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   29.542980] bbswitch: version 0.6
[   29.542992] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[   29.543000] bbswitch: cannot find ACPI handle for VGA device 0000:01:00.0
[   29.543006] bbswitch: No discrete VGA device found
[   32.617754] EXT4-fs (sda3): re-mounted. Opts: commit=0
[   33.507910] EXT4-fs (sda4): re-mounted. Opts: commit=0
[   33.510692] EXT4-fs (sda5): re-mounted. Opts: commit=0
[  270.481510] bbswitch: version 0.6
[  270.481522] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[  270.481530] bbswitch: cannot find ACPI handle for VGA device 0000:01:00.0
[  270.481536] bbswitch: No discrete VGA device found
[  293.510033] fuse init (API version 7.20)
[  315.604092] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[  315.604099] Bluetooth: HIDP socket layer initialized
[  358.739839] NVRM: failed to copy vbios to system memory.
[  358.746488] NVRM: RmInitAdapter failed! (0x30:0xffffffff:756)
[  358.746501] NVRM: rm_init_adapter(0) failed
[  363.321395] NVRM: failed to copy vbios to system memory.
[  363.325090] NVRM: RmInitAdapter failed! (0x30:0xffffffff:756)
[  363.325103] NVRM: rm_init_adapter(0) failed
[  375.845123] NVRM: failed to copy vbios to system memory.
[  375.847290] NVRM: RmInitAdapter failed! (0x30:0xffffffff:756)
[  375.847296] NVRM: rm_init_adapter(0) failed
[  416.286767] bbswitch: version 0.6
[  416.286777] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[  416.286783] bbswitch: cannot find ACPI handle for VGA device 0000:01:00.0
[  416.286787] bbswitch: No discrete VGA device found
[  421.303465] NVRM: failed to copy vbios to system memory.
[  421.305658] NVRM: RmInitAdapter failed! (0x30:0xffffffff:756)
[  421.305665] NVRM: rm_init_adapter(0) failed

Looks like it can't find an ACPI handle for my Nvidia card. I'm not sure what that means.

bbswitch: cannot find ACPI handle for VGA device 0000:01:00.0

Do I need the lenovo hack? I thought this issue was solved with linux 3.8.

Offline

#11 2013-03-26 19:51:23

bwrsandman
Member
Registered: 2012-06-04
Posts: 10

Re: [SOLVED] Lenovo Y580 and bbswitch

Solved by applying a patch to the kernel and compiling it using ABS and makepkg.

Offline

#12 2013-03-26 20:06:10

vilehost
Member
Registered: 2013-03-26
Posts: 6

Re: [SOLVED] Lenovo Y580 and bbswitch

bwrsandman wrote:

Solved by applying a patch to the kernel and compiling it using ABS and makepkg.


wow, is that the patch that's specifically for lenovo?

talk about inconvience, why would you need to patch it now if it was working before? had you already applied it to the previous kernel and thought it was obsolete in 3.8?

Offline

#13 2013-03-26 20:16:01

bwrsandman
Member
Registered: 2012-06-04
Posts: 10

Re: [SOLVED] Lenovo Y580 and bbswitch

Yes I had to since Linux 3.7

It's a missing dsm call in Linux nad one of the oldest bugs in the bumblebee issue tracker.
I too, thought it was obsolete in 3.8, but looks like the way acpi handles are handled is changing and the 3.9 will have the fix for this specific laptop.
More information here.

Offline

#14 2013-04-04 08:42:10

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: [SOLVED] Lenovo Y580 and bbswitch

3.8.5 kernel has the fix too.


LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King

Offline

Board footer

Powered by FluxBB