For mirroring, try to run one output at its native display, then scale the other

Bug #437173 reported by Achim Bohnet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xf86-video-intel
Fix Released
Medium
xorg-server (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-intel

With two 16:10 displays, a Dell Latitude E6500 laptop (1440 x 900) and a Dell 24'' TFT ( 1920 x 1200), the intel gfx driver chooses the 4:3 resolution of 1024x748 for both. Visual result is a low 4:3 transformed to fullscreen 16:10, this looks pretty poor. It's the first matching common resolution according to xrandr output, nevertheless ...

...much better would be: If both monitors have the same aspect ratio (e.g. 16:10 or 4:3) choose the smaller resolution as the common base and scale to the size bigger monitor. (Because only one monitor needs scaling it should even save
tons of GPU cycles.

With the proposed algorithm, one output runs with the 'perfect' native resolution and only one is transformed, with taspect ratio is presered! Currently base resolution is: lower than min. of both display, _both_ are transformed, aspect ratio is not kept.

Achim

ProblemType: Bug
Architecture: amd64
Date: Sat Sep 26 14:16:01 2009
DistroRelease: Ubuntu 9.10
MachineType: Dell Inc. Latitude E6500
Package: xserver-xorg-video-intel 2:2.8.1-1ubuntu2
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.31-11-generic root=UUID=c81e0cef-ccb2-4fb0-9d11-02e85ba75a4c ro quiet splash
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-11.36-generic
RelatedPackageVersions:
 xserver-xorg 1:7.4+3ubuntu5
 libgl1-mesa-glx 7.6.0~git20090817.7c422387-0ubuntu5
 libdrm2 2.4.13-1ubuntu1
 xserver-xorg-video-intel 2:2.8.1-1ubuntu2
 xserver-xorg-video-ati 1:6.12.99+git20090825.fc74e119-0ubuntu2
SourcePackage: xserver-xorg-video-intel
Uname: Linux 2.6.31-11-generic x86_64
XorgConf: Error: [Errno 2] No such file or directory: '/etc/X11/xorg.conf'
dmi.bios.date: 12/18/2008
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A11
dmi.board.name: 0NY667
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA11:bd12/18/2008:svnDellInc.:pnLatitudeE6500:pvr:rvnDellInc.:rn0NY667:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Latitude E6500
dmi.sys.vendor: Dell Inc.
fglrx: Not loaded
system:
 distro: Ubuntu
 architecture: x86_64kernel: 2.6.31-11-generic

[lspci]
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a42] (rev 07)
     Subsystem: Dell Device [1028:024f]

Revision history for this message
Achim Bohnet (allee) wrote :
Revision history for this message
Achim Bohnet (allee) wrote :

Here the xrandr output of the choosen default mirror: kdm startup, shows greeter, remote ssh login:

(0)allee-k@alleehol:~$ sudo DISPLAY=:0 XAUTHORITY=/var/run/xauth/A:0-I29Hrw xrandr
[sudo] password for allee-k:
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
LVDS1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1440x900 59.9 + 59.9 40.0
   1360x768 59.8
   1152x864 100.0 85.1 85.0 75.0 75.0 70.0 60.0
   1024x768 85.0 75.0* 70.1 60.0
   832x624 74.6
   800x600 85.1 72.2 75.0 60.3 56.2
   640x480 85.0 72.8 75.0 59.9
   720x400 85.0
   640x400 85.1
   640x350 85.1
DVI1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200 60.0 +
   1280x1024 75.0
   1024x768 75.1* 60.0
   800x600 75.0 60.3
   640x480 75.0 60.0
   720x400 70.1
DP1 disconnected (normal left inverted right x axis y axis)
DVI2 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
TV1 disconnected (normal left inverted right x axis y axis)

Bryce Harrington (bryce)
Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Confirmed
Geir Ove Myhr (gomyhr)
tags: added: gm45 karmic resolution
Revision history for this message
7oby (tobias-hain) wrote :

The original algorithm and motivation for Initial Mode Selection Keith Packard explained in this blog:
http://keithp.com/blogs/X_output_status_july_2008/

I agree your solution is better.

Bryce Harrington (bryce)
description: updated
Bryce Harrington (bryce)
summary: - [GM45] Bad resulution choice for mirror mode with two 16:10 displays
+ [g45] [GM45] Bad resulution choice for mirror mode with two 16:10
+ displays
Bryce Harrington (bryce)
summary: - [g45] [GM45] Bad resulution choice for mirror mode with two 16:10
- displays
+ [GM45] Bad resulution choice for mirror mode with two 16:10 displays
Revision history for this message
Geir Ove Myhr (gomyhr) wrote :

While I agree that this could be better, this is not something we can fix in ubuntu or just ask upstream to fix. Two possible approaches that may have some chance of reaching the people who actually implement this:
- File a bug on bugs.freedesktop.org (Product: DRI, Component: DRM/intel)
- Join and and email the mailing list <email address hidden>. Note that emails from non-developers and especially those that are not to-the-point are frequently ignored.

I'm closing this bug report.

Revision history for this message
bugbot (bugbot) wrote :

This bug report was filed against an old version of Ubuntu.
Can you confirm whether this is still an issue in natty?

Please also ensure this bug has tags for each Ubuntu release
that the bug is confirmed as affecting.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Confirmed → New
status: New → Incomplete
Achim Bohnet (allee)
Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Achim Bohnet (allee) wrote :

Yes, the bug is still in natty. Dell E6500 1400x900 and Dell U2410 1920x1200 both have aspect 16/10.
Still, first common resolution algorithm is used, despite the fact that in this case a 4/3 one is the first
math and both displays are therefore either scaled/black-bordered. ==> Visually ugly result :(

There a little change as now the first common resolution is now 1152x864 (also 4/3) instead of 1024x768.
Maybe because I've used now a new Dell Monitor Model with DP.

 root@lap-allee:~# DISPLAY=:0 XAUTHORITY=/var/run/xauth/A\:0-DHUlSa xrandr
Screen 0: minimum 320 x 200, current 1152 x 864, maximum 8192 x 8192
LVDS1 connected 1152x864+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1440x900 60.0 + 59.9 40.0
   1360x768 59.8 60.0
   1152x864 60.0*
   1024x768 60.0
   800x600 60.3 56.2
   640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 connected 1152x864+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200 60.0 +
   1920x1080 60.0
   1600x1200 60.0
   1280x1024 75.0 60.0
   1152x864 75.0*
   1024x768 75.1 60.0
   800x600 75.0 60.3
   640x480 75.0 60.0
   720x400 70.1
HDMI2 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
TV1 unknown connection (normal left inverted right x axis y axis)
   848x480 30.0 +
   640x480 30.0 +
   1024x768 30.0
   800x600 30.0
root@lap-allee:~#

Bryce Harrington (bryce)
tags: added: natty
Revision history for this message
Bryce Harrington (bryce) wrote :

Hey allee,

You filed this bug report against natty, but I see it's still open and
doesn't appear to have much activity recently. So, now that oneiric
is released and stable, this may be a good point for you to upgrade
and re-test if this issue is still present there.

If it's solved in the new release and you think it's worth backporting
the fix, please indicate that. Or if having the fix in the new release
is good enough, feel free to close out the bug (or let us know and we'll
close it.)

If it's not solved, leave the bug report open. I can't promise we'll
get to it (we get way more bugs filed than we can usually get to), but
your testing and feedback can help out if and when we do.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Confirmed → Incomplete
Achim Bohnet (allee)
Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Achim Bohnet (allee) wrote :

Bug is still in oneiric.

Additional HW combination 16:9 that shows the same bug :

Dell Latitude E6620, Native: 16:9 1366*768 (Sandybridge Mobile (GT2+))
via HDMI
Dell 27'' U2710 Res: 1920x1080 (16:9)

Same bug: Instead of using native laptop resolution and scaling extern monitor up to 1920x1080
both displays use the mutilated resolution 1024x768 that is the first resolution supported by both.

summary: - [GM45] Bad resulution choice for mirror mode with two 16:10 displays
+ [GM45] [GT2+] Bad resulution choice for mirror mode with two 16:10
+ displays (ditto for 16:9)
Revision history for this message
Achim Bohnet (allee) wrote : Re: [GM45] [GT2+] Bad resulution choice for mirror mode with two 16:10 displays (ditto for 16:9)
tags: added: oneiric
Achim Bohnet (allee)
summary: - [GM45] [GT2+] Bad resulution choice for mirror mode with two 16:10
+ [GM45] [GT2+] Bad resolution choice for mirror mode with two 16:10
displays (ditto for 16:9)
Revision history for this message
In , Achim Bohnet (allee) wrote :

Original report at: https://bugs.launchpad.net/bugs/437173
Look like I've forgot for years to report upstream. Sorry :(

Used default of the intel driver:

when booting a laptop with an external monitor connected, the
default is mirror mode with a resolution that is 'biggest' one
supported by _both_ monitors. (Compare: http://keithp.com/blogs/X_output_status_july_2008/)

Problem:

The visual impression is often (always in my experience) very bad:

 * external monitor often do not support the naive resolution of the laptop
   display
 * Even worse: first common resolution supported by both monitors has not
   the same aspect ratio as the displays

Suggested solution for same aspect ratio:

...much better would be: If both monitors have the same aspect ratio (e.g. 16:10 or 4:3) choose the smaller resolution as the common base and scale to the size bigger monitor. (Because only one monitor needs scaling it should even save
tons of GPU cycles.

With the proposed algorithm, one output runs with the 'perfect' native resolution and only one is transformed, with taspect ratio is presered! Currently base resolution is: lower than min. of both display, _both_ are transformed, aspect ratio is not kept.

At https://bugs.launchpad.net/bugs/437173 you can find lots of xorg.log
and xrandr output. Lemme know if you need more other input.

Thx,
Achim

Changed in xserver-xorg-video-intel:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote : Re: [GM45] [GT2+] Bad resolution choice for mirror mode with two 16:10 displays (ditto for 16:9)

What we've talked about doing in libxrandr-utils for situations that have differing aspect ratios would be to place black bars on one display so they can have similar effective resolutions. I think your concept fits with that idea generally.

Moving this to the server for now since we don't have a package yet for libxrandr-utils.

affects: xserver-xorg-video-intel (Ubuntu) → xorg-server (Ubuntu)
Changed in xorg-server (Ubuntu):
importance: Undecided → Wishlist
status: Confirmed → Triaged
summary: - [GM45] [GT2+] Bad resolution choice for mirror mode with two 16:10
- displays (ditto for 16:9)
+ For mirroring, try to run one output at its native display, then scale
+ the other
tags: added: precise
Revision history for this message
In , Chris Wilson (ickle) wrote :

Merged upstream now in the kernel are extended modes, so hopefully we will be able to pick a better mode.

Changed in xserver-xorg-video-intel:
status: Confirmed → Fix Released
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.