Intro
Hello, opensuse community and googling passersby! I am old opensuse user and recently became a new Lenovo Thinkpad t480s user and in this thread I would like to share my experience in making them work together.
My device has nvidia mx150 dGPU, which does not work out of the box and requires some manual interference.
**
In short - IT WORKS!
**
In this thread I will cover only use of proprietary nvidia driver, not nouveau.
How to use mx150 dGPU?
There are 2 options you can try: bumblebee or suse-prime.
With bumblebee you won’t get much of performance gain, especially if you run it on 2K display, as there is a rendering bottleneck in bumblebee design and the higher resolution is, the slower it will perform. I would not recommend to use bumblebee unless you prefer it for GPU computations with CUDA or off-screen rendering - tasks that do not need frame rendering on screen.
With suse-prime you can switch active GPUs and get your rendering performance just as it is expected to be with proprietary nvidia driver, but you will have to relogin and reboot each time you want to switch active GPU (more details below).
In theory, there is also and option to use nvidia-xrun, but it never worked for me.
Tumbleweed or Leap 15.0?
Both OK, but tumbleweed is better due to several reasons:
-
Better power saving. With nvidia dGPU powered off, I got minimum 3.0W-3.6W of power consumption on tumbleweed and minimum 4.8W-5.0W on Leap 15.0 (same backlight level, no other special tweaking)
-
Easier setup of suse-prime
-
Noticed less warnings/errors in dmesg
Still, both distros work fine.
Setting up suse-prime
-
Install opensuse (tumbleweed or leap 15.0). Recommended extra packages: powertop, VirtualGL
-
Get all updates. Make sure you do NOT install nvidia proprietary drivers, bbswitch, bumblebee, suse-prime unless instructed by this guide!
-
Reboot
-
If you system partition has btrfs filesystem, it is recommended to make a snapshot now, as it will make it much easier to restore system if something goes wrong (it really can!)
-
Install nvidia drivers from official repo. It should be G05 driver.
-
Reboot.
-
Now, you should have nvidia driver installed in the system. Check if it is loaded. If it is, then go ahead with this guide
lsmod | grep nvidia
-
Install suse-prime package. At the time of writing this post only version 0.5 from Tumbleweed repo works fine and also Ok to install on leap 15.0. Newer experimental packages do not work (they fail to detect dGPU). Neither do forked packages found on OBS now. Note for Leap 15.0: I recommend not to keep this repo in your system as it will interfere with Leap 15.0 oss repo and make further package management more complicated.
-
For Leap 15.0 you should also install patched x11 server. Tumbleweed does not require it. Thanks to author of this guide.
-
Reboot.
-
At this point you should have suse-prime working. Give it a try!
glxspheres
-
note framerate and renderer (should be intel)
-
Now switch to nvidia. Run as root:
prime-select nvidia
- Check if it is really setup:
prime-select get-current
-
If nvidia is set, go ahead with the guide.
-
Relogin. Then run
glxspheres
-
Note the performance (should be much faster) and renderer (should be nvidia).
-
Switch back to intel and relogin. If suse-prime shows errors (not installed bbswitch and fatal error unloading nvidia module) - ignore them for now.
Basically, at this point suse-prime is setup and should work just fine.
**Tearing on when using nvidia
**Most likely you will see tearing problem when using nvidia. It is easy to fix by running:
echo "options nvidia-drm modeset=1" | tee -a /etc/modprobe.d/nvidia-drm-nomodeset.conf
mkinitrd
Reboot.
Also note that after this step, running glxspheres will not show huge FPS values, it will be around 70 FPS, same as on intel.
Dealing with power consumption - bbswitch
bbswitch will help you seriously minimize power consumption and reach really good battery life by powering off nvidia dGPU when it is not needed. You can use it even without suse-prime, bumblebee and proprietary nvidia drivers, if you just want shut down dGPU and not use it at all.
suse-prime can use bbswitch to power on and off the nvidia dGPU.
First, install bbswitch package and dependent kernel module.
Run as root:
echo "blacklist nvidia_drm" | sudo tee -a /etc/modprobe.d/99-local.conf
echo "blacklist nvidia_modeset" | sudo tee -a /etc/modprobe.d/99-local.conf
echo "blacklist nvidia_uvm" | sudo tee -a /etc/modprobe.d/99-local.conf
echo "blacklist nvidia" | sudo tee -a /etc/modprobe.d/99-local.conf
echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/99-local.conf
mkinitrd
This will prevent drivers for dGPU load on system boot and allow bbswitch to switch dGPU off.
Reboot.
Check dGPU state, run as root:
cat /proc/acpi/bbswitch
If you did everything right, it should be “OFF” after you boot your system.
To manually switch it on or off run respectively:
tee /proc/acpi/bbswitch <<< ON
tee /proc/acpi/bbswitch <<< OFF
If you use suse-prime, after you switch back from nvidia to intel, bbswitch won’t be able to power off dGPU, as not all nvidia kernel modules will be unloaded. So the only way I know how to get dGPU powered off again is to reboot the system, rather then relogin. Make sure to run “prime-select intel” before rebooting, otherwise X won’t start.
Bumblebee alternative (tested on Leap 15.0)
In this thread I won’t go into details how to set it up, as it is pretty straight-forward. Steps to take:
-
Install bumblebee, bbswitch, dkms, nvidia-bumblebee; do npt install proprietary nvidia drivers from their repo.
-
Add your user to groups bumblebee and video
-
Enable and start bumblebeed service
-
blacklist nouveau and nvidia drivers
-
Reboot
Now bumblebee should be running. To ensure, run
optirun --status
Run an app with optirun and… it won’t work and bumblebee will crash. To workaround this behaviour, it is possible to remove dGPU from the system and load it again by running as root:
systemctl stop bumblebeed
rmmod bbswitch
echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove
echo 1 > /sys/bus/pci/rescan
modprobe bbswitch
systemctl start bumblebeed
After that bumblebee will work
P.S.
You do not need to run nvidia for HDMI output on t480s, it runs on intel just fine.
I did not check DP though.