Problem in installing nvidia-bumblebee for steam

Hi,

This is not actually a “games” problem. But I could not find any topic about Graphics or so, so I posted it here:

I am trying to run Steam on my laptop which has a (unfortunately) Optimus driver. Well you all know the story, there is no native package by nVidia for Optimus…And running Steam’s good games needs a good graphic card.
So I tried to install bumblebee using this guide : https://en.opensuse.org/SDB:NVIDIA_Bumblebee But when I try : zypper in nvidia-bumblebee i get the following :


Loading repository data...
Reading installed packages...
Resolving package dependencies...


The following package is going to be upgraded:
  nvidia-bumblebee


1 package to upgrade.
Overall download size: 0 B. Already cached: 15.6 KiB  No additional space will be used or freed after the operation.
Continue? [y/n/? shows all options] (y): y
In cache nvidia-bumblebee-352.63-2.1.x86_64.rpm                                                                                                                                                                                           (1/1),  15.6 KiB (  885   B unpacked)
Checking for file conflicts: ............................................................................................................................................................................................................................................[done]
(1/1) Installing: nvidia-bumblebee-352.63-2.1 ...........................................................................................................................................................................................................................[done]
Additional rpm output:
converted 'http://us.download.nvidia.com/XFree86/Linux-x86_64/352.63/NVIDIA-Linux-x86_64-352.63.run' (ANSI_X3.4-1968) -> 'http://us.download.nvidia.com/XFree86/Linux-x86_64/352.63/NVIDIA-Linux-x86_64-352.63.run' (UTF-8)
--2016-01-17 15:51:06--  http://us.download.nvidia.com/XFree86/Linux-x86_64/352.63/NVIDIA-Linux-x86_64-352.63.run
Resolving us.download.nvidia.com (us.download.nvidia.com)... 72.247.8.178, 72.247.8.136
Connecting to us.download.nvidia.com (us.download.nvidia.com)|72.247.8.178|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 77647248 (74M) [application/octet-stream]
Saving to: 'NVIDIA-Linux-x86_64-352.63.run'

 Here it downloads the package]

check sums and md5 sums are ok
Creating directory NVIDIA-Linux-x86_64-352.63
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 352.63...........................................................................................................................................................................................................................................................
+ '' -x /usr/sbin/dkms ']'
+ /usr/sbin/dkms remove -m nvidia -v 346.72 --all --rpm_safe_upgrade


------------------------------
Deleting module version: 346.72
completely from the DKMS tree.
------------------------------
Done.




Output of nvidia-bumblebee-352.63-2.1.x86_64.rpm %posttrans script:
    + '' -x /usr/sbin/dkms ']'
    + /usr/sbin/dkms add -m nvidia -v 352.63 --rpm_safe_upgrade
    
    Creating symlink /var/lib/dkms/nvidia/352.63/source ->
                     /usr/src/nvidia-352.63
    
    DKMS: add completed.
    + /usr/sbin/dkms build -m nvidia -v 352.63
    Error! echo
    Your kernel headers for kernel 4.2.1-1.g9c7cacf-desktop cannot be found at
    /lib/modules/4.2.1-1.g9c7cacf-desktop/build or /lib/modules/4.2.1-1.g9c7cacf-desktop/source.
    + /usr/sbin/dkms install -m nvidia -v 352.63
    Error! echo
    Your kernel headers for kernel 4.2.1-1.g9c7cacf-desktop cannot be found at
    /lib/modules/4.2.1-1.g9c7cacf-desktop/build or /lib/modules/4.2.1-1.g9c7cacf-desktop/source.
    + popd




It seems it cannot find the kernel headers for my kernel which is 4.2.1.1. What should I do about the above? Note that I have the following kernel-source packages installed :


 # rpm -q kernel-source 
kernel-source-3.18.1-4.1.g15c2753.noarch
kernel-source-3.18.2-1.1.ga393f37.noarch
kernel-source-3.18.3-1.1.gc3e148f.noarch
kernel-source-3.18.6-1.1.gec2a744.noarch
kernel-source-3.19.0-2.1.g1133f88.noarch
kernel-source-3.19.0-5.1.g748552c.noarch
kernel-source-3.19.1-2.1.gc0946e9.noarch
kernel-source-3.19.3-1.1.gf10e7fc.noarch
kernel-source-3.19.4-1.1.g74c332b.noarch
kernel-source-4.0.0-2.1.g53b125b.noarch
kernel-source-4.0.0-4.1.g27299c0.noarch
kernel-source-4.0.4-2.1.g4f5e0d5.noarch
kernel-source-4.0.4-5.1.gac67377.noarch
kernel-source-4.1.0-1.1.gfcf8349.noarch
kernel-source-4.2.0-7.1.g2d05727.noarch
kernel-source-4.2.1-1.1.g9c7cacf.noarch
kernel-source-4.2.2-4.1.gad49492.noarch
kernel-source-4.2.3-2.1.g202286f.noarch
kernel-source-4.2.5-2.1.g0491388.noarch
kernel-source-4.3.0-1.1.g7b374a4.noarch
kernel-source-4.3.0-7.1.g66773be.noarch
kernel-source-4.3.0-17.1.g6a48ac7.noarch
kernel-source-4.3.0-23.1.gd3f999c.noarch
kernel-source-4.3.3-8.1.ga1b48ad.noarch
kernel-source-4.4.0-2.1.g368c53d.noarch

