5

We have flexible workspaces at work, all the workplaces are the same, but one screen might have DVI on the left instead of the right etc, so i will need to change the outputs, but the screen sizes and placements are always the same.

My problem is, that I have a large 2560x1600 screen in the middle, and one 1920x1200 screen on each side of this large screen.

Everyday when I come to work, I normally just write

xrandr --output "VGA-1-1" --mode 1920x1200 --output DP-2 --mode 2560x1600 --left-of VGA-1-1  --output DP-3 --mode 1920x1200 --left-of DP-2

But for some reason, if I switch to another workspace, the large screen might be DP-3 instead, so I just use xrandr to find the right outputs.

NOW the problem is that very often, nvidia decides to override my settings, because normally I have one screen on each window, so it does not think it is just one large screen, but rather 3 screens. But nvidia makes a large virtual screen with all 3 screens, so the left and the middle works fine, but when i move my mouse from my middle to the right, the whole screen scrolls over, like you would just have a large virtual screen in the middle...

Any ideas how I can fix this? Outputs are:

$ xrandr
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm panning 3840x1200+0+0
   1920x1200     59.95*+  59.88  
   1920x1080     59.94  
   1680x1050     59.95  
   1440x900      59.89  
   1400x1050     59.98  
   1280x1024     60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94  
   1024x768      60.00  
   800x600       60.32    56.25  
   720x480       59.94  
   640x480       59.94  
LVDS-1-1 connected
   640x480       59.94  
   320x240       60.05  
VGA-1-1 connected 1920x1200+1920+0 519mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00  
   1680x1050     59.95  
   1400x1050     59.98  
   1280x1024     60.02  
   1440x900      59.89  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00  
   1024x768      60.00  
   800x600       60.32    56.25  
   640x480       60.00  

640x480 (0x45) 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
  1920x1200 (0x47) 154.000MHz +HSync -VSync
        h: width  1920 start 1968 end 2000 total 2080 skew    0 clock  74.04KHz
        v: height 1200 start 1203 end 1209 total 1235           clock  59.95Hz
  1680x1050 (0x49) 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
  1400x1050 (0x4a) 121.750MHz -HSync +VSync
        h: width  1400 start 1488 end 1632 total 1864 skew    0 clock  65.32KHz
        v: height 1050 start 1053 end 1057 total 1089           clock  59.98Hz
  1280x1024 (0x4b) 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
  1440x900 (0x4c) 106.500MHz -HSync +VSync
        h: width  1440 start 1520 end 1672 total 1904 skew    0 clock  55.93KHz
        v: height  900 start  903 end  909 total  934           clock  59.89Hz
  1280x960 (0x4d) 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
  1280x800 (0x4e) 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
  1280x720 (0x4f) 74.250MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  45.00KHz
        v: height  720 start  725 end  730 total  750           clock  60.00Hz
  1024x768 (0x50) 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 (0x51) 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 (0x52) 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

As you can see, some of this panning is insane, it does not happen every time, and there is no ways for me to fix this. Reboots does not help either.

$ xrandr|head -1
Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 16384 x 16384

This happens if I turn on the large display:

$ xrandr
Screen 0: minimum 8 x 8, current 6400 x 1600, maximum 16384 x 16384
LVDS-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-2 connected primary 2560x1600+1920+0 (normal left inverted right x axis y axis) 641mm x 400mm
   2560x1600     59.97*+
   1920x1200     59.88  
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      59.89  
   1400x1050     59.98  
   1360x765      59.85  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    72.81    59.94  
DP-3 connected 1920x1200+2667+0 (normal left inverted right x axis y axis) 519mm x 324mm panning 6400x1200+0+0 tracking 6400x1600+0+0 border 0/0/0/0
   1920x1200     59.95*+  59.88  
   1920x1080     59.94  
   1680x1050     59.95  
   1440x900      59.89  
   1400x1050     59.98  
   1280x1024     60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94  
   1024x768      60.00  
   800x600       60.32    56.25  
   720x480       59.94  
   640x480       59.94  
LVDS-1-1 connected
   640x480       59.94  
   320x240       60.05 
VGA-1-1 connected 1920x1200+4480+0 519mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00  
   1680x1050     59.95  
   1400x1050     59.98  
   1280x1024     60.02  
   1440x900      59.89  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00  
   1024x768      60.00  
   800x600       60.32    56.25  
   640x480       60.00  
  640x480 (0x45) 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
  1920x1200 (0x47) 154.000MHz +HSync -VSync
        h: width  1920 start 1968 end 2000 total 2080 skew    0 clock  74.04KHz
        v: height 1200 start 1203 end 1209 total 1235           clock  59.95Hz
  1680x1050 (0x49) 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
  1400x1050 (0x4a) 121.750MHz -HSync +VSync
        h: width  1400 start 1488 end 1632 total 1864 skew    0 clock  65.32KHz
        v: height 1050 start 1053 end 1057 total 1089           clock  59.98Hz
  1280x1024 (0x4b) 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
  1440x900 (0x4c) 106.500MHz -HSync +VSync
        h: width  1440 start 1520 end 1672 total 1904 skew    0 clock  55.93KHz
        v: height  900 start  903 end  909 total  934           clock  59.89Hz
  1280x960 (0x4d) 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
  1280x800 (0x4e) 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
  1280x720 (0x4f) 74.250MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  45.00KHz
        v: height  720 start  725 end  730 total  750           clock  60.00Hz
  1024x768 (0x50) 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 (0x51) 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 (0x52) 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

And if i change to my normal workspace, where all 3 screens are working, it looks like this:

