Intel UHD Drivers & Nvidia drivers

Hello there! How is it going?

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?)

Thank you for all your assistance!

Can you please clarify which monitors are connected how? And post the output of inxi -Gazy and xrandr --listproviders?

Yeah, sure! Thank you.

Two monitors

First one: HDMI from the RTX
Second one: HDMI from the iGPU (the motherboard connector) and displayport from the RTX (it has two inputs)

Also the commands output:

Graphics:
  Device-1: Intel vendor: ASUSTeK driver: i915 v: kernel bus-ID: 00:02.0 
  chip-ID: 8086:9bc5 class-ID: 0300 
  Device-2: NVIDIA GA102 [GeForce RTX 3090] vendor: eVga(dot)com. driver: vfio-pci 
  v: 0.2 alternate: nouveau,nvidia_drm,nvidia bus-ID: 01:00.0 
  chip-ID: 10de:2204 class-ID: 0300 
  Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: 
  loaded: modesetting unloaded: intel alternate: fbdev,vesa display-ID: :0 
  screens: 1 
  Screen-1: 0 s-res: 2560x1440 s-dpi: 96 s-size: 677x381mm (26.7x15.0") 
  s-diag: 777mm (30.6") 
  Monitor-1: HDMI-2 res: 2560x1440 hz: 60 dpi: 93 size: 697x392mm (27.4x15.4") 
  diag: 800mm (31.5") 
  OpenGL: renderer: Mesa Intel UHD Graphics 630 (CML GT2) v: 4.6 Mesa 21.0.2 
  direct render: Yes 

and the second one

Providers: number : 1
Provider 0: id: 0x45 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 3 associated providers: 0 name:modesetting

Right now I’m running Manjaro with “video-hybrid-intel-nvidia-prime” drivers.

Thank you!

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-prime mhwd 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.

I’ll try it right now! Thanks!

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.

Thanks!

Can you post the output of inxi -Gazy and xrandr --listproviders when optimus-manager.startup=nvidia is set?

Yeah, for sure!

Graphics:
  Device-1: Intel vendor: ASUSTeK driver: i915 v: kernel bus-ID: 00:02.0 
  chip-ID: 8086:9bc5 class-ID: 0300 
  Device-2: NVIDIA GA102 [GeForce RTX 3090] vendor: eVga.com. driver: nvidia 
  v: 460.67 alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:2204 
  class-ID: 0300 
  Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: 
  loaded: modesetting,nvidia display-ID: :0 screens: 1 
  Screen-1: 0 s-res: 6800x1440 s-dpi: 96 s-size: 1799x381mm (70.8x15.0") 
  s-diag: 1839mm (72.4") 
  Monitor-1: HDMI-0 res: 1680x1050 hz: 60 dpi: 93 size: 459x296mm (18.1x11.7") 
  diag: 546mm (21.5") 
  Monitor-2: DP-0 res: 2560x1440 hz: 144 dpi: 93 size: 697x392mm (27.4x15.4") 
  diag: 800mm (31.5") 
  Monitor-3: HDMI-1-2 res: 2560x1440 hz: 60 dpi: 93 
  size: 697x392mm (27.4x15.4") diag: 800mm (31.5") 
  OpenGL: renderer: GeForce RTX 3090/PCIe/SSE2 v: 4.6.0 NVIDIA 460.67 
  direct render: Yes

Providers: number : 2
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 4 outputs: 7 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x209 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 3 associated providers: 1 name:modesetting

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.

Graphics:
  Device-1: Intel vendor: ASUSTeK driver: N/A alternate: i915 bus-ID: 00:02.0 
  chip-ID: 8086:9bc5 class-ID: 0300 
  Device-2: NVIDIA GA102 [GeForce RTX 3090] vendor: eVga.com. driver: nvidia 
  v: 460.67 alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:2204 
  class-ID: 0300 
  Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: 
  loaded: nvidia unloaded: modesetting display-ID: :0 screens: 1 
  Screen-1: 0 s-res: 4240x1697 s-dpi: 96 s-size: 1121x448mm (44.1x17.6") 
  s-diag: 1207mm (47.5") 
  Monitor-1: HDMI-0 res: 1680x1050 hz: 60 dpi: 93 size: 459x296mm (18.1x11.7") 
  diag: 546mm (21.5") 
  Monitor-2: DP-0 res: 2560x1440 hz: 144 dpi: 93 size: 697x392mm (27.4x15.4") 
  diag: 800mm (31.5") 
  OpenGL: renderer: GeForce RTX 3090/PCIe/SSE2 v: 4.6.0 NVIDIA 460.67 
  direct render: Yes 

Providers: number : 1
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 4 outputs: 7 associated providers: 0 name:NVIDIA-0

Since optimus-manager is mainly used on laptops, the nvidia mode actually enables both GPUs but configures the rendering on the NVIDIA GPU.


What do you mean by these?

Oh, I understand. Thanks for the explain!

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”.

So, to clarify, I did this:

GRUB_CMDLINE_LINUX="optimus-manager.startup=nvidia i915.modeset=0"
export GRUB_CMDLINE_LINUX_GPU_PT="optimus-manager.startup=integrated nouveau.modeset=0 intel_iommu=on iommu=pt kvm.ignore_msrs=1 vfio-pci.ids=... vfio-pci.disable_vga=1"

And the installation steps of optimus-manager that you provide. Thank you!

Is it a suitable solution?

Thank you a lot!

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:

  1. We installed optimus-manager with correct configuration for KDE Plasma desktop.
  2. 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.
  3. 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.

Thank you a lot!

I see, nouvea.modeset=0 should still be unnecessary.

You are right, nouveau is the open source driver so it isn’t loaded with propietary drivers.

It’s working flawlessly!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.