We need your help to create an optimus install script

Everyone here with an Optimus laptop, or such a system with hybrid dual-GPU, is called upon to provide information and possibly test the script.

We want to create a solution to easily install the needed drivers and apps e.t.c. to run EndeavourOS on these Systems.

lspci -vnn | grep '\''[030[02]\]'
inxi -G
and any information about the hardware will help at first, we will come back here if we need more.

It is also interesting what solution you currently using, any links or details are very appreciated.

The wiki on that tasks is also currently updated but will need some love on covering all possibilities:


Have you looked at the work already being done by Garuda? That might be a good starting point, or more ideally something to collaborate on.

1 Like

Definitely a good info / help can be obtained from @dglt and @linesma

P.S. Luckily myself i avoid hardware with such crap tech, since it bitten me before :laughing:
But your goal is very noble :slight_smile: :+1:


Yes i do see that, we first start now collecting, and then start finding the way to handle.
// B.T.W. does garuda have optimus scripts?

1 Like

This is really awesome! I just installed EOS with the nvidia option, it connects to my nvidia card when I connect an external screen, else it uses intel on the laptop. To me its a good balance to get good battery life on the go. I tried optimus and switching graphics manually (in October-Nov 2020) but this did not go well, also sometimes broke during updates. The only distros this worked for me was manjaro and pop OS, they seem to have implemented this quite well, although manjaro had some problems with nvidia drivers in Dec/Jan due to the recent upgrade in the Arch repository.

Edits: - may be important to also list DE, I have Plasma 5.20.5, all this on Lenovo thinkpad P1 (work computer) - I read stuff about optimus, prime etc. a dozen of time but I am still puzzled how this all works.

 lspci -vnn | grep '\''[030[02]\]'
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 (Mobile) [8086:3e9b] (rev 02) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117GLM [Quadro T2000 Mobile / Max-Q] [10de:1fb8] (rev a1) (prog-if 00 [VGA controller])

inxi -G
  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 
  Device-2: NVIDIA TU117GLM [Quadro T2000 Mobile / Max-Q] 
  driver: nvidia v: 460.39 
  Device-3: Chicony Integrated Camera type: USB driver: uvcvideo 
  Display: x11 server: X.org 1.20.10 driver: 
  loaded: intel,nvidia unloaded: fbdev,modesetting,vesa 
  resolution: <missing: xdpyinfo> 
  Message: Unable to show advanced data. Required tool glxinfo 

1 Like

Also, haven’t check it in a while, but initiative idea was great in terms of solving hardware problems cross-distro, might wanna see what’s up with them

1 Like

They are using a version of mhwd that has been customized for arch/garuda.

You can see the graphics scripts here:

1 Like

i know that but last time i do check on mhwd they do only handle Nvidia but not optimus…

Here is one of them:

Here is another:

Another one here:


yea i see now looking very enhanced Garuda is putting a lot of work into this, i would also simple use mhwd, and it looks like Garuda is already porting this to work with arch itself.
And 100% is that we want to work together :handshake:


Sharing mine here:

lspci -vnn | grep '\''[030[02]\]'
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 620 [8086:5916] (rev 02) (prog-if 00 [VGA controller])
01:00.0 3D controller [0302]: NVIDIA Corporation GM107 [GeForce 940MX] [10de:179c] (rev ff) (prog-if ff)

inxi -G
Graphics:  Device-1: Intel HD Graphics 620 driver: i915 v: kernel 
           Device-2: NVIDIA GM107 [GeForce 940MX] driver: N/A 
           Device-3: Chicony HD WebCam type: USB driver: uvcvideo 
           Display: wayland server: X.org 1.20.10 driver: loaded: modesetting resolution: <missing: xdpyinfo> 
           OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.3.4 

Using Gnome on Wayland. Intel only. My dGPU is powered off via bbswitch as i’m not using it currently. Used to use nvidia-prime in the past to run games on the dGPU (on X11 back then, Nvidia you know…) :roll_eyes:

1 Like

@joekamprad Since I was linked into this thread, here are my thoughts.

While I am flattered at @keybreak 's post about Optimus-Switch, I have to issue some cautions. First off, the main script is no longer actively maintained by the original dev. So far, nothing has changed with xorg that requires a revision. This reliance on xorg is also a long term problem. As Wayland matures and the nVidia driver will (hopefully one day) support it without issues, these scripts will become obsolete. I will do my best to try and update them as needed, but my knowledge in this area is limited. These are the reasons why I think that it should not be included as a default option. As an option for users to choose from, yes, but default, no.

