Skip to content
This repository was archived by the owner on Mar 30, 2025. It is now read-only.
Vortex Acherontic edited this page Oct 10, 2024 · 4 revisions

Do I need this?

  • GPU based on Turing (GTX 16 / RTX 20 series) or Newer
    • nvidia driver 435 or newer: NO
    • nvidia driver older than 435: YES
      • But the GPU will probably not work because earlier drivers might not have support for it anyway
  • GPU based on Pascal (GTX 10 series) or earlier: YES
    • This will require nVidia driver 390 or newer
    • bbswitch is recommended to actually turn off the GPU if not in use as these and older GPUs lack the required power management features (e.g. GSP coprocessor)
  • Open source nvidia drivers: NO

OptimusUI will evaluate most of these requirements on its own and notify the user. However, it does not validate the nvidia driver version as of now.

NOTICE: Depending on your distribution the package for prime-select might depend on further requirements not listed here

How does it work?

OptimusUI will do a brief system survey by this it checks the following things:

  • If prime-select can be found in one of the following locations (escaping the sandbox using flatpak-spawn) following path:
    • "/usr/bin/prime-select"
    • "/usr/sbin/prime-select"
    • "/bin/prime-select"
    • "/sbin/prime-select"
  • Once found it will continue and look up ALL pci devices on the host system (sandboxed) and look for devices with vendor id 0x10DE (nvidia) and if it is a GPU by looking up their device class 30000 (dekstop) and 30200 (mobile)
  • Then it will look up the GPU name using lspci -d 10DE:DEVICE_ID (sandboxed)
  • Afterward it will run lsmod | grep -i bbswtich on the host (escaping the sandbox) to verify if the bbswitch kernel module is loaded

All of this in done entirely offline and locally. The results of this system survey is not stored or uploaded anywhere

There are already interfaces for prime-select why make a new one?

Because none of these are on flathub. Which causes them not to be exactly distribution agnostic and will require the distribution in question to actually ship these interfaces. Furthermore, they are not very immutable friendly either.

There are also GNOME extensions and Plasma Widget which aim at providing similar features but these are not desktop agnostic. Hence, you can not use a KDE Plasmoid (are they still called like this?) on GNOME or a GNOME extension on KDE. Let alone entirely different desktop environments based on a different software stack.

Also in case of Gnome extensions they often tend to break on new Gnome releases and often are no longer maintained which renders them effectively unusable.

Therefore instead of porting an existing application to be a flatpak I just develop my own from scratch with flatpak already in mind.

NOTE: This application does work outside flatpak in case you want it to be a native package.

I don't run the flatpak version of this application can I still open up a bug report?

It is advised to verify first if the issue also exists within the flatpak release of this application. If so feel free to open up a bug report here.

I don't like to use the flatpak version can I request a native package for insert_distribution_here?

There are no issues with native packages and the app is developed to also work outside flatpak. While I try my best to make the application work outside of the confines of flatpak as well I also want to keep the maintenance burden as low as possible. Which means the only "officially" supported distribution format is flatpak.