Can't disable panning on multiple monitors

Bug #1326688 reported by Nicola Bressan
78
This bug affects 15 people
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

System:

Dell laptop E6520 with two graphic cards:

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller: NVIDIA Corporation GF119M [NVS 4200M] (rev a1) (prog-if 00 [VGA controller])

I have 3 monitors connected through docking stations, DP-0 and DP-1 connected to Nvidia card and VGA-1-0 connected to Intel card.

I'm usind nvida-331 driver and nvidia-prime:

nbr@nbr-nb:~$ dpkg --get-selections | grep nvidia
nvidia-331 install
nvidia-common install
nvidia-libopencl1-331 install
nvidia-opencl-icd-331 install
nvidia-prime install
nvidia-settings install

I can setup correctly this triple-head config with Monitor Settings in Ubuntu Control Panel, but this enable panning as per xrandr output:

nbr@nbr-nb:~$ xrandr -q | grep conn
VGA-0 disconnected (normal left inverted right x axis y axis)
LVDS-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm panning 2560x1024+0+0 tracking 4240x1050+0+0 border 0/0/0/0
DP-1 connected primary 1680x1050+1280+0 (normal left inverted right x axis y axis) 433mm x 270mm panning 2960x1050+1280+0 tracking 4240x1050+0+0 border 0/0/0/0
HDMI-0 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)
LVDS-1-0 connected
VGA-1-0 connected 1280x1024+2960+0 376mm x 301mm

and it seems there is no way to disable it (even issuing xrandr with --panning 0x0+0+0 option to DP-0 and DP-1 has no effect).

This was working correctly after a undock/dock of the laptop, maybe an update broke config since it has always showed problems with undock/dock, but a reboot always cured the situation. Now it can't be setup like initial config anymore (three indipendent monitors with no panning and windows moving around all monitors).

other sysinfo:

nbr@nbr-nb:~$ lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04
nbr@nbr-nb:~$ apt-cache policy nvidia-331
nvidia-331:
  Installato: 331.38-0ubuntu7
nbr@nbr-nb:~$ apt-cache policy nvidia-prime
nvidia-prime:
  Installato: 0.6.2
nbr@nbr-nb:~$ apt-cache policy xserver-xorg
xserver-xorg:
  Installato: 1:7.7+1ubuntu8

Revision history for this message
Richard Casemore (skarard) wrote :

I am using my tablet as an external monitor with VNC.

$ lsb_release -rd
Description: Ubuntu 14.04.1 LTS
Release: 14.04

$ xrandr --output DVI-I-2 --fb 3200x1080 --panning 0x0+0+0

$ xrandr | grep DVI-I-2

DVI-I-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 530mm x 300mm panning 3200x1080+0+0

Panning still happens. I had it working March 2013, I don't know when it stopped working as expected.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg-server (Ubuntu):
status: New → Confirmed
Revision history for this message
prs (peteo) wrote :

Since upgrade to 14.04 can not use external monitors due to this panning problem on my Lenovo W520

$ dpkg --get-selections | grep nvidia
nvidia-343 install
nvidia-343-uvm install
nvidia-opencl-icd-343 install
nvidia-prime install
nvidia-settings install

Please get this fixed soon or next laptop will be some fruit...

Revision history for this message
Onno Kortmann (onno-gmx) wrote :

Hi,

I have a W520, too, and have exactly the same problems since an LTS->LTS upgrade to 14.04. I now at least have a semi-workaround when starting the display manager with two screens:

Using nvidia-settings, I was able to generate a xorg.conf file that starts with a working two-screen configuration, without panning. File is attached. I guess you'd either need to adjust the values specific to my setup, or try to use nvidia-settings to generate a fresh configuration file. Important hint is to click on 'Advanced...' at the bottom to get the panning configuration.

However, when switching between single- and dual-screen modes, screen panning will reappear and I have not figured out how to solve that yet. Switching to single-screen mode works once, using

xrandr --output LVDS-0 --mode 1600x900 --pos 0x0 --output DP-0 --off --output VGA-0 --off

Hope this helps.

Revision history for this message
Thomas C. Blank (thomas-c-blank) wrote :

I have these problems on a W520 (i.e. Nvidia driver), but on Arch Linux. Still, what I have found, and a workaround:

The Nvidia driver will try to make the whole size of the screen (set with xrandr --fb or by placing monitors) accessible with the monitors it has, and if need be with panning. It will ignore or overwrite all attempts to disable that panning if the driver thinks you need it. (It's a feature, they brag about it under question "How are virtual screen dimensions determined in TwinView?" at http://us.download.nvidia.com/XFree86/Linux-x86_64/346.35/README/configtwinview.html

On my setup, I use two external monitors that are connected to the Nvidia card along with the built-in monitor that is connected to the internal Intel chip. The intel chip servers as a Sink provider for the Nvidia driver, so all three monitors form a single screen, like so:
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --fb 5760x1200
   --output LVDS-1-0 --mode 1920x1080 --pos 3840x120
   --output VGA-0 --mode 1920x1200 --pos 1920x0
   --output DP-3 --mode 1920x1200 --pos 0x0

The nvidia driver (so it seems) will accept that the whole screen is now 5760x1200 big, but only uses the two monitors that are actually connected to the card to "cover" that area with panning. So the right-most laptop display worked fine, while the two monitors would pan along left and right.

I have worked around this by abusing that while the Nvidia driver ignores or overwrites the core panning parameters, it doesn't meddle with the panning border. I modified the command above like so:
xrandr --fb 5760x1200
--output LVDS-1-0 --mode 1920x1080 --pos 3840x120 --panning 5760x1200+0+0/0x0+0+0/-3840/0/0/0
--output VGA-0 --mode 1920x1200 --pos 1920x0 --panning 5760x1200+0+0/0x0+0+0/-1920/0/-1920/0
--output DP-3 --mode 1920x1200 --pos 0x0 --panning 5760x1200+0+0/0x0+0+0/0/0/-3840/0

This sets the borders that trigger the panning so far out that they are all off screen. So panning is technically still enabled but impossible to trigger.

Revision history for this message
Brett Sutton (bsutton) wrote :

A quick work around that I've found.

2nd monitor attached to a laptop.

Enable second monitor as primary.

Second monitor appears to the left of the laptop monitor.

Panning problem occurs.

Go into the gnome 'Arrange Combined Displays'.

Reverse the order of the monitors (2nd now arranged to right of laptop monitor).
Apply and Confirm settings.

Go back into 'Arrange Combined Displays'.

Reverse the order of the monitors again so the external display is once again to the left of the internal display.
Apply and Confirm settings.

Panning problem is now fixed.

Not a solution but....

Revision history for this message
prs (peteo) wrote :
Revision history for this message
Pablo (binaryplease) wrote :

Has there been any fix for this yet?

The workaround in #5 works most of the time, but has some issues.
I don't have gnome.

My setup:
Notebook with internal 1920x1080 screen,
1920x1200 Screen attached via hdmi
1280x1024 screen attached via usv graphics card

Revision history for this message
Cody Creager (rigel314) wrote :

I found a different work around that works consistently for me. I'm actually using gentoo linux with xorg-server-1.17.4, gnome-3.18.0, and xrandr-1.4.3. Looks to me like Thomas C. Blank was on the right track.

I have an NVIDIA card with a 1680x1050 monitor and a 1920x1200 monitor. And an Intel card with a 1920x1080 monitor. They are in that order left-to-right.

First, I had to disable xinerama in my xorg.conf because it conflicts with xrandr.

When I first log in, the nvidia monitors are in the correct orientation, but I have to connect the Intel output source with: xrandr --setprovideroutputsource Intel NVIDIA-0

Then I can enable the output either through gnome's display settings or with xrandr(DVI-I-2 being the 1920x1200 monitor): xrandr --output HDMI2 --auto --right-of DVI-I-2

Finally, I convince panning to do what I want with another xrandr call: xrandr --output DVI-I-2 --panning 3840x1200+1680+0/1920x1200+1680+0/0/0/0/0

This panning instruction says the center monitor pans over a region that contains itself and the right monitor. But it only tracks the mouse pointer over itself. And it has no border.
"The first four parameters specify the total panning area, the next four the pointer tracking area (which defaults to the same area). The last four parameters specify the border and default to 0." -- man xrandr

That same man page continues on to say that width or height set to zero will disable panning on that axis - which doesn't work.

Revision history for this message
Joakim Asplund (joakimas) wrote :

I have this problem on Linux Mint 17.1 (Ubuntu 14.04 base) too on a Lenovo T420s with Optimus graphics using the Nvidia card as primary.

It seems to work as expected if I put the screens in order [LVDS-1-0] -- [VGA-1-0] -- [DP-3] from left to right, but if I put DP-3 in the middle, I can't disable panning for it.

Just putting the screens in this physical order works for me, but I run into another problem when I try to set the middle screen (VGA-1-0) to primary in order to get my KDE taskbar on the middle screen. Trying to set any of the screens provided by modesetting to primary fails with the following error:

  $ xrandr --output VGA-1-0 --primary
X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 140 (RANDR)
  Minor opcode of failed request: 30 (RRSetOutputPrimary)
  Serial number of failed request: 50
  Current serial number in output stream: 52

  $ xrandr --output LVDS-1-0 --primary
X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 140 (RANDR)
  Minor opcode of failed request: 30 (RRSetOutputPrimary)
  Serial number of failed request: 50
  Current serial number in output stream: 52

I attach my Xorg configuration (generated by nvidia-settings), the Xorg log file, a dump of 'xrandr --verbose' output and 'xrandr --listproviders' output.

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.