Position of second monitor wrong in dual monitor setup if first monitor is 1366x768

Bug #680614 reported by Andreas Gölzer on 2010-11-23
56
This bug affects 10 people
Affects Status Importance Assigned to Milestone
xserver-xorg-driver-ati
Invalid
Medium
xserver-xorg-video-ati (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: xorg

I'm using a two-monitor setup with an ati graphics card (Mobility Radeon HD 4300) on my laptop(lenovo u450p).
The Laptop screen has a hardware resolution of 1366x768, the external monitor a hardware resolution of 1920x1080.

If I set up the second monitor using

xrandr --output HDMI-0 --off
xrandr --output LVDS --auto
xrandr --output HDMI-0 --auto --right-of LVDS

(or the kde gui, the effects are equal)
I expect

1) the left 1366x768 area to be on the laptop screen, and
2) the right 1920x768 area to be on the big monitor.

But I observe:
1) happens as expected
2) happens almost. instead, the 2 rightmost pixels on the laptop monitor are repeated on the left border of the big monitor(filled with black to the bottom), in turn the two rightmost columns of the virtual display area are not visible on any monitor at all.

If I switch the laptop monitor resolution to 1280x720, this effect does not occur, and - except for the then blurred laptop screen - everything works as expected.
A screenshot shows the whole virtual desktop correctly.

Ubuntu version: 10.10 (maverick)
graphics card:
01:00.0 VGA compatible controller: ATI Technologies Inc M92 LP [Mobility Radeon HD 4300 Series]
xorg version: 1:7.5+6ubuntu3
I'm using the 'radeon' display driver, as detected by default. fglrx is not installed.
using kde 4.5.3

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: xorg 1:7.5+6ubuntu3
ProcVersionSignature: Ubuntu 2.6.35-22.35-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic x86_64
Architecture: amd64
DRM.card0.HDMI_Type_A.1:
 status: connected
 enabled: enabled
 dpms: On
 modes: 1920x1080 1920x1080 1600x1200 1680x1050 1400x1050 1280x1024 1280x1024 1440x900 1280x960 1152x864 1280x720 1024x768 1024x768 1024x768 832x624 800x600 800x600 800x600 800x600 720x480 640x480 640x480 640x480 640x480 720x400
 edid-base64: AP///////wAEafokAQEBARAUAQOANB14Lu7VpVVImyYSUFS/74DRwLMAqUCVAJBAgYCBQHFPAjqAGHE4LUBYLEUACSUhAAAeAAAA/wBBNExNSVowNzIyMDcKAAAA/QAySx5TEwAKICAgICAgAAAA/ABBU1VTIFZIMjQyCiAgAW0CAyXxUpAFBAMCBwYPDh8UHh0TEhEWASMJfweDAQAAZQMMABAAAjqAGHE4LUBYLEUACSUhAAAeAR2AGHEcFiBYLCUACSUhAACeAR0AclHQHiBuKFUACSUhAAAeAjqA0HI4LUAQLEWACSUhAAAejArQiiDgLRAQPpYACSUhAAAYVw==
DRM.card0.LVDS.1:
 status: connected
 enabled: enabled
 dpms: On
 modes: 1366x768 1366x768 1280x720 1152x768 1024x768 800x600 848x480 720x480 640x480
 edid-base64: AP///////wAGrzwiAAAAAAATAQOAHxF4Cpf1m1lUjCUiUFQAAAABAQEBAQEBAQEBAQEBAQEBEhtWRlAAIzAmFjYANa0QAAAYDBJWRlAAIzAmFjYANa0QAAAYAAAA/gBBVU8KICAgICAgICAgAAAA/gBCMTQwWFcwMiBWMiAKAMk=
DRM.card0.VGA.1:
 status: disconnected
 enabled: disabled
 dpms: Off
 modes:
 edid-base64:
Date: Tue Nov 23 20:11:52 2010
InstallationMedia: Kubuntu 10.10 "Maverick Meerkat" - Release Candidate amd64 (20100928.3)
MachineType: LENOVO 3389
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.35-22-generic root=UUID=7965020f-a640-4958-8bea-09eb9aaa31a3 ro
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: xorg
dmi.bios.date: 01/20/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 22CN35WW(V2.02)
dmi.board.name: NITU1
dmi.board.vendor: LENOVO
dmi.board.version: REFERENCE
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnLENOVO:bvr22CN35WW(V2.02):bd01/20/2010:svnLENOVO:pn3389:pvrLenovoIdeaPadU450p:rvnLENOVO:rnNITU1:rvrREFERENCE:cvnNoEnclosure:ct10:cvrN/A:
dmi.product.name: 3389
dmi.product.version: Lenovo IdeaPad U450p
dmi.sys.vendor: LENOVO
peripherals:

