There are always this or that problems installing Bumblebee optimus driver under SUSE. Here are some useful steps towards this isssue and some solutions were propsed for frequent and headache problems. I wish this will help SUSE users for configurating their system well.
Nowadays, it is quite common and popular to have two dedicated graphic cards in laptop: usually, one is intergrated (eg: intel HD4xxx ) and the other is indepedent (eg: Nvidia GTX xxx). Such strategy can save laptop energy if we use integrated card for document task; while we can switch to independent one if dedicated CG work needed.
Neither downloading nvidia.run driver file from official website nor install from Linux distribution repository works for nvidia graphic cards. Those old methods usually lead to xserver behave abnormally even one cannot enter GUI anymore. Here showed some useful steps towards installing NVIDIA optimus driver for openSUSE in Dell M3800 laptop:
Environment
graphic card: Intel HD4600+Nvidia K1100M
OS: openSUSE 13.2, SLE 12
Steps
Update the system via Yast or zypper up – it is important to make sure that the system is fully updated before continuing. If you are using Virtualbox and other tools need to recompile Linux kernel, it is better to install them before the following steps.
Make sure Optimus is enabled in the laptop’s BIOS setting
- [FONT=宋体]Get rid of all NVIDIA-related packages: [/FONT]
*> zypper se nvidia*
*> zypper rm ...*
Get rid of
bumblebee, primus, dkms, dkms-nvidia, dkms-bbswitch
if you’ve installed before
2. [FONT=宋体]Get rid of all mentions of nvidia in [/FONT]
/etc/sysconfig/kernel
3. [FONT=宋体]Make sure xf86-video-intel package is installed[/FONT]
*> zypper if xf86-video-intel*
- add the line “blacklist nouveau” to /etc/modprobe.d/50-blacklist.conf
add option “nouveau.modeset=0” to the end of boot loader option from “Yast–>boot loader–>Boot Loader option–>optional kernel command line parameter”
5. [FONT=宋体]mkinitrd[/FONT]
6. [FONT=宋体]reboot your system[/FONT]
At this stage, we are running on Intel HD integrated card and we should login into the SUSE GUI environment KDE/GNOME without any problem.
7[FONT=宋体].Install ‘powertop’ package and note power consumption (must be on battery for power consumption to be shown)[/FONT]
*
> zypper in powertop
- [FONT=宋体]Install the ‘devel_kernel’ pattern[/FONT]
> zypper in -t pattern devel_kernel
9.[FONT=宋体] Add bumblebee repository through YAST or zypper command: [/FONT]
> *zypper ar*
http://download.opensuse.org/repositories/X11:/Bumblebee/openSUSE_13.2/* bumblebee*
SUSE Linux Enterprise 12 users can add the following repository:
zypper ar http://download.opensuse.org/repositories/X11:/Bumblebee/SLE_12/ bumblebee
- i[FONT=宋体]nstall necessary software:[/FONT]
> *zypper in bbswitch bumblebee dkms nvidia-bumblebee nvidia-bumblebee-32bit primus VirtualGL-devel VirtualGL-32bit
*
- [FONT=宋体]enable dkms and bumblebeed at booting[/FONT]
> *systemctl enable dkms *
> *systemctl enable bumblebeed*
- [FONT=宋体]Add current user to video and bumblebee groups through YAST or command line[/FONT]
* > usermod -A video your_user_name*
* > usermod -A bumblebee your_user_name*
- [FONT=宋体]reboot your system[/FONT]
- [FONT=宋体]check the status of your bumblebee services[/FONT]
> systemctl status bumblebeed
bumblebeed.service - Bumblebee C Daemon
Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled)
Active: active (running) since Thu 2014-05-22 20:31:08 CEST; 46min ago
Main PID: 1693 (bumblebeed)
CGroup: /system.slice/bumblebeed.service
├─1693 /usr/sbin/bumblebeed
└─2763 Xorg :8 -config /etc/bumblebee/xorg.conf.nvidia -configdir...
15.[FONT=宋体] run your software for testing:[/FONT]
> *optirun ~/bin/pymol*
This Executable Build integrates and extends Open-Source PyMOL 1.7.0.5.
Detected OpenGL version 2.0 or greater. Shaders available.
Detected GLSL version 4.40.
OpenGL graphics engine:
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: Quadro K1100M/PCIe/SSE2
GL_VERSION: 4.4.0 NVIDIA 334.21
Adapting to Quadro hardware.
**tips: ** Dell M3800 uses QHD screen and the resolution is 3200x1800 which lead to window icon and font unvisuable. It is better to install “xrandr” to scale the screen.
> *xrandr --output eDP1 --mode "3200x1800" --scale "0.75x0.75"*
caution: It is highly recommened that update your system only once. If the OS is updated frequently especially updating the keneral, it will destroy dkms and bumblebee. In this case, one have to reinstall nvidia optimus driver again.
issuse:
(1)if the kernerl was updated, reinstallation of bumblebee I got an error saying something about nvidia.ko missing,just ingore it.
editing /etc/modprobe.d/50-bbswitch.conf load_state from 0 to -1:
cat /etc/modprobe.d/50-bbswitch.conf options bbswitch load_state=-1 unload_state=1
reboot the system, and bumblebee should work fine now.
(2) some software may fail with messages:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[VGL] WARNING: The OpenGL rendering context obtained on X display
[VGL] :8 is indirect, which may cause performance to suffer.
[VGL] If :8 is a local X display, then the framebuffer device
[VGL] permissions may be set incorrectly.
this problem can be solved by making soft link of libGL**.** pointing to the latest Nvidia library:
sudo ln -s /usr/lib/nvidia/libGL.so.346.35 /usr/local/lib/libGL.so.1
sudo ln -s /usr/lib/nvidia/libGL.so.346.35 /usr/local/lib/libGL.so
sudo ln -s /usr/lib64/nvidia/libGL.so.346.35 /usr/local/lib64/libGL.so.1
sudo ln -s /usr/lib64/nvidia/libGL.so.346.35 /usr/lib64/lib64/libGL.so.