Installing openSUSE Leap 15.0 and bumblebee on hardware with NVIDIA Optimus graphics

On the 25th May 2018 i read at https://news.opensuse.org/: “Based on enterprise code tested millions of times opensuse leap 15 released … also comes … on high-end hardware like Tuxedo Laptops …”

I happen to have such a piece of “high-end hardware” - a Tuxedo Book XC1507 v2.

It features

Intel Core i7-7820HK KabyLake-CPU
Intel HD Graphics 630
NVIDIA GeForce GTX 1060 graphics card
LG 3840x2160 IPS-display
The UEFI allows to choose either “DISCRET” or “MSHYBRID” for the graphic-cards. Where “DISCRET” means only the NVIDIA-card is used and “MSHYBRID” means the hybrid setup of Intel and NVIDIA card.

Installing openSUSE Leap 15.0 on this hardware turned out to be not as easy as one might expect by reading the openSUSE news.

To beginn with: I’m aware that

  • there may be hardware which will allow to switch off the NVIDIA card and use only the Intel graphic card. However my hardware does not.
  • using the NVIDIA card only (graphic-cards-option in the UEFI set to “DISCRET”) will “make life easier”. But the NVIDIA card strains the battery heavily. If one wants the battery to last longer NVIDIAs Optimus feature (graphic-cards-option in the UEFI set to “MSHYBRID”) needs to be used.
  • using the NVIDIA card only (graphic-cards-option in the UEFI set to “DISCRET”) and switching to “HYBRID” after the installation has finished would allow for a straight forward installation. However there may be systems which will not allow such a switching at all. So i will describe how to install in “HYBRID” mode right from the beginning.
  • there may be other software (nvidia-prime? suse-prime?) which will allow to make use of NVIDIAs Optimus feature but i decided to go with bumblebee and nether tested any other software.
  • there are several places where one can get bumblebee from. I tested bumblebee from the openSUSE Leap 15.0 OSS-repository and “http://download.opensuse.org/repositories/home:/Bumblebee-Project:/Bumblebee3/openSUSE_Leap_15.0/”. Both worked for me.
  • one can install NVIDIAs proprietary driver together with bumblebee as well. I did not but use the nouveau driver.

Now, here is how i proceeded:

  1. Downloaded “http://download.opensuse.org/distribution/openSUSE-current/iso/openSUSE-Leap-15.0-DVD-x86_64.iso
  2. Checked the downloaded file against “http://download.opensuse.org/distribution/openSUSE-current/iso/openSUSE-Leap-15.0-DVD-x86_64.iso.sha256
  3. Used “SUSE Studio Imagewriter” to create an USB device for installation.
  4. Set the graphic-cards-option in the UEFI to “MSHYBRID”.
  5. Booted from the USB device, selected “Installation” from the GRUB2 boot menu and pressed “e” to edit this entry.
  6. Searched for the line that loads the kernel (ends with “splash=silent”) and replaced “splash=silent” with "nouveau.modeset=0 textmode=1
    " 1. Pressed F10 to continue booting. In the end i was presented with the non-graphical installer. From here on i continued just as with any other openSUSE installation (partitions for “/” and “/home”, both “ext4” as file system, KDE Plasma5 as DE).
  7. When the installation was finished and the system rebooted i selected “openSUSE Leap 15.0” from the GRUB2 boot menu and pressed “e” to edit this entry.
  8. Searched for the line that loads the kernel (ends with “splash=silent”) and replaced “splash=silent” with "nouveau.modeset=0 3
    " 1. Pressed F10 to continue booting. In the end i was presented with a non-graphical login (console).
  9. Logged in as “root”
  10. Connected to a network (by cable but one could use “nmtui” to set up a WLAN connection) with access to the internet.
  11. Issued the following commands
# zypper up

to get the latest versions of the software installed

# zypper in terminus-bitmap-fonts

(optional) to install a larger console font (i had problems reading the 4K display)

# setfont ter-132b

(optional) to set a larger console font

# zypper in bumblebee VirtualGL-devel dkms xf86-video-intel

with openSUSE 42.3 there was no need for “xf86-video-intel”. However openSUSE Leap 15.0 would boot into a black screen without it.

# echo "blacklist nouveau" >>/etc/modprobe.d/50-blacklist.conf

so that bumlebee can load the nouveau driver under its control

# usermod -a -G bumblebee,video USERNAME

replace USERNAME with a user defined on your system

# systemctl enable bumblebeed

to make sure bumblebee gets started on every system startup

# systemctl start bumblebeed

to start the bumblebee daemon

# systemctl enable dkms

to make sure dkms gets started on every system startup

# systemctl start dkms

to start dkms

# dracut -f

to make sure your initrd contains all modules necessary

# init 6

to restart the system

The system booted into KDE (Plasma5) without problems. However the response of the GUI was very sluggisch. In a console or an editor one could clearly see a delay when pressing keys on the keyboard.

Changing the composite rendering backend (in systemsettings5 -> display -> Compositor) cleared that.

Regards

susejunky