[Merged to stable] Adding Nvidia prime-offloading support to mhwd

Only issue i see is nm-applet will not restart after sleep, affects both laptops using XFCE

That does not sound like a graphics issue. What DE are you using?

XFCE for DE Xfwm4 Wm Unstable Branch BTW

And ctually network is up just the tray indicator shows it

Hopefully the team adds this (contributing process improvements) to their new year's resolutions, @philm, @oberon.


I've been trying to get this to work with an ISO, but I've stumbled upon some very interesting roadblocks:

  1. ISO images that I build always have their pacman-mhwd.conf files in /opt instead of /opt/mhwd like /usr/bin/mhwd-live requires.
  2. Official ISO images ship with an outdated mhwd-db or something because /opt/pkg (should actually be /opt/mhwd/pkg, see point 1) doesn't contain Nvidia 435 and mhwd doesn't know about anything above 418 in live systems (also throws tons of errors, but I digress)

So to summarize the steps needed to get this working in ISOs:

  1. Add 435xx or 440xx + nvidia-prime to Packages-Mhwd in profiles
  2. Let mhwd know about that driver in whatever custom mhwd-db is being used for Manjaro ISOs (important: if live mhwd tries to install a driver that doesn't exist in /opt/mhwd/pkg, it will error)

These observations look serious.
I would suggest you post them at GitLab/mhwd and/or GitLab/iso-profiles, or where you think it is better suitable, as issues, even if no contributing is possible.

What can we do?... That's the Manjaro team... Too busy!... :man_shrugging:


Good idea! The issue I submitted yesterday got looked at quickly by oberon. I'll just submit a patch file and some text explaining the purpose.

Edit: yes


This is great but should be limited based on GPU generation. Only Turing and newer makes sense. Battery life for Pascal and older is dramatically short when using this offload solution.
Another option is to use some more sophisticated tools like Optimus-manager, which allows easy switch between different modes.

It should be at least an option to choose for pre turing imo. 90% of the time my laptop is on power adapter. And I don't want to be forced to use old drivers. Yes it's not economical and ecological reasonable..

Mine too, mine too. But it's very odd to force everyone use a solution which has only one option. It should be done at least similar to how Ubuntu does it, otherwise there's no sense in such approach.
Any mhwd changes concerning Nvidia offload must provide some way to quickly and easily turn off pre-Turing GPUs. Now it is Bumblebee with bbswitch. It could be O-M with bbswitch. But it shouldn't be "only Prime, say goodbye to your battery haha, I don't use it so you all won't be able to use it too".

1 Like

I like that you provided a package of your changes. Your patch looks fine so far, might need some testing. I would keep the old configs. Most likely modern PCs won't use them but we still provide those drivers in our ISOs. We might reduce the supported drivers back to the big three (AMD,NVIDIA,INTEL) as other cards are already well supported by the kernel. Create a full clone of mhwd-db add your changes and point me to that git-repo. I'll look to find a way to include your changes.


Please note that the packages I removed don't actually install any drivers or modify the system in any way. They all the end up using the modesetting driver. Xorg automatically uses the modesetting driver on these devices without mhwd intervention. Would you still like me to re-add the stub mhwd configs anyway? Alternatively, combining the remaining mhwd configs (excluding nvidia) into video-linux would also be an option.

Currently, 4 users have tested it, seems to work so far, but more testing has to be done.

Git repo link: https://gitlab.com/TotallyNotElite/mhwd-db-tne

We already talked about that and I still disagree. The fact of the matter is that battery life on my pre-turing laptop was still more than acceptable and the convenience of not having to restart Xorg is unmatched.

Let's not forget about the countless optimus users I've helped over the years, many being Linux critics. Having to manually set up a working solution because bumblebee doesn't work properly isn't ideal.

This is Linux, nobody is forcing you to use prime offloading.

1 Like

I know you disagree with me, you know I disagree with you. That's the point.

This will be the next logical step: removing Bumblebee options without offering any alternative.

But I get it. Simple solutions are better than more complex ones.

That wouldn't be my decision and older GPUs not supported by 435xx+ would suffer (better to have some solution that works at least some of the time than to have no solution). Don't forget that users are free to install whatever graphics solution they want. I'm just happy that nvidia FINALLY gave us a real solution to this problem (meanwhile DRI_PRIME has been doing this exact same thing for years now with open source drivers...).

I'm feeling the same as @openminded on this one: If I'm not using it I want to turn it off and don't eat energy/produce heat in any way.

Hmm, this isn't reflected by your history here. Must have been on another forum or another account.

Then all is fine and dandy and I'm all for it :slight_smile:

The GPU still goes into low power mode, so its not nearly as bad as you think.

A Linux project I work on attracts many new Linux users. Manjaro is our recommended distro since the developers are also using Manjaro and helping out there is a lot easier. Our communication channel is our telegram group. Its not rare that people try Manjaro only to end up with a broken install because of bumblebee, so that's why I pledged to work on this since a few months.

IMHO the real issue is not the freedom to use any driver you want or not.
It's actually the automatic installation for multi-vendor multi-gpu systems, which are currently stuck with bumblebee (when intel+nvidia), even if they have a Desktop, when bumblebee is clearly a laptop solution.

Then this brings mhwd devs to improve AI so a proper automatic solution is selected, especially considering the various installers that offer this by default, and Manjaro likes to provide an OOTB best experience.

In a few words... more code developing work is required, when there is so much work to be done with probably less hands/minds than are required.

This is a sad truth given the many threads regarding this topic I saw in my time here in #newbies .
I'm using an optimus laptop which just works out of the box even with nvidia disabled and using an external monitor. Didn't realize how lucky I got with this hardware till I came here :slight_smile:
That situation definitly is convoluted and complicated and could use every improvement available - so thanks for your efforts!

1 Like

Forum kindly sponsored by