I’m newbie on Majaro Linux (I didn’t use Arch Linux before), also I’m totally newbie with some drivers configuration.
I’ve two graphics cards: Intel UHD 630 integrated from i9-10900K and a EVGA GeForce RTX 3090
I’m trying to do a GPU Passthrough (the NVIDIA one) with only kernel params so I can have two boot menu entries (one with nvidia drivers and other with intel drivers)
Actually I’m using “video-nvidia” for the GPU and “video-linux” for the iGPU
The kernels parameters are: intel_iommu=on iommu=pt kvm.ignore_msrs=1 vfio-pci.ids=... vfio-pci.disable_vga=1
What I’m trying to do is have a normal boot with NVIDIA Drivers and a custom boot with iGPU drivers.
The only way I can achieve this is uninstalling “video-nvidia” and installing “video-hybrid-intel-nvidia-prime”, but gui apps (even xorg) runs with iGPU drivers.
Also I’ve two monitors: HDMI to RTX card, and the other one has two inputs (DisplayPort to RTX card and HDMI to iGPU), if I do normal boot with iGPU drivers, the performance is slow (is it due to multiple monitors? or having two drivers at the same time).
So, to be clear, that I’m trying to achive is to have two boot options, the normal one with nvidia propietary drivers and the second one with iGPU drivers & GPU Passthrough, but with video-nvidia it doesn’t even boot! (is it because I’m loading a driver of an “unloaded” GPU?)
I think optimus-manager would work well in this case. In the “normal” configuration, you’d add optimus-manager.startup=nvidia to the kernel command line, this would enable both GPUs and all monitors connected to any of them while rendering on the NVIDIA GPU. In the other one, you’d add optimus-manager.startup=integrated, this way Xorg would not touch the NVIDIA GPU in any way, leaving it free to be used for pass-through, and the rendering would be done by the integrated GPU, and, as expected, only monitors connected to that would be available. The video-hybrid-intel-nvidia-primemhwd configuration should be fine for this, but video-nvidia could probably work as well.
In order to install optimus-manager, you’d need to remove (back up) any Xorg configuration (/etc/X11/xorg.conf, any “video” related files in /etc/X11/xorg.conf.d/ - e.g. 00-keyboard.conf is not “video” related). Then you can install optimus-manager (or you can opt for optimus-manager-git from the AUR). Then please carefully read this section in the README since you seem to use KDE. After that confirm that the service is enabled: systemctl status optimus-manager.
Then you may want to copy the default configuration file (/usr/share/optimus-manager.conf) to the /etc/optimus-manager/ directory and customize the options (e.g. enable triple buffering, etc.; the file is well commented). But this step is probably not required.
Afterwards you could add the kernel command line options to the particular entries. Then reboot. And hopefully everything will work.
Also the GPU Passthrough doesn’t work (I don’t get image on the guest OS). This issue can be related this?
EDIT: I have not an /etc/X11/xorg.conf but I have an /etc/X11/xorg.conf.d/90-mhwd.conf that was generated after the installation of video-nvidia. Should I delete it as well?
EDIT 2: Nevermind, optimus-manager installation instructions are pretty clear. Sorry.
EDIT 3: I’ve some issues with optimus-manager. For instance, if I startup with optimus-manager.startup=nvidia kernel command line, it starts up both iGPU and GPU, but the mouse display only on GPU (RTX/displayport) and the keyboard works only on iGPU (integrated/HDMI), and my KDE widgers are visibly only on iGPU (HDMI) display, also every app I open on iGPU opens itself on GPU display. optimus-manager.startup=integrated works well tho.
Is there any way to load nvidia drivers ONLY? (so KDE cannot display anything on iGPU). I really don’t need iGPU on “normal boot”. I though that optimus-manager.startup=nvidia loads nvidia driver only but it doesn’t.
EDIT: I added i915.modeset=0 along with optimus-mode.startup=nvidia as a workaround. I don’t know if it’s a suitable solution. Also some GUI apps such as System Settings lags the entrie desktop a little bit with NVIDIA Drivers, but it’s a problem of propietary drivers for sure.
It was a “mix” of displays I think. The mouse are visible only in the display with displayport (connected to the nvidia), and the second screen (HDMI connected to the nvidia) display a default KDE desktop for some reason), and the keyboard (press Super to open apps menu for example) becomes visible only on the HDMI display (connected to the integrated). Also the apps opened while on HDMI (integrated) becomes visible on the displayport (nvidia) screen.
But with the workaround I posted before it works perfectly. Since I don’t need the integrated GPU in “normal boot”.
Well, disabling modesetting, while it is a pragmatic solution, probably not the best. Maybe modprobe.blacklist=i915 is a bit better. The best would be if optimus-manager had an “nvidia-only” mode, but alas, it does not.
If I’m not mistaken, both video cards are connected to the same, 2560x1440, 144 Hz, monitor, right? If so, I can imagine that might have caused some confusion somewhere.
By the way, if the nouveau driver is blacklisted (which it should be since you have video-hybrid-intel-nvidia-prime), then I believe this is not needed.
I’ll try with modprobe.blacklist=i915 solution. Thank you!
Yeah, you are right. Both video cards are connected to the same 144hz monitor. Also I’ve another monitor connected to the nvidia GPU.
Also I haven’t video-hybrid-intel-nvidia-prime installed. I installed video-nvidia and video-linux.
To clarify for future users:
We installed optimus-manager with correct configuration for KDE Plasma desktop.
Within the optimus-manager installation, we deleted related “video configs” from /etc/X11/xorg.conf.d. Also we have deleted the /etc/X11/xorg.conf file.
We added kernel commandline optimus-manager.startup=nvidia i915.modeset=0 for nvidia-only setup and optimus-manager.startup=integrated nouveau.modeset=0 for integrated-only setup (NVIDIA Drivers installed:video-nvidia).
Also, as suggested by @pobrn, we should replace i915.modeset=0 with modprobe.blacklist=i915 in nvidia-only setup (again, with video-nvidia driver installed for GPU and video-linux driver installed for iGPU).
Also, suggesteed by @pobrn, we may want to change default configuration for optimus-manager:
I will edit this comment based on results of modprobe.blacklist=i915 workaround.