I do have a couple of concerns about going the mhwd route. The biggest is that mhwd does not use the default naming conventions for config files and its use of custom directories. The config files created have mhwd appended to them and some of them are placed in directories that are not the default. This can cause issues when updating and installing a driver and if the distro wants to keep things as close to Arch as possible. This leads to my second concern, the use of a custom naming convention will cause more work for the maintainers of the distro. They will have to create/ maintain a custom kernel that makes use of the naming conventions and modify/ maintain the driver. If this issue is fixed, then I like the idea of using mhwd. So far, all the tools EnOS brings to the table are transparent to a normal Arch install. In my opinion, it would not be good to change that.

Finally, my concern with Optimus-Manager. For Gnome, or any other DE that uses GDM, it requires the use of modified version of GDM from the AUR. From what I recall, it adds in the “patches” that Ubuntu does to the upstream code to allow for the switching of GPU’s to take place. While I have no problem relying on the AUR for programs, when it comes to core system related stuff, I am very wary. A distro should be as close to upstream as possible. Any tweaks that they do, should be maintained by them and not a third-party source.

I wish that I could be of more help, but as I said before, my knowledge is limited. Since I have an extra SDD I can throw in my laptop, I would be willing to be a tester and give feed back.


Yeah i agree on mhwd point - non-standard config files are not helpful, better stick to Arch

To the nature of doing EndeavourOS in my spare time, I do not follow that much on Manjaro and mhwd function and development… But @linesma and @keybreak are right, if it is needed to change the default way to configure drivers and configs, we will not go that way.

But we need a way to detect hardware and configure basic system drivers in a more convenient way than the pure Archway.
That’s one of our core features.
Staying close to arch but making it more convenient to use, in my opinion, the basic system should be working out of the box, a user should not be forced to need to set up drivers and basic system features manually, they should work as they should, ready to fine-tuning them as you want.

And we already have nvidia-installer as a script, we can get informed and working on enhance this way of configuration to work also for optimus-manager and optimus-manager-qt.
But yes true GDM/GNOME and also Plasma need special changes, possible to test if this is needed, on GNOME you could use lightdm and Plasma may not need the extra plasma features to work good?
Both optimus-manager and the qt “rider” are from AUR, but developers are reachable and development is transparent:

I do not think we should start to create our own switcher tool if it is there already.

Hardware detection and using it to set up hardware to simply work is the main goal to get working!


about this you can be rest assured that mhwd wont create any additional file if its not speified in the mhwd-db of that config

this is how optimus manager config is done in garuda
as for optimus switch i believe that can be done as well in mhwd.

we just need to detect which dm is installed or its service is active and install that script

before i wasnt sure but now i am

1 Like

I honestly think that this will not be possible with the current state of Optimus support under Linux. Some sort of user interaction during the install will be required.

Why not just edit the script a little bit. My concerns about using the AUR for core system components aside, one idea is, when the script runs, have it ask the user if they are installing it on a laptop with Optimus graphics. If they answer yes, the script can then ask the user what DE they are using and then install the appropriate version of Optimus-Manager.

Or after the user states that they are installing this on a laptop, give them a choice between “Prime” mode where the nVidia card is used all the time or Optimus-Manager for a switching setup. Then have the script install the appropriate configurations and files.


it is only a wish, I know that it is not jet possible, it needs to know your hardware, what is not bad at all also…

1 Like

that is what @manuel is already starting to work on…
My idea is to have different scenarios as options like:
nvidia-installer --optimus-amd-nvidia


That is probably the best option. Like I said before, if you need someone to test out if the script works or not, let me know.

[onyx@onyx-laptop ~]$ lspci -vnn | grep '\''[030[02]\]'
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 (Mobile) [8086:3e9b] (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] [10de:1f91] (rev a1) (prog-if 00 [VGA controller])
[onyx@onyx-laptop ~]$ inxi -G
  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] driver: nvidia 
  v: 460.39 
  Display: x11 server: X.Org 1.20.10 driver: loaded: modesetting,nvidia 
  resolution: 1920x1080~60Hz 
  OpenGL: renderer: GeForce GTX 1650/PCIe/SSE2 v: 4.6.0 NVIDIA 460.39 
[onyx@onyx-laptop ~]$ 

with Plasma running Optimus Manager Qt.
Laptop is Asus ROG Strix III G531GT

1 Like