Hybrid Graphic Systems
Hybrid Graphics, what’s that?
Manufacturers developed technologies involving two graphic cards in a single computer, enabling both high performance and power saving usages. This technology is well supported on Windows but it’s still quite experimental with Linux distributions.
We call hybrid graphics a set of two graphic cards with different abilities and power consumption. It has nothing to do with other technologies like SLI or CrossFire, intended to improve only the computing power of a system without taking care of power consumption.
The aim of using two graphic cards is mainly to provide a good compromise between a powerful card whose power is needed only when running demanding programs, and an integrated card, which would not be well suited for those usages. On Windows, the load between the discrete and the integrated card is automatically balanced, when the right drivers are installed.
For KaOS there are two options to make this technology work.
PRIME
PRIME GPU offloading and Reverse PRIME is an attempt to support muxless hybrid graphics in the Linux kernel. All needed requirements, DRI2, updated graphic stack (Kernel, xserver and mesa), GPU drivers are available on a default KaOS install setup with free drivers.
To check if your system supports PRIME run:
If the output shows two providers, your system will work with PRIME, example output:
To use the Nouveau card in this example for offloading the Intel card:
If you have an ATI/Radeon system, replace nouveau with the output —listproviders showed for your card.
When this is done, it becomes very easy to select which card should be used. If you want to offload an application to a GPU, use DRI_PRIME=1. When the application is launched, it will use the second card to do its rendering. If you want to use the “regular” GPU, set DRI_PRIME to 0 or omit it. The behavior can be seen in the following example:
The offloading command needs to be redone after each boot or you can add it to systemsettings —> Startup and Shutdown as a start-up script containing “xrandr —setprovideroffloadsink nouveau Intel”.
More info see: http://nouveau.freedesktop.org/wiki/Optimus/
PRIME for Nvidia cards
If you prefer to use the non-free Nvidia drivers PRIME is since late 2019 also an option, for those you will need to install all needed Nvidia packages plus prime. As always, make sure your system is fully updated before installing any.
The free driver is no longer needed:
After reboot you can now select to run an application by simply calling:
Substitute glxgears with the application you want to run.
More info see: http://download.nvidia.com/XFree86/Linux-x86_64/435.21/README/primerenderoffload.html