Hello, I have a laptop with Intel integrated graphics paired with an NVidia GeForce 950M card.
Since the HDMI port is connected to the NVidia chip, in order to use an external monitor until now I configured Xorg to use NVidia only. However I was wondering if there was a way to use Intel by default and NVidia for certain applications while still retaining the external monitor.
I followed this guide for reverse PRIME on the Arch Wiki (I also had to do this for it to work). Now the output of xrandr --listproviders is:
Providers: number : 2
Provider 0: id: 0x44 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 1 name:modesetting
Provider 1: id: 0xcc cap: 0x2, Sink Output crtcs: 4 outputs: 1 associated providers: 1 name:modesetting
The external monitor is detected; the output of xrandr -q is:
Screen 0: minimum 320 x 200, current 3839 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1920x1080 60.01*+ 60.01 59.97 59.96 59.93 40.00
1680x1050 59.95 59.88
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.02
1400x900 59.96 59.88
1280x960 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1280x800 59.99 59.97 59.81 59.91
1280x720 60.00 59.99 59.86 59.74
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
960x540 59.96 59.99 59.63 59.82
800x600 60.00 60.32 56.25
840x525 60.01 59.88
864x486 59.92 59.57
700x525 59.98
800x450 59.95 59.82
640x512 60.02
700x450 59.96 59.88
640x480 60.00 59.94
720x405 59.51 58.99
684x384 59.88 59.85
640x400 59.88 59.98
640x360 59.86 59.83 59.84 59.32
512x384 60.00
512x288 60.00 59.92
480x270 59.63 59.82
400x300 60.32 56.34
432x243 59.92 59.57
320x240 60.05
360x202 59.51 59.13
320x180 59.84 59.32
HDMI-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-2 connected (normal left inverted right x axis y axis)
1920x1080 60.00 + 74.97 50.00 59.94
1680x1050 59.95
1280x1024 75.02 60.02
1440x900 59.89
1280x960 60.00
1280x720 60.00 50.00 59.94
1024x768 75.03 70.07 60.00
800x600 72.19 75.00 60.32 56.25
720x576 50.00
720x480 59.94
640x480 75.00 72.81 59.94 59.93
1680x1050 (0x4b) 146.250MHz -HSync +VSync
h: width 1680 start 1784 end 1960 total 2240 skew 0 clock 65.29KHz
v: height 1050 start 1053 end 1059 total 1089 clock 59.95Hz
1280x1024 (0x52) 108.000MHz +HSync +VSync
h: width 1280 start 1328 end 1440 total 1688 skew 0 clock 63.98KHz
v: height 1024 start 1025 end 1028 total 1066 clock 60.02Hz
1280x960 (0x55) 108.000MHz +HSync +VSync
h: width 1280 start 1376 end 1488 total 1800 skew 0 clock 60.00KHz
v: height 960 start 961 end 964 total 1000 clock 60.00Hz
1024x768 (0x63) 65.000MHz -HSync -VSync
h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 48.36KHz
v: height 768 start 771 end 777 total 806 clock 60.00Hz
800x600 (0x72) 40.000MHz +HSync +VSync
h: width 800 start 840 end 968 total 1056 skew 0 clock 37.88KHz
v: height 600 start 601 end 605 total 628 clock 60.32Hz
800x600 (0x73) 36.000MHz +HSync +VSync
h: width 800 start 824 end 896 total 1024 skew 0 clock 35.16KHz
v: height 600 start 601 end 603 total 625 clock 56.25Hz
640x480 (0x7f) 25.175MHz -HSync -VSync
h: width 640 start 656 end 752 total 800 skew 0 clock 31.47KHz
v: height 480 start 490 end 492 total 525 clock 59.94Hz
However, when I try to enable it with xrandr --output HDMI-1-2 --auto, the output I get is:
xrandr: Configure crtc 3 failed
And I also get the following messages in dmesg:
[ 3823.706500] [drm:nv_drm_dumb_map_offset [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup gem object for mapping: 0x00000006
[ 3823.706533] [drm:nv_drm_dumb_map_offset [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup gem object for mapping: 0x00000007
When I do it with a graphical program (KDE system settings) nothing happens.
My distribution is Arch Linux, NVidia is 470.63.01.
Doing this on Wayland seems to work, although the external screen is pretty laggy.
EDIT: my situation is pretty much identical to the one described here: video - Mysterious problem on setting up Reverse Prime (NVIDIA Optimus offloading through OutputSink) for an HDMI external monitor - Unix & Linux Stack Exchange