system:
 distro: Ubuntu
 codename: maverick
 architecture: x86_64
 kernel: 2.6.35-22-generic
---
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: kwin
DRM.card0.HDMI.A.1:
 status: connected
 enabled: enabled
 dpms: On
 modes: 1920x1080 1600x1200 1680x1050 1400x1050 1280x1024 1280x1024 1440x900 1280x960 1152x864 1024x768 1024x768 1024x768 832x624 800x600 800x600 800x600 800x600 640x480 640x480 640x480 640x480 720x400
 edid-base64: AP///////wAEafokAQEBARAUAQOANB14Lu7VpVVImyYSUFS/74DRwLMAqUCVAJBAgYCBQHFPAjqAGHE4LUBYLEUACSUhAAAeAAAA/wBBNExNSVowNzIyMDcKAAAA/QAySx5TEwAKICAgICAgAAAA/ABBU1VTIFZIMjQyCiAgAW0CAyXxUpAFBAMCBwYPDh8UHh0TEhEWASMJfweDAQAAZQMMABAAAjqAGHE4LUBYLEUACSUhAAAeAR2AGHEcFiBYLCUACSUhAACeAR0AclHQHiBuKFUACSUhAAAeAjqA0HI4LUAQLEWACSUhAAAejArQiiDgLRAQPpYACSUhAAAYVw==
DRM.card0.LVDS.1:
 status: connected
 enabled: enabled
 dpms: On
 modes: 1366x768 1366x768 1280x720 1152x768 1024x768 800x600 848x480 720x480 640x480
 edid-base64: AP///////wAGrzwiAAAAAAATAQOAHxF4Cpf1m1lUjCUiUFQAAAABAQEBAQEBAQEBAQEBAQEBEhtWRlAAIzAmFjYANa0QAAAYDBJWRlAAIzAmFjYANa0QAAAYAAAA/gBBVU8KICAgICAgICAgAAAA/gBCMTQwWFcwMiBWMiAKAMk=
DRM.card0.VGA.1:
 status: disconnected
 enabled: disabled
 dpms: Off
 modes:
 edid-base64:
DistUpgraded: Fresh install
DistroCodename: natty
DistroRelease: Ubuntu 11.04
DistroVariant: kubuntu
DkmsStatus: bcmwl, 5.100.82.38+bdcom, 2.6.38-8-generic, x86_64: installed
GraphicsCard:
 ATI Technologies Inc M92 LP [Mobility Radeon HD 4300 Series] [1002:9552] (prog-if 00 [VGA controller])
   Subsystem: Lenovo Device [17aa:3903]
InstallationMedia: Kubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110301.4)
MachineType: LENOVO 3389
NonfreeKernelModules: wl
Package: xserver-xorg-video-ati 1:6.14.0-0ubuntu4
PackageArchitecture: amd64
ProcEnviron:
 LANGUAGE=en_DK
 PATH=(custom, user)
 LANG=en_DK.UTF-8
 LC_MESSAGES=en_DK.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=ab9c6c70-e9b1-4cad-bc9a-efc17e8e8a7d ro
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Renderer: Unknown
Tags: natty kubuntu patch
Uname: Linux 2.6.38-8-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 01/20/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 22CN35WW(V2.02)
dmi.board.name: NITU1
dmi.board.vendor: LENOVO
dmi.board.version: REFERENCE
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnLENOVO:bvr22CN35WW(V2.02):bd01/20/2010:svnLENOVO:pn3389:pvrLenovoIdeaPadU450p:rvnLENOVO:rnNITU1:rvrREFERENCE:cvnNoEnclosure:ct10:cvrN/A:
dmi.product.name: 3389
dmi.product.version: Lenovo IdeaPad U450p
dmi.sys.vendor: LENOVO
version.compiz: compiz N/A
version.ia32-libs: ia32-libs 20090808ubuntu13
version.libdrm2: libdrm2 2.4.23-1ubuntu6
version.libgl1-mesa-dri: libgl1-mesa-dri 7.10.2-0ubuntu2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.10.2-0ubuntu2
version.xserver-xorg: xserver-xorg 1:7.6+4ubuntu3
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.0-0ubuntu4
version.xserver-xorg-video-intel: xserver-xorg-video-intel N/A
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau N/A

