Cuda Toolkit and Bumblebee

Hi everybody,

I’m quite new to Opensuse and also to linux, but I’ve read a lot about it, so i decided i wanted to learn it from the ground. I’ve started this year with it, and now I’m having a problem with “Bumblebee and Cuda Toolkit”.

I’ve been reading a lot and for the bumblebee installation i followed the stepts from this site Smithfarm - the Brain: openSUSE 12.3: How to install ‘bumblebee’ for NVIDIA Optimus VGA . i’ve gotten it working, but then after i installed “Cuda toolkit” everything went wrong and i have not been able to solved it.

the output of lspci gives:

01:00.0 VGA compatible controller: NVIDIA Corporation Device 1058 (rev ff) (prog-if ff)
** !!! Unknown header type 7f**

but when i kill Xserver and then write **Xorg -config **it recongnized the drivers but it encounters a problem **“Number of created screems dpes mpt ,match number of detected devices”,**so I cannot start the Xserver with the new config file.

Looks like the Cuda Deployment Kit has added entries not recognized by xorg.conf.
You really don’t need a xorg.conf file in the newer distros as the xorg.conf has been deprecated.

login to console prompt and type:

su -

Then your

Type in:

cd /etc/X11/

Type in:

ls -a

and look for the xorg.conf file

Remove the file with the command:

rm -f xorg.conf

Then type:

shutdown -r now

This will restart your system and the X-server should be working.

IMPORTANT: Install Cuda from this repository by adding it to YaST http://download.opensuse.org/repositories/home:/jenewton:/cuda/openSUSE_12.3/

FYI The Cuda Linux Installation Guide:Getting Started Linux :: CUDA Toolkit Documentation
NVIDIA CUDA Toolkit libraries
The Nvida-Cuda-Toolkit Library only installation

Thanks for your answer Remanator, but I’ve done that befor and there is no xorg.conf file like you said.


linux-09lp:/home/Alejandro # ls /etc/X11/ -l -atotal 80
drwxr-xr-x  11 root root  4096 Oct 15 23:00 .
drwxr-xr-x 125 root root 12288 Oct 19 16:20 ..
drwxr-xr-x   2 root root  4096 Mar  6  2013 fs
drwxr-xr-x   2 root root  4096 Mar  6  2013 lbxproxy
drwxr-xr-x   2 root root  4096 Mar  6  2013 proxymngr
-rw-r--r--   1 root root   954 Jan 27  2013 qtrc
drwxr-xr-x   4 root root  4096 Mar  6  2013 rstart
drwxr-xr-x   2 root root  4096 Oct 16 19:43 xdm
-rw-r--r--   1 root root  5708 Jan 26  2013 xim
drwxr-xr-x   2 root root  4096 Mar  6  2013 xim.d
drwxr-xr-x   3 root root  4096 Oct 16 00:07 xinit
-rw-r--r--   1 root root  1353 Jan 26  2013 Xmodmap
-rw-r--r--   1 root root  1049 Jan 26  2013 Xmodmap.remote
drwxr-xr-x   2 root root  4096 Oct 16 00:42 xorg.conf.d
-rw-r--r--   1 root root   874 Oct  7 23:30 xorg.conf.install
-rw-r--r--   1 root root  4017 Apr 22  2009 Xresources
drwxr-xr-x   2 root root  4096 Mar  6  2013 xsm

Instead of xorg.conf I think it is using the files inside xorg.conf.d/

