xrandr 1.4.1 doesn't set external display position correctly when using --right-of to scaled laptop display

Bug #1464514 reported by Markus Paaso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xrandr (Ubuntu)
New
Undecided
Unassigned

Bug Description

I have 15" laptop with 3840x2160 display resolution and external monitor with 2560x1440 resolution.

Expected:
I want to scale laptop screen (DP-4) resolution with 0.5x0.5 and set the external display (DP-6) to right of the laptop display.
So I would like to have laptop display with resolution 1920x1080 and position 0x0 and external display with resolution 2560x1440 and position 1920x0

Happened:
When I use command: xrandr --output DP-4 --auto --scale 0.5x0.5 --output DP-6 --auto --right-of DP-4
the result is:

$ xrandr
Screen 0: minimum 8 x 8, current 6400 x 1440, maximum 16384 x 16384
VGA-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)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 346mm x 194mm
   3840x2160 60.0*+ 48.0
DP-5 disconnected (normal left inverted right x axis y axis)
DP-6 connected 2560x1440+3840+0 (normal left inverted right x axis y axis) 518mm x 324mm
   2560x1440 60.0*+
   1280x1024 75.0 60.0
   1280x960 60.0
   1280x800 59.8
   1152x864 75.0
   1024x768 75.0 70.1 60.0
   800x600 75.0 72.2 60.3 56.2
   640x480 75.0 72.8 59.9

So the external display position is set to 3840x0 instead of expected 1920x0.

$ xrandr -v
xrandr program version 1.4.1
Server reports RandR version 1.4

When I try command: xrandr --output DP-4 --auto --scale 0.5x0.5 --output DP-6 --auto --pos 1920x0
the external monitor is disabled and the output of the command is:
X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 140 (RANDR)
  Minor opcode of failed request: 7 (RRSetScreenSize)
  Serial number of failed request: 47
  Current serial number in output stream: 49

Only way I have found to place screens correctly is to use NVIDIA X Server Settings app.
After that command xrandr gives the expected info:

Screen 0: minimum 8 x 8, current 4480 x 1440, maximum 16384 x 16384
VGA-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)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 346mm x 194mm
   3840x2160 60.0*+ 48.0
DP-5 disconnected (normal left inverted right x axis y axis)
DP-6 connected 2560x1440+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm
   2560x1440 60.0*+
   1280x1024 75.0 60.0
   1280x960 60.0
   1280x800 59.8
   1152x864 75.0
   1024x768 75.0 70.1 60.0
   800x600 75.0 72.2 60.3 56.2
   640x480 75.0 72.8 59.9

But I don't want to use NVIDIA X Server Settings each time to set the display positions.

My laptop is Dell Precision M4800 with Nvidia Quadro K2100M and HiDPI screen.
OS: Ubuntu 14.04.2 LTS
Driver: nvidia-352

affects: libxrandr (Ubuntu) → xrandr (Ubuntu)
Revision history for this message
Markus Paaso (markus-paaso) wrote :

Found a workaround to set screen resolution and position via command line:

$ nvidia-settings --assign CurrentMetaMode="DPY-5: nvidia-auto-select @1920x1080 +0+0 {ViewPortIn=1920x1080, ViewPortOut=3840x2160+0+0}, DPY-7:nvidia-auto-select @2560x1440 +1920+0 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0}"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.