Thinkpad t480 / t480s with intel UHD 620 and nvidia mx150. Status, advice, how-to


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:

  1. 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)

  2. Easier setup of suse-prime

  3. 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!

  • 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

  • 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

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

This will prevent drivers for dGPU load on system boot and allow bbswitch to switch dGPU off.
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:

  1. Install bumblebee, bbswitch, dkms, nvidia-bumblebee; do npt install proprietary nvidia drivers from their repo.

  2. Add your user to groups bumblebee and video

  3. Enable and start bumblebeed service

  4. blacklist nouveau and nvidia drivers

  5. 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

You do not need to run nvidia for HDMI output on t480s, it runs on intel just fine.
I did not check DP though.

Nvidia mx150 is best with thinkpad or intel??

Tearing, compositing and power saving on Intel GPU

If you followed my advice in previous post, you should be using intel GPU now and your nvidia dGPU should be off. In this case, power consumption is expected to be very low. And it is so, unless you try to actually use you laptop rather then just gaze on powertop’s nice figures. The fact is then when you work on your laptop or just browse the web, power consumption goes up significantly, making the fan spin all the time and provide just around 4-5 hours of battery life. Which looks sick. Disabling compositing helps to save battery life, but you will see video tearing, which is annoying.

As you probably know, there are 2 driver options for intel GPUs -’s modesetting driver and official Intel driver.

  1. The modesetting driver is default for most linux distos, including openSUSE. When you issue a command ***prime-select intel ***
    you select this driver for Intel GPU 1. The official Intel driver is not preinstalled, so you should install it (xf86-video-intel). To use this driver use prime-select intel2

These drivers have different impact on power consumption (see below).

Composite window manager is also a noticeable power consumer and you should select right settings for it to be power-efficient. Options to try are:

  1. Compositing: enabled
    or disabled
  2. Rendering engine: OpenGL
    or XRender 1. Vertical synchronization (VSync) settings: with
    or without.

Note 1: modesetting driver does not provide VSync capability and leaves this to composite manager to handle; native Intel driver has VSync built-in
Note 2: I personally use KDE and did all these tests on KDE only, If you use different DE and composite manager, results may be different.

|Modesetting|Yes|OpenGL|Yes (auto)|This is a default configuration.
Low idle power consumption, but highest when in actual work.
No tearing
|Modesetting|Yes|XRender|Yes / No|High power consumption
|Modesetting|No|-|Not supported|Lowest power consumption
|Intel|Yes|OpenGL|Yes / No|Moderate power consumption
Serious tearing and artefacts|
|Intel|Yes|XRender|Yes / No|Moderate power consumption, a bit more than OpenGL
No tearing|
(by driver)|High power consumption
No tearing|

As you can see, there is no perfect choice here.
My personal recommendation is to use Intel driver and XRender without VSync as rendering engine for compositing (do not even try OpenGL). This way you will get tear-free experience and get 10-hour of web browsing with one charge.
Modesetting driver without compositting is the most power-efficient solution, but you will have to tolerate tearing and lack of eye-candy.
Default settings will give you around 4-5 hours of web browsing.

Great intro but there are few issues:

  1. Depending on which flash of the OpenSUSE LEAP 15.0 you downloaded, loading nouveau by default will make you unable to boot/login.
  2. For programmers, CUDA is 10-1 require Gfx04 package as well as bumblebee to operate.
  3. Codecs need to be installed before bumblebee to avoid conflicts.

Hi, thanks for feedback!

I don’t really get the part “flash of the OpenSUSE LEAP 15.0”. Maybe you mean Tumbleweed?
Well, before writing the guide I made installs of both Leap 15.0 and Tumbleweed around 4 times each, never came across that issue.
On the other hand, I am pretty sure it is possible to have issues like that, as my older optimus notebook required to set kernel boot parameters to even start installation of 15.0, also because of nouveau.

  1. For programmers, CUDA is 10-1 require Gfx04 package as well as bumblebee to operate.

Good point.

  1. Codecs need to be installed before bumblebee to avoid conflicts.

Won’t argue on that, but personally, never came across that problem.

In two versions of OpenSUSE Leap 15.0 from main repository, the packaged nouveau was incompatible with MX150. If I didn’t disable nouveau during the installation, the laptop could not boot and get stuck in some sort of an infinite loop while loading /etc/xorg.conf

There were two kernels I think that were compatible with MX150+Nouveau I think (drm-kmp-default-4.9.33_k4.4.76_1-3.2 drm-kmp-default-4.9.33_k4.4.126_48-13.3). I think it’s worth noting that for Lenovo T480+MX150, we should warn people not to install nouveau during setup, and not to run update until Nvidia has been installed and nouveau blacklisted.