linux-09lp:/home/Alejandro # ls /etc/X11/xorg.conf.d/ -l -atotal 48
drwxr-xr-x  2 root root 4096 Oct 16 00:42 .
drwxr-xr-x 11 root root 4096 Oct 15 23:00 ..
-rw-r--r--  1 root root   61 Mar  1  2013 05-glamor.conf
-rw-r--r--  1 root root 1099 Jul 15 09:25 10-evdev.conf
-rw-r--r--  1 root root 3640 Jan 27  2013 11-mouse.conf
-rw-r--r--  1 root root  524 Oct 16 00:20 50-device.conf
-rw-r--r--  1 root root  527 Jul  1  2011 50-monitor.conf
-rw-r--r--  1 root root  491 Jul  1  2011 50-screen.conf
-rw-r--r--  1 root root 1918 Feb  4  2013 50-synaptics.conf
-rw-r--r--  1 root root  115 Jan 28  2013 50-vmmouse.conf
-rw-r--r--  1 root root  835 Jan 28  2013 50-wacom.conf

but the device, monitor and screen files are all commented.
The bumblebee project has these files

linux-09lp:/home/Alejandro # ls /etc/bumblebee/ -l -a
total 32
drwxr-xr-x   3 root root  4096 Oct 17 20:03 .
drwxr-xr-x 125 root root 12288 Oct 19 16:20 ..
-rw-r--r--   1 root root  2896 Oct 16 20:09 bumblebee.conf
drwxr-xr-x   2 root root  4096 Oct 15 23:52 xorg.conf.d
-rw-r--r--   1 root root   513 Sep  6 11:32 xorg.conf.nouveau
-rw-r--r--   1 root root  1380 Sep  6 11:32 xorg.conf.nvidia

and the bumblebee.conf is selecting the xorg.conf.nvidia file to load the drivers. But I don’t understand why it is not loading them at boot

Also, if I write:


linux-09lp:/home/Alejandro # lspci -v
...


01:00.0 VGA compatible controller: NVIDIA Corporation Device 1058 (rev a1) (prog-if 00 [VGA controller])
        Subsystem: Lenovo Device 3903
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at ea000000 (32-bit, non-prefetchable) [size=16]
        Memory at e0000000 (64-bit, prefetchable) [size=128]
        Memory at e8000000 (64-bit, prefetchable) [size=32]
        I/O ports at 3000 [size=128]
        Expansion ROM at <ignored> [disabled]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Capabilities: [b4] Vendor Specific Information: Len=14 <?>
        Capabilities: [100] Virtual Channel
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Kernel driver in use: nvidia

...

So the kernel recognized the graphic card and drives, but then the bumblebee doesnt work correctly and


linux-09lp:/home/Alejandro # optirun glxspheres
Polygons in scene: 62464Xlib:  extension "GLX" missing on display ":8".
ERROR (593): Could not obtain RGB visual with requested properties

[/size][/size][/size][/size]

I see the word Lenovo in your output, it may very well be that you don’t need bumblebee at all, as many of them can be switched, in the bios settings, to use intel only, nvidia only or optimus mode. So what’s your modell and what’s the complete output of /sbin/lspci | grep VGA?

You must have an entry that was added to one of the 50…conf files.

As a follow up to what hank_se said commented below… I’ve also read that Cuda can run separately without Bumblebee by changing the setting in your BIOS.

In addition nVidia is working on a driver that should be able to accommodate the Optimus driver in Linux.
The only problem is that they’ve not set a date on the release date.

Most likely next year.

My is a Lenovo Idepad U410, but on the BIOS I can only set it to Intel only or Optimus.

the output of /sbin/lspci | grep VGA is:

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 1058 (rev ff)

and here are all the conf files


linux-09lp:/etc/X11/xorg.conf.d # cat 50-*

# Having multiple "Device" sections is known to be problematic. Make
# sure you don't have in use another one laying around e.g. in another
# xorg.conf.d file or even a generic xorg.conf file. More details can
# be found in https://bugs.freedesktop.org/show_bug.cgi?id=32430.
#
#Section "Device"
#  Identifier "Default Device"
#
#  Driver "radeon"
#
#  # Required magic for radeon/radeonhd drivers; output name
#  # (here: "DVI-0") can be figured out via 'xrandr -q'
#  Option "monitor-DVI-0" "Default Monitor"


