sudo dmesg
Not sure, but it looks like that it tries to load the intel gpu with the nvidia driver and failed
I assume Device0 is Intel and Device1 is Nvidia?
Check the /etc/X11/xorg.conf
file. Maybe there is the wrong BusID?
EDIT: I tested it myself with:
$ inxi -Gazy
Graphics:
Device-1: AMD Trinity [Radeon HD 7560D] vendor: ASUSTeK driver: radeon
v: kernel bus-ID: 00:01.0 chip-ID: 1002:9904 class-ID: 0300
Device-2: NVIDIA GP107 [GeForce GTX 1050 Ti] vendor: ZOTAC driver: nvidia
v: 470.63.01 alternate: nouveau,nvidia_drm bus-ID: 01:00.0
chip-ID: 10de:1c82 class-ID: 0300
Display: x11 server: X.Org 1.20.13 compositor: gnome-shell v: 40.4 driver:
loaded: modesetting,nvidia display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1200 s-dpi: 96 s-size: 508x318mm (20.0x12.5")
s-diag: 599mm (23.6")
Monitor-1: VGA-1-1 res: 1920x1200 hz: 60 dpi: 94
size: 518x324mm (20.4x12.8") diag: 611mm (24.1")
OpenGL: renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2
v: 4.6.0 NVIDIA 470.63.01 direct render: Yes
Just to be sure, I set KMS:
file: /etc/modprobe.d/enable-kms.conf
options radeon modeset=1
options nvdia-drm modeset=1
and added/replaced this:
file: /etc/mkinitcpio.conf
MODULES=(radeon nvidia nvidia_modeset nvidia_uvm nvidia_drm)
I configured it like this (reverse-prime):
file: /etc/X11/xorg.conf.d/20-nvidia.conf
Section "ServerLayout"
Identifier "layout"
Screen 0 "radeon"
Inactive "nvidia"
Option "AllowNVIDIAGPUScreens"
EndSection
Section "Device"
Identifier "radeon"
Driver "modesetting"
BusID "PCI:0:1:0"
EndSection
Section "Screen"
Identifier "radeon"
Device "radeon"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
EndSection
Now i have this:
$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 4 outputs: 4 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x1fb cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 2 associated providers: 1 name:modesetting
If I use the prime-setup (radeon first), it looks like that:
file: /etc/X11/xorg.conf.d/21-radeon.conf
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "radeon"
EndSection
Section "Device"
Identifier "nvidia"
driver "nvidia"
BusID "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration"
EndSection
Section "Device"
Identifier "radeon"
driver "modesetting"
BusID "PCI:0:1:0"
EndSection
Section "Screen"
Identifier "radeon"
Device "radeon"
EndSection
$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x45 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 2 associated providers: 1 name:modesetting
Provider 1: id: 0x23e cap: 0x2, Sink Output crtcs: 4 outputs: 4 associated providers: 1 name:NVIDIA-G0
Nvidia is running as main and radeon over modesetting and can be used as Sink Output, Source Offload, which means: both GPUs can be used for screens at the same time, but I cannot switch the provider on the fly because the radeon card does not support it, but intel should.
To switch it now, I do this:
sudo mv /etc/X11/xorg.conf.d/20-radeon.conf /etc/X11/xorg.conf.d/19-radeon.conf
sudo systemctl restart display-manager
Now Radeon is active.
Switch back:
sudo mv /etc/X11/xorg.conf.d/19-radeon.conf /etc/X11/xorg.conf.d/21-radeon.conf
sudo systemctl restart display-manager
Now Nvidia is active again.
lower number ā higher prioritization
higher number ā lower prioritization
That is done without any tools, just to understand how it works and pretty simple.
Enjoy the simplicity