06 Aug 2018
Although this has only been tested in System76’s Oryx Pro I suppose it can be used in other distributions as well with a bit of work.
In a previous post I explained how to use your discrete GPU for specific applications while still running your main screen on your integrated GPU.
This is pretty convenient because you don’t have to reboot to play a game or use your GPU in a specific application, but it made other things more difficult like using external monitors since they are all wired to the discrete GPU.
In this post we will replicate Pop! OS ability to boot exclusively into your discrete GPU and have the ability to use external monitors (technically you can use external monitors with bumblebee but it requires some effort).
If you have installed bumblebee we have to get rid of it as it includes some configuration to blacklist nvidia drivers and that will interfere with our set up.
Install required software
You will need this packages to pull this off:
There is usually a discussion about using nouveau and how Nvidia is evil and how much they suck but I still want to get as much of my video card as I am able (with Linux) so I use their drivers.
This package is available in the AUR. I personally use aurman.
This utility allows you to switch GPU’s, turn on the discrete card on or off, or switch power profiles. Overall, if you have a System76 machine you want this.
Something important of note is that (at the time of this writing) the nvidia-utils package includes the following (very important) configuration file:
It enables the modsetting driver and loads the nvidia driver (if available). This fortunately doesn’t get in the way when using the Intel GPU.
One thing to note is that using the modesetting driver breaks xbacklight. If you don’t use a desktop environment and rely on it to change the screen backlight you will have to change how you do it.
Telling Xorg to use the discrete GPU
In order to use your discrete GPU we depend on a technology called PRIME. It allows you to offload rendering to different GPUs, and more importantly for the matter at hand, to have one GPU (integrated) to display the output rendered by another GPU (your discrete).
Where you put the following instructions depends on how you run your X server. Run startx manually
You can put them in
Using a desktop manager
Create the following script:
And use one of the following methods mentioned here as it is dependant of which manager you use.
That is it!. Now you just need to run:
Enjoy. If you can’t get it working or have any suggestion, please reach out.