Published January 26th, 2020
Installing OpenSUSE Tumbleweed on Dell XPS 15
My partner, Megan, uses Linux on her Dell XPS 15 as her main workstation. It’s a powerful machine, with an i7-7700HQ CPU, but unfortunately comes with Intel HD 630/GTX 1050 graphics in NVIDIA’s “Optimus” setup. The GTX 1050 sucks a lot of power, massively reducing battery life, but with the idea that you only turn it on when you need boosted graphics performance. The downside is, under Linux, this can be a bit of a pig to get working properly.
Megan very rarely needs the full power of the NVIDIA card, but when she does, it needs to be working at full potential, so the proprietary NVIDIA binary drivers have to be used. Additionally, the card must be fully powered off when not in use, not just sitting idle, because otherwise the battery life sucks.
This required a few tweaks I couldn’t find all in one place, so I’m documenting them here.
Step 1: Installation
The first hurdle to climb over is that the installation ISO doesn’t work out of the box on these machines. The key is to disable modesetting, which allows everything to work at the cost of graphics performance (we fix this later). To do this, when the GRUB bootloader shows up, highlight “Installation” and press e
. To the end of the linuxefi
line, append nomodeset
. Then, press Ctrl-X
to boot.
I installed OpenSUSE Tumbleweed with the default settings for GNOME, including Wayland support. (If you’re wanting to use suse-prime
instead of bumblebee
to handle the graphics card switching, which gives better performance at the cost of needing to log in and out, you can’t use Wayland).
I would recommend using btrfs
for your root file system (though it isn’t relevant to getting the graphics working). During the trial-and-error in making this work properly, the snapper
snapshots possible when using this filesystem - fully bootable, working backups of your machine that can be accessed even when you can’t get to the login screen - meant I had to go through far fewer reinstalls. This is one of OpenSUSE’s killer features.
Step 2: Booted in, installing bumblebee
The OpenSUSE wiki has a guide on installing bumblebee
. This did not work for me in it’s unmodified state, leading to either failures to boot or complete system lockups when the graphics card was addressed in any way, for example with optirun bash
or lspci
. (optirun --status
did report that the card was powered off, though, so it clearly was close to working).
Follow the first section of this guide, from “Install Bumblebee” to just above “Optional: Install NVIDIA driver”. This should install bumblebee
, give the user the correct permissions, start the service, blacklist the nouveau
driver and remake the initrd
.
Then, we want to follow the steps under the “Tumbleweed” subheading a little further down, adding the NVIDIA bumblebee
repository and installing it, as well as enabling dkms
to allow the driver to survive kernel updates.
Here, I believe there is a missing step - one must also blacklist the NVIDIA driver by using the same command as for nouveau
but with the word nvidia
instead, before remaking the initrd
.
echo "blacklist nvidia" | sudo tee -a /etc/modprobe.d/99-local.conf
sudo mkinitrd
This, however, will still not work, and lead to crashes when the card is accessed (at least, it did for me).
Step 3: Modifying kernel parameters
Additional kernel parameters are needed to stop the NVIDIA drivers from crashing our system. In YaST
, open up the Boot Loader settings. Switch to the tab named “Kernel Parameters”, and append the following: acpi_osi=! acpi_osi="Windows 2009"
. You can also remove the nomodeset
parameter carried over from the installation.
If you have rebooted your system before following this Step 3, you may experience a crash here, similar to the lspci
crash. If that happens, you can set these parameters from the GRUB bootloader like we did with nomodeset
at the start, when booting your machine, then make them permenant here. (I suppose you could also change them in the GRUB config file, though I like using YaST
because of the automatic snapper
snapshots).
Once this has been appended and you reboot, you should see that sudo lspci
doesn’t crash the machine and correctly reports everything, optirun --status
reports the card is off, and optirun bash
enables the card and spawns a shell using it.
However, there is a final change, as now changing the backlight in GNOME doesn’t work. Finally, one must append acpi_backlight=none
to the kernel parameters as before, presumably because adding the Windows OSI type breaks something (?).
Step 4: Enjoy!
I wasn’t able to find a post with all these steps in one place, so I hope this helps anyone else who wants to recreate a similar setup. Please send me an email if you notice anything wrong with this guide. I’ll try and keep it updated as long as Megan is using it!