[SOLVED] xrandr overrides --panning setting for HDMI display

Cpt Chuckles

New Member
Joined
Mar 17, 2020
Messages
18
Reaction score
7
Credits
147
I've hooked up a HDMI display to my laptop, and it almost works, except that my HDMI display seems to overlap with my primary display such that it ignores my --panning option.

Both my internal eDP-1 display and my HDMI-1-0 display are 1920x1080 and i'm trying to place my HDMI display on the left.
Code:
xrandr --fb 3840x1080 --output eDP-1 --primary --auto --panning 1920x1080+1920+0 \
    --output HDMI-1-0 --mode 1920x1080 --panning 1920x1080+0+0

The result is that HDMI-1-0 will always revert to panning 3840x1080+0+0 no matter what i do. This seems to result in my HDMI display overlapping with my primary display such that any full-screen windows open on HDMI display will consume both monitors, and if i open something full-screen on the eDP-1 display it will be properly constrained to the physical display.

I've tried a number of different xrandr commands, including
Code:
xrandr --output eDP-1 --primary --auto --output HDMI-1-0 --auto --left-of eDP-1
# ...
xrandr --output HDMI-1-0 --primary --auto --panning 1920x1080+0+0 --output eDP-1 --auto --panning 1920x1080+1920+0
# ...
xrandr --output HDMI-1-0 --mode 1920x1080 --panning 1920x1080+0+0 --output eDP-1 --primary --mode 1920x1080 --panning 1920x1080+1920+0

And in the end, eDP-1 takes its given panning parameter, but HDMI-1-0 will always show me that its panning parameter reverts to 3840x1080+0+0.
Code:
$ xrandr -q
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 344mm x 193mm panning 1920x1080+1920+0
   1920x1080     60.00*+  59.97    59.96    59.93 
   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 
DP-1-0 disconnected
DP-1-1 disconnected
HDMI-1-0 connected 1920x1080+0+0 521mm x 293mm panning 3840x1080+0+0
   1920x1080     60.00*+  59.94    50.00 
   1680x1050     59.95 
   1600x900      60.00 
   1440x900      59.89 
   1280x1024     75.02    60.02 
   1280x800      59.81 
   1280x720      60.00    59.94    50.00 
   1152x864      75.00 
   1024x768      75.03    70.07    60.00 
   800x600       75.00    72.19    60.32    56.25 
   720x576       50.00 
   720x480       59.94 
   640x480       75.00    72.81    59.94 
  1680x1050 (0x48) 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 (0x4f) 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
  1280x800 (0x59) 83.500MHz -HSync +VSync
        h: width  1280 start 1352 end 1480 total 1680 skew    0 clock  49.70KHz
        v: height  800 start  803 end  809 total  831           clock  59.81Hz
  1024x768 (0x60) 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 (0x6f) 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 (0x70) 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 (0x7c) 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

I have occasionally managed to accidentally make HDMI-1-0 a mirror of eDP-1, but that's not what I was going for. In any other case, HDMI-1-0 wants its content to overlap with my primary display instead of constraining its content. In this situation, it's impossible for me to full-screen a video or a game on HDMI-1-0 since it will split between the two displays, although it works fine on eDP-1.
 
Last edited:


Have you tried using something like:
arandr: Provide a simple visual front end for XRandR.
 
@f33dm3bits i tried arandr once, and not only did it fail to resolve the issue, but also after running it nothing i did with xrandr would do anything until after a reboot so i just uninstalled it. it's nothing more than a front-end to xrandr anyway so i really don't think it's necessary here, i just need to figure out why my HDMI display is overlapping my bulit-in display and why it's not taking my panning parameters
 
@f33dm3bits i tried arandr once, and not only did it fail to resolve the issue, but also after running it nothing i did with xrandr would do anything until after a reboot so i just uninstalled it. it's nothing more than a front-end to xrandr anyway so i really don't think it's necessary here, i just need to figure out why my HDMI display is overlapping my bulit-in display and why it's not taking my panning parameters
I know it's just a frontend end for xrandr, I hate making things unnecessary complicated and using command line tools just for the sake of using command line tools, that's why I recommended it. Never really had this problem but I can try if I can find a way to help you. Are you using Nvidia or Radeon for your graphics card?
 
funny, i always find the command line much simpler to understand :p

i have nvidia
specifically i'm using a thinkpad x1 extreme gen 2 with a FHD display, with a FHD Samsung S24B350 monitor over HDMI. my GPU is a GeFore 1650 max-q

i've now also tried various things like:
setting both displays to cover the same area (cloning): works as expected
setting eDP-1 --panning 3840x1080: i can pan around with the mouse and the screen scrolls
setting HDMI to be on the right side, either with --right-of or with --pos or with --panning