$ xrandr
Screen 0: minimum 8 x 8, current 6400 x 1600, maximum 16384 x 16384
LVDS-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 connected 1920x1200+4480+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200     59.95*+
   1680x1050     59.95  
   1440x900      59.89  
   1400x1050     59.98  
   1280x1024     60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00  
   1024x768      60.00  
   800x600       60.32    56.25  
   720x480       59.94  
   640x480       59.94  
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-2 connected primary 2560x1600+1920+0 (normal left inverted right x axis y axis) 641mm x 400mm
   2560x1600     59.97*+
   1920x1200     59.88  
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      59.89  
   1400x1050     59.98  
   1360x765      59.85  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    72.81    59.94  
DP-3 disconnected (normal left inverted right x axis y axis)
LVDS-1-1 connected
   640x480       59.94  
   320x240       60.05  
VGA-1-1 connected 1920x1200+0+0 519mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00  
   1680x1050     59.95  
   1400x1050     59.98  
   1280x1024     60.02  
   1440x900      59.89  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00  
   1024x768      60.00  
   800x600       60.32    56.25  
   640x480       60.00  
  640x480 (0x45) 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
  1920x1200 (0x47) 154.000MHz +HSync -VSync
        h: width  1920 start 1968 end 2000 total 2080 skew    0 clock  74.04KHz
        v: height 1200 start 1203 end 1209 total 1235           clock  59.95Hz
  1680x1050 (0x49) 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
  1400x1050 (0x4a) 121.750MHz -HSync +VSync
        h: width  1400 start 1488 end 1632 total 1864 skew    0 clock  65.32KHz
        v: height 1050 start 1053 end 1057 total 1089           clock  59.98Hz
  1280x1024 (0x4b) 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
  1440x900 (0x4c) 106.500MHz -HSync +VSync
        h: width  1440 start 1520 end 1672 total 1904 skew    0 clock  55.93KHz
        v: height  900 start  903 end  909 total  934           clock  59.89Hz
  1280x960 (0x4d) 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
  1280x800 (0x4e) 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
  1280x720 (0x4f) 74.250MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  45.00KHz
        v: height  720 start  725 end  730 total  750           clock  60.00Hz
  1024x768 (0x50) 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 (0x51) 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 (0x52) 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
2
  • 1
    DP-2 is not detected! Could you check or swap cables and monitors?
    – user.dz
    Nov 24, 2016 at 10:01
  • 2
    As i mentioned, the one that is working, and the other workspace with the same screens does not use the same outputs, please see all the 3 logs i have added, there is one with 2 screens, and 2 with 3 screens, one that is working, and one that is not.
    – Marius
    Nov 24, 2016 at 10:15

3 Answers 3

2

I also had some weird panning added in some situations. I ended up using nvidia-settings instead of xrandr. The syntax is much more messy but it works.

Here's an example command :

nvidia-settings --assign "CurrentMetaMode=DP-5: nvidia-auto-select @1680x1050 +0+0 {ViewPortIn=1680x1050, ViewPortOut=1680x1050+0+0, ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, DP-2: nvidia-auto-select @1920x1080 +1680+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0, ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, DP-1: nvidia-auto-select @1920x1080 +3600+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0, ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"

You can get your "current meta mode" with nvidia-settings --query CurrentMetaMode. The display names are different in this output than in xrandr, you can get the aliases with nvidia-settings --query dpys.

3
  • Thank you, this was an absolute life-saver (ThinkPad T430, nvidia graphics on the proprietary driver, Debian 11, and switching displays with /usr/bin/xrandr also producing weird panning issues). I also noticed that nvidia-settings is fussy about whitespace in that CurrentMetaMode string, so trying to get fancy with formatting it in a shell script isn't a good idea. And when feeding the --query output back to --assign, you need to ignore everything up to "::".
    – ppar
    Nov 23, 2022 at 12:26
  • ... however one issue with this approach -- I wrote a script to switch between a couple of basic display configurations -- is that KDE (Plasma 5.20 on Debian 11) now doesn't fully understand the display geometry: the desktop background from one monitor spans onto the other, it seems to think the display is "new" (no panels, default background), and adding a new panel onto that same monitor places it halfway between the monitors.
    – ppar
    Nov 24, 2022 at 15:01
  • ... and actually, not even nvidia-settings works reliably. Sometimes you get the "currentmetamode" you asked for, sometimes weird panning, sometimes the 1600x900 notebook screen gets a squashed copy of the entire desktop, sometimes mirroring... The display properties GUI in KDE does work reliably, but I haven't found a way to script that. Thanks, Nvidia.
    – ppar
    Nov 25, 2022 at 10:58
1

I just back using my old dell laptop it have nvidia adapter and lately, switched it to nvidia proprietary driver.

I started seeing similar behavior when I using any xrandr --transform based commands with --fb. nvidia driver force some panning settings even I didn't set it explicitly using --panning.

  • Sometimes setting --fb or --panning or both solves the problem, example:

    xrandr --fb 6400x1600 --output "VGA-1-1" --mode 1920x1200 --panning 0x0 --output DP-2 --mode 2560x1600 --panning 0x0 --left-of VGA-1-1  --output DP-3 --mode 1920x1200 --panning 0x0 --left-of DP-2
    
  • --panning 2561x1600 with 1px extra then back to normal --panning 2560x1600 make nvidia driver fix the FB size.

In some cases, I just fed up of the buggy combination xrandr/nvidia and just logout/login. I've GT218M [NVS 3100M], nvidia-340, Xubuntu 16.04.

0
0

That seems to be a bug with nvidia ... I couldn't put DP-0 in the middle, but only at the rightmost position. Then I sorted out byleaving a 10px gap between my first monitor and DP-0 ... that worked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .