|||
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. (If you are going to use the Nvidia dedicated card only, you would be interested in configuring it by Nvidia OPtimus from here.)
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
1. Get rid of all NVIDIA-related packages:
> zypper se nvidia
> zypper rm ...
Get rid of
bumblebee, primus, dkms, dkms-nvidia, dkms-bbswitch
if you've installed before
2. Get rid of all mentions of nvidia in
/etc/sysconfig/kernel
3. Make sure xf86-video-intel package is installed
> zypper if xf86-video-intel
4. 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. mkinitrd
6. reboot your system
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.Install 'powertop' package and note power consumption (must be on battery for power consumption to be shown)
> zypper in powertop
8. Install the 'devel_kernel' pattern
> zypper in -t pattern devel_kernel
9. Add bumblebee repository through YAST or zypper command:
> zypper ar
http://download.opensuse.org/repositories/X11:/Bumblebee/openSUSE_13.2/ bumblebee
SUSE Linux Enterprise 12 users can add the following repository:
http://download.opensuse.org/repositories/X11:/Bumblebee/SLE_12/
10. install necessary software:
> zypper in bbswitch bumblebee dkms nvidia-bumblebee nvidia-bumblebee-32bit primus VirtualGL-devel VirtualGL-32bit
11. enable dkms and bumblebeed at booting
> systemctl enable dkms
> systemctl enable bumblebeed
12. Add current user to video and bumblebee groups through YAST or command line
> usermod -A video your_user_name
> usermod -A bumblebee your_user_name
13. reboot your system
14. check the status of your bumblebee services
> 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. run your software for testing:
> 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) most software work fine except VMD, it may failed 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:
from
/usr/lib/nvidia/libGL*
/usr/lib64/nvidia/libGL*
to
/usr/local/lib
/usr/lib
/usr/local/lib64
/usr/lib64
(3)To run nvidia-settings, one should use the following command line:
optirun nvidia-settings -c :8
(4) In the latest SLED 12 SP3 x64 OS, some 32 bit library is not avaible which won't afffect the Bumblebee performance. However, the kernel may not be correct complied by zypper command line which lead to a lot of heats after booting to the system. This problem can be solved by recompiling kmp with the following steps:
cd ~/ mkdir bbswitch cd bbswitch wget http://download.opensuse.org/repositories/X11:/Bumblebee/SLE_12_SP3_Backports/src/bbswitch-0.8-28.1.src.rpm rpmbuild --rebuild bbswitch-0.8-28.1.src.rpm su - cd /home/<username>/rpmbuild/RPMS/x86_64/ zypper in *kmp*
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-25 01:23
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社