But I got nothing inside the folder which dkms is looking…what am I missing?

I also tried a couple of other stuff:

      aLuViAn-SuSe:~ # bumblebeed --debug
 4988.792770] [WARN]Could not open configuration file: /etc/bumblebee/bumblebee.conf
 4988.792785] [WARN]Using default configuration
 4988.793013] [INFO]Loading driver bbswitch (module bbswitch)
 4988.793099] [DEBUG]Process modprobe started, PID 6891.
modprobe: FATAL: Module bbswitch not found.
 4988.794219] [DEBUG]Process with PID 6891 returned code 1
 4988.794458] [ERROR]Module bbswitch could not be loaded (timeout?)
 4988.794464] [DEBUG]bbswitch is not available, perhaps you need to insmod it?
 4988.794469] [INFO]Skipping switcheroo PM method because it is not explicitly selected in the configuration.
 4988.794473] [WARN]No switching method available. The dedicated card will always be on.
 4988.794477] [DEBUG]Active configuration:
 4988.794480] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
 4988.794483] [DEBUG] X display: :8
 4988.794486] [DEBUG] LD_LIBRARY_PATH: 
 4988.794490] [DEBUG] Socket path: /var/run/bumblebee.socket
 4988.794493] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.DRIVER
 4988.794496] [DEBUG] xorg.conf.d dir: /etc/bumblebee/xorg.conf.d
 4988.794500] [DEBUG] ModulePath: 
 4988.794503] [DEBUG] GID name: bumblebee
 4988.794506] [DEBUG] Power method: auto
 4988.794509] [DEBUG] Stop X on exit: 0
 4988.794513] [DEBUG] Driver: nouveau
 4988.794516] [DEBUG] Driver module: nouveau
 4988.794519] [DEBUG] Card shutdown state: 0
 4988.794629] [DEBUG]Process /sbin/modprobe started, PID 6892.
 4988.794698] [DEBUG]Hiding stderr for execution of /sbin/modprobe
 4988.795862] [DEBUG]SIGCHILD received, but wait failed with No child processes
 4988.795876] [DEBUG]Configuration test passed.
 4988.796018] [INFO]bumblebeed 3.2.1 started
 4988.796058] [INFO]Initialization completed - now handling client requests

Also I tried to use optirun and primusrun under my own user (rather than root):


amir@aLuViAn-SuSe:~> optirun armagetronad 
 5443.574443] [WARN]Could not open configuration file: /etc/bumblebee/bumblebee.conf
 5443.574457] [WARN]Using default configuration
 5443.574482] [ERROR]You've no permission to communicate with the Bumblebee daemon. Try adding yourself to the 'bumblebee' group
 5443.574490] [ERROR]Could not connect to bumblebee daemon - is it running?

And steam cannot be run as root, also I’ve tried running optirun with the above game (I found it inside a repos. The good thing is it shows you which graphic card is using) under root user and it works, but again it shows Intel as my used VGA.

Any help is appreciated greatly.

By the error your are getting it looks like kernel-dev package is missing, try

zypper in kernel-devel

And try to install the driver again.

PS: I have it working locally with steam, after installing the driver I had to reinstall steam unfortunately, but I am on thumbelweed.

So, you’ve got 25 kernel-source packages installed. At ~700 MB each would make ~17GB. Before anything else I’d like to see output of


df -h

Well, each of these packages take about 50MB and not 700, my df -h looks fine:


Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        3.9G     0  3.9G   0% /dev
tmpfs           3.9G   57M  3.9G   2% /dev/shm
tmpfs           3.9G   11M  3.9G   1% /run
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda1       197G   46G  151G  23% /
/dev/sda2       473G  420G   53G  89% /home

actually kernel-devel installation cannot help:


zypper in kernel-devel
Loading repository data...
Reading installed packages...
Resolving package dependencies...


The following NEW package is going to be installed:
  kernel-devel-4.4.1-2.1.gddc5d70


1 new package to install.
Overall download size: 10.7 MiB. Already cached: 0 B  After the operation, additional 51.3 MiB will be used.
Continue? [y/n/? shows all options] (y):

As it seems, there is no devel package for my version of kernel, which is very odd, don’t have any ideas…