Optimus-manager is a nice piece of software that lets you configure dual GPU setups usually available on laptops that share the same built-in screen and have a lot of nuances to be dealt with:
- Is there a mux switch available?
- Are the HDMI or DP output ports hardwired to the laptop? PS: one of my current unanswered questions from ASUS.
- Is the integrated GPU Intel or AMD?
- Is the dedicated GPU able to handle PCI resets when you want to disconnect it?
- Are you able to disable the iGPU on BIOS and let only the dGPU on? (In my case, no)
- The list goes on...
I've started using optimus-manager after I noticed some performance improvements of nearly 10% more frames per second when using my dedicated GPU only from the boot rather than using some GPU delegation tool like Prime Rendering. But that is something to be discussed in another article. This software basically works by probing well-known PCI output for GPUs using
lspci auto generating a Xorg configuration for one of the three following modes depending on your setup before loading your login manager:
- Hybrid: iGPU is the primary, offload to dGPU when needed
- Dedicated: X and applications will always run on dGPU
- Integrated: iGPU will be the only GPU available(alias to Intel mode).
It also comes with a nice Qt-based system tray applet for those who want to change the configuration on the go and relogin on X to apply it. My current configuration is: Hybrid mode when booting on battery, Dedicated mode when booting with a power cord attached.
The first setup of my current laptop took me more time than I would expected because optimus-manager has a lingering issue opened regarding dealing with Domain IDs on PCI: Wrong BusID in generated xorg.conf .
[nwildner@sandworm ~]$ lspci -m | grep -i 'RTX\|UHD'
00:02.0 "VGA compatible controller" "Intel Corporation" "Alder Lake-P GT1 [UHD Graphics]" -r0c -p00 "ASUSTeK Computer Inc." "Device 136d"
01:00.0 "VGA compatible controller" "NVIDIA Corporation" "GA104M [GeForce RTX 3070 Mobile / Max-Q]" -ra1 -p00 "ASUSTeK Computer Inc." "Device 136d"
[nwildner@sandworm ~]$ lspci | grep -i 'RTX\|UHD'
0000:00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P GT1 [UHD Graphics] (rev 0c)
0000:01:00.0 VGA compatible controller: NVIDIA Corporation GA104M [GeForce RTX 3070 Mobile / Max-Q] (rev a1)
To make things harder, Xorg has some arcane configuration where Domain ID and BUS ID need to be swapped in order(first 2 columns of
lspci output), and running
lspci in compatibility mode to suppress the Domain ID will generate a broken Xorg configuration crashing X.
While this isn't a deal breaker because I already have a workaround in place, I was wondering it this issue was ever going to be fixed. Tried to download to submit some patches myself that would handle the PCI Domain ID stuff, but to my surprise I'm not the only one not really familiarized with the software. The lead developer is also struggling on this one.
Since there wasn't much activity on optimus-manager repository lately, I decided to google keywords like "is optimus manager active?", "is optimus manager abandoned" , "state of optimus manager" and unfortunately I've found an announcement from the lead developer of this tool that it is a little saddening: [Discussion] The state of optimus-manager. Basically the developer stated that he does not have the energy, the hardware neither the knowledge to keep up with such a big project that looked simpler at first place when forked from Ubuntu. And that is OK.
While it is sad that optimus-manager is not being actively maintained anymore, it is nice to see the official feedback from the lead developer, admitting that he might have fell into the trap where the project seemed to be simpler that he thought.
Some lessons to be learned here are:
- For those who want to use optimus-manager, there could be other alternatives like Prime and stay on hybrid mode always. Don't take my word for granted on performance and try it by yourself.
- While the project is in a "limbo", it might be stable enough for your daily use.
- Don't expect updates on the software, but also, try to not blame the lead developer who took the first step into the obscure world of dealing with multi GPU setups on Linux laptops.
- The project needs more hands and eyeballs so, if you have the knowledge just sent some patches. Or if you are really knowledgeable of laptop GPU setups, the lead developer can hand over the project to you.