Andreas Gölzer (k-2005) wrote :
bugbot (bugbot) on 2010-11-24
affects: xorg (Ubuntu) → xserver-xorg-video-ati (Ubuntu)
bugbot (bugbot) on 2010-11-24
tags: added: kubuntu
Christian Kluge (chrishy-bcn) wrote :

This bug appears to be the same as #666058 and #472716. But it is described here more precisely. The reason for the problem is a wrong selection of the area of the extended desktop for the second screen.

I experience the same problem using a 1366x768 screen and 1280x1024 in dual view mode. It happens both with deactivated and activated fglrx driver. As reported by Andreas Gölzer the effect vanishes as soon as "a more common resolution" is chosen instead of the 1366x768. Anyway, it probably affects a lot of users using their laptop together with an external screen.

Does anyone know a possibility to configure the position of the shown area of the extended desktop for each screen?

Best regards,
Christian

Andreas Gölzer (k-2005) wrote :

Thank you for linking to the similar bugs. As bug #472716 seems to occur with both the standard driver and fglrx, i tried to use fglrx, where the bug also appears.

Also, from the resolutions xrandr offers to me, 1366x768 is the only one that behaves in this way, it is also the resolution used in bug #628256 and bug #666058. I suspect it might be related to the fact that 1366 is not divisible by four.

Trying to work around the problem by giving the right monitor an offset different from 1366x0 did not work, I tried this a few times, it always crashed my system.

cman (diegoocampo8) wrote :

"the 2 rightmost pixels on the laptop monitor are repeated on the left border of the big monitor(filled with black to the bottom), in turn the two rightmost columns of the virtual display area are not visible on any monitor at all."

I have the very same problem in my confing: running ubuntu 10.10, with kde and catalyst 11.2. I have a laptop with a LVDS screen of 1366x768 with a CTR screen of 1280x1024 on the right side. On the CTR screen, on the left side i have two colums of pixels repeated from the rightmost columns of the laptop display!.

bugbot (bugbot) wrote :

Hey Andreas,

Hi, have you had a chance to test if this bug is still present in natty?