#EndSection
# Having multiple "Monitor" sections is known to be problematic. Make
# sure you don't have in use another one laying around e.g. in another
# xorg.conf.d file or even a generic xorg.conf file. More details can
# be found in https://bugs.freedesktop.org/show_bug.cgi?id=32430.
#
#Section "Monitor"
#  Identifier "Default Monitor"
#
#  ## If your monitor doesn't support DDC you may override the
#  ## defaults here
#  #HorizSync 28-85
#  #VertRefresh 50-100
#
#  ## Add your mode lines here, use e.g the cvt tool
#
#EndSection
# Having multiple "Screen" sections is known to be problematic. Make
# sure you don't have in use another one laying around e.g. in another
# xorg.conf.d file or even a generic xorg.conf file. More details can
# be found in https://bugs.freedesktop.org/show_bug.cgi?id=32430.
#
#Section "Screen"
#  Identifier "Default Screen"
#
#  Device "Default Device"
#
#  ## Doesn't help for radeon/radeonhd drivers; use magic in
#  ## 50-device.conf instead
#  Monitor "Default Monitor"
#
#EndSection
# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
#   Option "OptionName" "value"
#
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
        MatchDevicePath "/dev/input/event*"
        Option  "HorizScrollDelta"      "0"
# enable tap-to-click as default (bnc#722457)
        Option "TapButton1" "1"
        Option "TapButton3" "2"
        Option "TapButton2" "3"
EndSection


Section "InputClass"
        Identifier "touchpad ignore duplicates"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/mouse*"
        Option "Ignore" "on"
EndSection


# This option enables the bottom right corner to be a right button on
# non-synaptics clickpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
#       To disable the bottom edge area so the buttons only work as buttons,
#       not for movement, set the AreaBottomEdge
#       Option "AreaBottomEdge" "82%"
EndSection


# This option disables software buttons on Apple touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Disable clickpad buttons on Apple touchpads"
        MatchProduct "Apple|bcm5974"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection
Section "InputClass"
        Identifier      "vmmouse"
        MatchIsPointer  "on"
        MatchTag        "vmmouse"
        Driver          "vmmouse"
EndSection


Section "InputClass"
        Identifier "Wacom class"
        MatchProduct "Wacom|WACOM|Hanwang|PTK-540WL"
        MatchDevicePath "/dev/input/event*"
        Driver "wacom"
EndSection


Section "InputClass"
        Identifier "Wacom serial class"
        MatchProduct "Serial Wacom Tablet"
        Driver "wacom"
EndSection


Section "InputClass"
        Identifier "Wacom serial class identifiers"
        MatchProduct "WACf|FUJ02e5|FUJ02e7|FUJ02e9"
        Driver "wacom"
EndSection


# Waltop tablets
Section "InputClass"
        Identifier "Waltop class"
        MatchProduct "WALTOP"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "wacom"
EndSection


# N-Trig Duosense Electromagnetic Digitizer
Section "InputClass"
        Identifier "Wacom N-Trig class"
        MatchProduct "HID 1b96:0001|N-Trig Pen"
        MatchDevicePath "/dev/input/event*"
        Driver "wacom"
        Option "Button2" "3"
EndSection

though I didn’t understand what you meant by

In addition nVidia is working on a driver that should be able to accommodate the Optimus driver in Linux.
The only problem is that they’ve not set a date on the release date

That was a surprisingly useless MUX coming from Lenovo.
Wat’s the output of

ls -la /usr/lib/nvidia
ls -la /usr/lib64/nvidia

Also show us the content of /var/log/Xorg.8.log, use SUSE Paste as it is rather long.

I’m sorry hank_se, i was on a trip and i didn’t got the chance to do what you’ve asked.
Here is the output:

