Automatically switch between Intel and Nvidia driver

asked 2019-03-09 14:03:55 -0500

Nathan Owen gravatar image

updated 2019-03-09 16:49:52 -0500

I am running on a Desktop that has an Intel CPU with built-in graphics and a 2080ti GPU.

I have installed NVIDAs proprietary drivers and disabled nouveau since the 2080ti is not yet supported by the included drivers (or at least I could not get X working when the 2080ti was selected in the BIOS before installing the NVIDIA drivers). The NVIDIA driver is working and I will need to keep it for when I am doing Vulkan development in Fedora.

I am currently dual booting but would prefer to use a windows VM. What I want to do is to use Gnome Boxes to boot a windows VM and let the Windows VM have control of the GPU, making X automatically switch over to using Intel graphics. This will require me to switch between monitor inputs but should otherwise be a usable solution. My problem is that l have not found a way to get Fedora to output using Intel graphics while the Nvidia driver is in use. I cannot simply disable the Nvidia driver on Fedora since I will need it when I am not using the Windows VM.

Is there any way of doing this switch-over to and from the Intel driver and Nvidia driver, preferably without rebooting?

edit retag flag offensive close merge delete

Comments

This could help: https://docs.fedoraproject.org/en-US/...

it's the same with laptops. On the other hand, if it's fully recognized VGA adpater and not a "3D Accelerator" you can just tell the kernel to use your nvidia card.

rd.driver.blacklist=<intelmodname> modprobe.blacklist=<intelmodname>

add it to /etc/default/grub at CMDLINE_LINUX

and to any "linux" line in /etc/grub2/grub.conf" or the EFI version of your grub.conf.

Edit: /etc/X11/xorg.conf:

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
End
rdtcustomercare gravatar imagerdtcustomercare ( 2019-03-12 12:11:32 -0500 )edit