this all revealed something really fishy to me: the HDMI display not only ignores --panning parameters but also --pos. it also insists on setting --panning to cover the entire computed area regardless of configuration: in the case where i had the monitors overlapping (cloned), HDMI-1-0 had a panning value of 1920x1080+0+0. in all other cases this parameter matches Screen 0's current dimensions and positions it at +0+0.

eDP-1 takes --pos and --panning parameters just fine and they always work as expected.
 
Differen tasks require different tools, but I guess tools are a preference. Both of your screens are 1920x1080 right? I just found this in a wiki example, what happens when you try this:
Code:
xrandr --output eDP-1 --mode 1920x1080 --primary --pos 1920x0 --output HDMI-1-0  --mode 1920x1080 --pos 0x0

If you have an nvidia card, why not just use nvidia-settings tool? I have been using that for years to do the same without any issues.
 
Last edited:
i have tried the above command exactly with no luck; somehow HDMI-1-0 sees that with eDP-1 at 1920x0, the screen size becomes 3840x1080, and thus sets its panning parameter accordingly...

however, i didn't realize i could control the displays through my nvidia driver... lol (edit: although in this application i don't see anything i could use to set up multiple displays)
one thing i notice upon opening up nvidia-settings is that under GPU-0, only HDMI-1-0 is listed, no sign of eDP-1 anywhere. this kind of makes sense, however, since (before i started trying to use a second display) all applications would use my Intel UHD device by default unless i launch the application through prime-run. Could this be why it keeps setting HDMI-1-0 to consume the whole screen space -- because nvidia doesn't know anything about my internal display?
 
I have it running with my laptop, my laptop being the internal display my, my external display connected to my laptop via HDMI. So it sees both screens, here's the screenshot.

What Linux distro are you running and what video card and driver version are you using?
 
Last edited:
apparently i have no X Screen or X Server information displayed on my instance of nvidia-settings, even if i run as root. see screenshot attached

i'm on artix linux, with a gefore 1650 max-q and nvidia version 450.57-2

edit: i should mention that i didn't have any /etc/X11/xorg.conf file in existence until i ran nvidia-xconfig on a whim and haven't restarted X yet. I see in the generated xorg.conf that it has a ServerLayout section with Screen 0 in it; i'll see if nvidia-settings says anything about X Screen 0 after restarting X
 

Attachments

  • nvidia-settings.png
    nvidia-settings.png
    144.4 KB · Views: 571
ok so now i see X Server and X Screen 0 information, so it was a problem having no xorg.conf. Maybe the solution lies in how i configure that, because now with my HDMI-1-0 plugged in i have no use of my built-in display; xrandr -q doesn't even see eDP-1 anymore:
Code:
$ xrandr -q
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP-0 disconnected primary (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
   1920x1080     60.00*+  59.94    50.00  
   1680x1050     59.95  
   1600x900      60.00  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94

i'll dig through arch wiki for a while and see what i can find out about what to put in my xorg.conf
 

Attachments

  • nvidia-settings-after-x-restart.png
    nvidia-settings-after-x-restart.png
    103.5 KB · Views: 530
btw, I think edp-1 stand for External Display Monitor 1 not Internal.

What does your xorg.conf look like now? I don't think I'll be able to help you with this but I can tell you what has always worked for me. I rename my xorg.conf to xorg.conf.orig.backup. Then I run:

Code:
sudo nvidia-xconfig

Then I was able to open nvidia-settings and adjust the configuration settings using:
Code:
sudo nvidia-settings

It might also be worth checking if you have any other configurations in: /etc/X11/xorg.conf.d

I hope someone else here will be able to help you figure this out.
 
Last edited:
I found out that I have to disable hybrid graphics in BIOS in order for nvidia to pick up my internal display, because otherwise it's governed by the Intel UHD display device which elides nvidia's detection. According to the sacred texts (archwiki), I could have tried adding an undetected display to xorg.conf, but i had no idea what to type to make that magic happen so I turned off hybrid graphics and now everything works as expected pretty much out of the box (except I had to switch my Samsung display from right to left in nvidia-settings).

One odd side-effect however is that now my i3 status bar is really big and i had to set the font size down a few points to make it fit better. ¯\_(ツ)_/¯

for what it's worth this is how my xorg.conf looks now:
Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 450.57


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "NoLogo"
    Option         "ConnectedMonitor" "CRT,CRT"
    Screen          1
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "NoLogo"
    Option         "ConnectedMonitor" "CRT,CRT"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
 

Members online


Top