Just for completeness, this also works with the amdgpu driver instead of modesetting, just the xrandr commands have to be adopted to it,
xrandr --setprovideroutputsource modesetting NVIDIA-0
has to become
xrandr --setprovideroutputsource amdgpu-blahblah NVIDIA-0
(use xrandr --listproviders to get the correct name)
or simply
xrandr --setprovideroutputsource 0 1
I just recommend using the modesetting driver for two reasons:
- on distros with PRIME infrastructure like Ubuntu this will make prime-select work since it then thinks it’s an intel
- depending on amdgpu kernel/DDX versions this sometimes has sideffects like graphical artifacts / dual mouse pointers, etc.