If it does (and if you're the original reporter), please boot into natty
and run the command:

  apport-collect <bug-number>

which will update the bug with fresh logs and tag the bug as affecting
natty. (It is best to run this right after reproducing the problem.)

Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Incomplete

apport information

tags: added: apport-collected natty patch
description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

Andreas Gölzer (k-2005) wrote :

The problem persists in natty, at least my upgraded natty alpha with 2.6.38-8-generic (x64)

Launchpad Janitor (janitor) wrote :

[Expired for xserver-xorg-video-ati (Ubuntu) because there has been no activity for 60 days.]

Changed in xserver-xorg-video-ati (Ubuntu):
status: Incomplete → Expired
Bob Hill (hill-robert) wrote :

On my laptop this problem has been somewhat alleviated by moving the external VGA display (on the right-hand side of the laptop display) two pixels to the right, so that the external monitor begins at 1368+0 (instead of 1366+0). Now there is no vertical stripe overflowing from the right-hand edge of the laptop display onto the left-hand edge of the external display, so everything looks clean (possibly because 1368 is a multiple of four?). The disadvantage is of course that there is a two-pixel gap between the two displays, but this is only really a problem if windows are placed spanning the displays (which I never do). The identical problem is encountered on my laptop with Fedora 16 and with openSUSE 12.1, but NOT with Windows 7 SP1, so it would appear to be a generic problem with Xorg across various Linux distros. Here is the xrandr which alleviates the problem, showing the VGA starting at 1368+0:

Screen 0: minimum 320 x 200, current 2648 x 1024, maximum 8192 x 8192
LVDS connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1366x768 60.0*+
   1280x720 59.9
   1152x768 59.8
   1024x768 120.1 60.0 59.9
   960x720 120.0
   928x696 120.1
   896x672 120.0
   800x600 120.0 60.3 59.9 56.2
   848x480 59.7
   700x525 120.0
   720x480 59.7
   640x512 120.0
   640x480 120.0 59.9 59.4
   512x384 120.0
   400x300 120.6 112.7
   320x240 120.1
HDMI-0 disconnected (normal left inverted right x axis y axis)
VGA-0 connected 1280x1024+1368+0 (normal left inverted right x axis y axis) 317mm x 254mm
   1280x1024 60.0*+ 75.0
   1280x960 75.0 60.0
   1152x864 75.0
   1024x768 75.1 70.1 60.0
   832x624 74.6
   800x600 72.2 75.0 60.3 56.2
   640x480 72.8 75.0 66.7 60.0
   720x400 70.1

Andreas Gölzer (k-2005) on 2011-12-09
Changed in xserver-xorg-video-ati (Ubuntu):
status: Expired → New
Andreas Gölzer (k-2005) wrote :

Yes, thanks, with xrandr --output HDMI-0 --auto --pos 1368x0 I also get a more pleasant output, and it does not crash the system.
With standard settings, the bug remains in oneiric.
I meanwhile placed the second monitor on top of the first.

Launchpad Janitor (janitor) wrote :

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

Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
On-The-Fly (onthefly) wrote :

This bug persists in 12.04 until now. I have a ATI Mobility Radeon HD 5650 Graphics card and am connecting my laptop display (left, 1366x768) to my external monitor (right, 1920x1080) with HDMI.
Luckily Andreas Gölzer's tip with xrandr is a working workaround.

ateholiz (ateholiz) wrote :

Is there any progress being made on this? It's quite an annoying bug. The workaround doesn't work for me because Cinnamon will let my mouse travel freely outside my monitor while using it. (This makes it impossible to have hidden panels as my mouse just flys past them.)

Bob Hill (hill-robert) wrote :

I have personally observed this bug on Fedora 16, Fedora 17 and openSUSE 12.1,
so it would appear to be an upstream Xorg bug, not a specific Ubuntu bug.

I can live very well with the circumvention described in Comment #23, but any-
one who has a strong desire for this bug to be fixed might like to open a bug
directly against Xorg itself, presumably on https://bugs.freedesktop.org/

I'm using a two-monitor setup with an ATI Mobility Radeon HD 4200 graphics card on my Compaq Presario CQ61.
The Laptop screen has a hardware resolution of 1366x768, the external monitor a hardware resolution of 1280x1024.

If I set up the second monitor using

xrandr --output VGA-0 --mode 1280x1024 --pos 1368x0 --rotate normal --output LVDS --mode 1366x768 --pos 0x0 --rotate normal
(or the gnome gui, the effects are equal)

I expect:
1) the left 1366x768 area to be on the laptop screen, and
2) the right 1280x1024 area to be on the big monitor.

But I observe:
1) happens as expected
2) happens almost. Instead, the 2 rightmost pixels on the laptop monitor are repeated on the left border of the big monitor and the two rightmost columns of the right monitor are not visible on any monitor at all.

If I switch the laptop monitor resolution to 1280x720 (or any more "common" resolution), this effect does not occur and everything works as expected.

Build Date & Platform:
X.Org X Server 1.12.4
Release Date: 2012-08-27
[ 52.070] X Protocol Version 11, Revision 0
[ 52.070] Build Operating System: Linux 2.6.32-5-686-bigmem i686 Debian
[ 52.070] Current Operating System: Linux eva 3.2.0-4-486 #1 Debian 3.2.32-1 i686
[ 52.070] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.2.0-4-486 root=UUID=001323c2-d51c-4188-8cf7-153dc486a5c8 ro quiet
[ 52.070] Build Date: 05 November 2012 10:28:15AM
[ 52.070] xorg-server 2:1.12.4-3 (Julien Cristau <email address hidden>)

OS: Linux Mint Debian Update Pack 6

Other: This bug was also reported on a Ubuntu tracker (I copied it and edited to suit my circumstances), but it has been reported on multiple OS's and it would appear to be an upstream Xorg bug:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/680614

There is a workaround in the form of "xrandr --output VGA-0 --auto --pos 1368x0" (shift the second display 2 pixels to the right).

> xrandr --output VGA-0 --mode 1280x1024 --pos 1368x0 --rotate normal --output
> LVDS --mode 1366x768 --pos 0x0 --rotate normal
[...]
> There is a workaround in the form of "xrandr --output VGA-0 --auto --pos
> 1368x0" (shift the second display 2 pixels to the right).

