This is a fork of FedoraPrime enhanced for all linux distributions.
Please read Offload file for more details.
Seeking for a tools to swicht entirely from default Intel® GPU to the discret Nvidia® graphic card, I discover FedoraPrime.
It comes really useful for my default distro, Fedora, but not so cool for my custom Nvidia® driver install, FedoraPrime is Fedora only with a default driver config.
Thus, I discided to go deeper to solve that particular issue and a few others as well.
WARNING: Do a 'sudo make install' this time, too much important things changed and don't forget to make a backup of /etc/nvidia-prime.
(with root/admin terminal, do:)
mv -f /etc/nvidia-prime /etc/nvidia-prime.bak (to remove safely after controls)
There were many issues with grub config reported. It is hopefully fix and updated now. Please don't forget to report even if you think it's too minor and pointless.
Dev test was running on Fedora 24, since upgraded to Fedora 27 it appears that xrandr on modesettings is broken and dosn't work anymore for discret nvidia.
Finally, the script needed a complete rewrite. For user, basics are still the same, but they work differently than the previous version.
Read Changelog display before install/uninstall/update.
Thanks to the Nvidia Devtalk thread and to nospam_ that giving me the necessary base to understand what changed.
Also added a libraries and xorg config editor.
Library.conf is install by default and checked if configured.
There stil some issue with some session managers, see Known Issues at page bottom.
Hope you'll like those changes and don't forget to send any bug you get. :)
Big mistake in repos upload :s. Forgot to send library.conf with last upgrade. My apologies.
Multi display issue, see CHANGELOG.md.
Added options config file, report.sample and some fixes to grub and xrandr sections. See CHANGELOG.md.
In old version it was mandatory to edit library.conf first in case of special Nvidia drivers install. Now you can setup them directly with nvidia-prime-ui before entering you new setup.
Gnome and Cinnamon use a monitors.xml(~/.config/monitors.xml) file to keep your screen config and overide any other setup if it doesn't match the xml file.
Gdm Gnome3 may cause issue in some case. See Issue chapter in bottom ofthe page and send report if you can fix it this way.
nvidia-prime-select comes with a library.conf file to set custom installation directories up (same case if you come from an other distro). If you're in this case, edit it first before launching/installing anything.
Example of my custom driver install in Fedora 23:
nv_drv_32='/opt/nvidia/lib' nv_drv_64='/opt/nvidia/lib64' nv_xorg_path='/opt/nvidia/xorg/modules' rc_dir='/etc/rc.d'
Or use the simpliest way and launch nvidia-prime-ui from settings menu.
nvidia-prime-select come also with 2 default xorg configs for Intel® and Nvidia®. Edit them as you wish before or after luanching command (edit function is available in nvidia-prime-ui).
nvidia-prime-select use the same install process as FedoraPrime :
git clone https://github.com/wildtruc/nvidia-prime-select.git cd nvidia-prime-select sudo make install
To update, run :
sudo make update
To uninstall, run :
sudo make uninstall
When done, launch the commandline as admin/superuser or with nvidia-prime-ui as normal user. Then logout and restart your session.
The script will setup your actual xrandr configuration automatically.
Option "DPI" "96 x 96" is set by default in the xorg.nvidia.conf because xrandr set it at 75 by default. If you have a weaker Nvidia® GPU, it's maybe a good thing to let it at 75 if you want to play some games smoother.
Usually when the Nvidia® GPU starts the screen display some weird black lines at first, if it is, it means that Nvidia® GPU is started.
The script has been test on Gnome Shell, Gnome Classic, Cinnamon, LXQT, Kodi (for previous version, lightdm only for new one).