Alejandro@linux-09lp:/usr/local/cuda-5.5/samples/1_Utilities/bandwidthTest> ls -la /usr/lib/nvidia
total 28
drwxr-xr-x  2 root root  4096 Oct 16 19:34 .
drwxr-xr-x 74 root root 12288 Oct 28 20:47 ..
-r--r--r--  1 root root   342 Jul  4 00:02 alternate-install-present
-rwxr-xr-x  1 root root    42 Jan 26  2013 post-uninstall
-rwxr-xr-x  1 root root   294 Jan 26  2013 pre-install

Alejandro@linux-09lp:/usr/local/cuda-5.5/samples/1_Utilities/bandwidthTest> ls -la /usr/lib64/nvidia
total 1276
drwxr-xr-x   3 root root    4096 Oct 16 20:55 .
drwxr-xr-x 128 root root  122880 Nov  1 02:30 ..
lrwxrwxrwx   1 root root      33 Oct 16 20:55 libGL.so.1 -> /usr/lib64/nvidia/libGL.so.325.15
-rwxr-xr-x   1 root root 1145512 Oct 16 20:55 libGL.so.325.15
lrwxrwxrwx   1 root root      36 Oct 16 20:55 libOpenCL.so -> /usr/lib64/nvidia/libOpenCL.so.1.0.0
-rwxr-xr-x   1 root root   21296 Oct 16 20:55 libOpenCL.so.1.0.0
drwxr-xr-x   3 root root    4096 Oct  8 20:58 xorg

And here is the Xorg.8.log file SUSE Paste

Thanks

From the Xorg.8.log file:




  1.    871.317] (EE) NVIDIA(0): Version mismatch detected between the NVIDIA X driver and the
  1.    871.317] (EE) NVIDIA(0):     NVIDIA GLX module.  X driver version: 319.37; GLX module
  1.    871.317] (EE) NVIDIA(0):     version: 325.15.  Please try reinstalling the NVIDIA
  1.    871.317] (EE) NVIDIA(0):     driver.



This is what has to be corrected first of all to get bumblebee working, did you install the 319.37 driver from a repo or with a generic .run installer, the “hard way”? If “the hard way” you must in addition to uninstall it also reinstall the package xorg-x11-server.

i installed first the bumblebee project like it says here Smithfarm - the Brain: openSUSE 12.3: How to install ‘bumblebee’ for NVIDIA Optimus VGA

It was working, but then I installed the CUDA toolkit from the Nvidia repositories and everything went wrong.

So now first I have to remove all packages and reinstall bumblebee and then xorg-11-server?

If you downloaded the rpm from here https://developer.nvidia.com/cuda-downloads, I suggest you open up that repo in yast and uninstall the following packages: nvidia-computeG03,
nvidia-gfxG03-kmp-default or -desktop, nvidia-modprobe and x11-nvidia-nvidiaG03. Having done that I suggest you disable the cuda repo as some of the packages conflicts with packages in the Bumblebee repo. Then reinstall dkms-nvidia from the bumblebeee repo and xorg-x11-server. This should at least give you bumblebeee back, then we’ll see if CUDA also works.

Hi once again,

I made everything you’ve told me and had re-install the bumblebee like it says here

Smithfarm - the Brain: openSUSE 12.3: How to install ‘bumblebee’ for NVIDIA Optimus VGA

after that I installed CUDA like it says here

Cero y van Dos!!: Optimus Technology: Instalando CUDA Toolkit con Bumblebee Project en GNU-Linux (Ubuntu/Debian/Mint)

and I got everything working (at least, that’s what i think).
I say that because I’ve executed a program with CUDA code and it’s not doing what i expected. But maybe there is something wrong with my libraries.

I still got a problem when the system starts. I think that, when it tries to configure the monitors something goes wrong, but when I log in everything goes back to normal.
I’ll try to upload some images so you can understand what I mean.

Thanks for your help!

Would anyone recommend me some book or tutorial to understand better how Linux/opensuse initialized devices and load the drivers and also the Xserver?