I assume the first '--pos 1368x0' is a typo and should be '--pos 1366x0'.

I'm afraid this is not easily fixable, as the hardware only supports horizontal offsets which are a multiple of 4, so the drivers just round down values that aren't.

As Michel noted, this is a hardware limitation. To fix this properly, the xserver would need to be changed to allocate separate buffers for each display rather than one big surface for all displays. Unfortunately, this is a fairly major task.

ateholiz (ateholiz) wrote :

I posted it. Fixing it would take a major rewrite of Xorg, so the workaround is the best option for those who have this issue. I just moved the position of my monitor to fix my mouse issue.
https://bugs.freedesktop.org/show_bug.cgi?id=63900

Thank you Alex T. for opening this bug, and Michel and Alex D. for your feedbacks.

Does the hardware limitation (horizontal offsets multiple of 4) apply to all three
of the popular desktop graphics hardware Intel, ATI/AMD/Radeon and Nvidia, or only
to a subset of these? (Please excuse my ignorance if this is a stupid question :-)

(In reply to comment #3)
> Thank you Alex T. for opening this bug, and Michel and Alex D. for your
> feedbacks.
>
> Does the hardware limitation (horizontal offsets multiple of 4) apply to all
> three
> of the popular desktop graphics hardware Intel, ATI/AMD/Radeon and Nvidia,
> or only
> to a subset of these? (Please excuse my ignorance if this is a stupid
> question :-)

Vertical alignments have to a multiple of 2 as well. It applies to most Radeon asics. Not sure about other vendors, but it's likely they may have similar requirements.

So does the proprietary fglrx driver include a hack/workaround for this? Because with fglrx the position of the second screen is correct!

For me the problem exists only when the configuration sets the 1920x1080 monitor is on the rightside of the 1366x786 one, but not vice versa.

(In reply to comment #6)
> For me the problem exists only when the configuration sets the 1920x1080
> monitor is on the rightside of the 1366x786 one, but not vice versa.

See comment 1. 1366 is not a mutliple of 4 while 1920 is. IIRC, vesa mandates the the hdisplay value be a multiple of 8, so 1366 is technically not vesa compliant.

Yeah, but why is this only when the 1920 monitor is right of 1366 and not when 1920 ist left of the 1366 one? And why does the fglrx driver work fine?

Created attachment 90633
possible fix

Does this patch fix the issue?

Created attachment 90665
applied patch failed

No, it doesn't. It messed it all up, as you can see in the attached picture.
The patch was applied on 3.13rc3 on a Ubuntu saucy 64bit. The configuration included a common bottomline of each display. The 1366 monitor was the left one (notebook).
A configuration with only one display worked, so the patch didn't effect that.

AH:
  As per your comment #8 about it only being a problem when the 1920 is on the right of the 1366 monitor - this makes sense....

  What happens is that something doesn't expect offsets that aren't multiples of 8.

When you have the 1920-1366 you end up with the 1920 starting at X=0, and the 1366 starting at X=1920 (which is divisible by 8) - so everything is happy.

When you have the 1366-1920 setup you end up with the 1366 starting at X=0, and the 1920 starting at X=1366 and having a display not aligned to /8 value gets the thing confused.

Andreas Gölzer, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p xserver-xorg-video-ati REPLACE-WITH-BUG-NUMBER

Please note, given that the information from the prior release is already available, doing this on a release prior to the development one would not be helpful.

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

Changed in xserver-xorg-video-ati (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Andreas Gölzer (k-2005) wrote :

I assume this bug is still present, but I'm right now not having any linux system or a second monitor to check with the live cd.

As mentioned in #29, the bug seems to be not in ubuntu, but somewhere in X or the drivers. There is some discussion at freedesktop, https://bugs.freedesktop.org/show_bug.cgi?id=63900 , which is probably a better suited place for this particular bug then launchpad.

I guess the correct status would be "won't fix", but that is greyed out for me.

*** This bug has been marked as a duplicate of bug 58652 ***

Changed in xserver-xorg-driver-ati:
importance: Unknown → Medium
status: Unknown → Invalid

Thanks for the explanation. It's a pity that it's no possible to solve this bug, yet. It's the last feature I need after DPM and UVD have been included in the oss radeon-driver.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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