Bug 58570 - Proper LID detection and use external display native resolution
Summary: Proper LID detection and use external display native resolution
Status: RESOLVED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: 7.7 (2012.06)
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-20 12:25 UTC by th0ma7
Modified: 2013-01-07 17:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xorg log file (51.34 KB, text/plain)
2012-12-20 12:28 UTC, th0ma7
no flags Details

Description th0ma7 2012-12-20 12:25:02 UTC
Initial state:  laptop on dock with lid closed.  Using external display. (tried VGA and DVI, same result)

At boot-up the external screen is in the proper resolution.  When Xorg starts the resolution switch to the largest between the LVDS and the external display, in my case being 1336x768 (mas LVDS resolution) while my external display should be by default 1920x1200.

Problems:
1) The lid detection does not work hence LVDS is not being turned off (refers to bugs #11455, wontfix).  I can't believe that more than 5 years after the initial creation of that bug that there cannot be a proper fix now to detect this in a decent matter, no?

2) Should be extending the Xorg to the detected "max" resolution, all the time, by default.  Every time I login I have to extend the xorg to 1920x1200 manually and either turn-off the LVDS or keep it as is (1336x768), configured in cloned therefore LVDS only shows a portion of the 1920x1200 screen visible area.  If xorg would do that by default that would already solve part of the problem.  This bug as also been seen with radeon driver (#14500) which makes me doubt that it might be more relevant with the overall xorg behaviour and not be driver specific?

While looking through the bug database I also cam accross this one (#32922, wontfix).  It does somewhat address theses two issues but only 1) got answered with a wontfix.

Lastly, Windows does handle this really well.  I just hope this can also be solved on the linux side instead of having to make ugly hack like this one:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/573312

I'm really willing to help-out, just let me know what can I do.

Thnx in advance for the help!

Regards.
Comment 1 th0ma7 2012-12-20 12:27:22 UTC
Noe for the technical details:


$ uname -a
Linux gaston 3.7.0-7-generic #15-Ubuntu SMP Sat Dec 15 14:13:08 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux



$ xrandr --verbose
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (0x4a) normal (normal left inverted right x axis y axis) 309mm x 174mm
	Identifier: 0x41
	Timestamp:  7378
	Subpixel:   horizontal rgb
	Gamma:      1.0:1.0:1.0
	Brightness: 1.0
	Clones:    
	CRTC:       0
	CRTCs:      0 1
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	EDID:
		00ffffffffffff0025cc280000000000
		00140103801f12780a87f594574f8c27
		27505400000001010101010101010101
		010101010101121b5664500014303020
		140035ae100000180000000000202020
		20202020202020202020000000fe0049
		4e4c0a202020202020202020000000fe
		0042543134304757303256350a2000eb
	BACKLIGHT: 20 (0x00000014)	range:  (0,20)
	Backlight: 20 (0x00000014)	range:  (0,20)
	scaling mode:	Full aspect
		supported: None         Full         Center       Full aspect 
  1366x768 (0x4a)   69.3MHz -HSync -VSync *current +preferred
        h: width  1366 start 1414 end 1446 total 1466 skew    0 clock   47.3KHz
        v: height  768 start  769 end  773 total  788           clock   60.0Hz
  1360x768 (0x4b)   84.8MHz -HSync +VSync
        h: width  1360 start 1432 end 1568 total 1776 skew    0 clock   47.7KHz
        v: height  768 start  771 end  781 total  798           clock   59.8Hz
  1360x768 (0x4c)   72.0MHz +HSync -VSync
        h: width  1360 start 1408 end 1440 total 1520 skew    0 clock   47.4KHz
        v: height  768 start  771 end  781 total  790           clock   60.0Hz
  1024x768 (0x4d)   65.0MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock   48.4KHz
        v: height  768 start  771 end  777 total  806           clock   60.0Hz
  800x600 (0x4e)   40.0MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock   37.9KHz
        v: height  600 start  601 end  605 total  628           clock   60.3Hz
  800x600 (0x4f)   36.0MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock   35.2KHz
        v: height  600 start  601 end  603 total  625           clock   56.2Hz
  640x480 (0x50)   25.2MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock   31.5KHz
        v: height  480 start  490 end  492 total  525           clock   59.9Hz
VGA1 disconnected (normal left inverted right x axis y axis)
	Identifier: 0x42
	Timestamp:  7378
	Subpixel:   unknown
	Clones:    
	CRTCs:      0 1
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
HDMI1 disconnected (normal left inverted right x axis y axis)
	Identifier: 0x43
	Timestamp:  7378
	Subpixel:   unknown
	Clones:    
	CRTCs:      0 1
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	Broadcast RGB:	Full
		supported: Full         Limited 16:2
	audio:	auto
		supported: force-dvi    off          auto         on          
DP1 disconnected (normal left inverted right x axis y axis)
	Identifier: 0x44
	Timestamp:  7378
	Subpixel:   unknown
	Clones:    
	CRTCs:      0 1
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	Broadcast RGB:	Full
		supported: Full         Limited 16:2
	audio:	auto
		supported: force-dvi    off          auto         on          
HDMI2 connected 1920x1200+0+0 (0x51) normal (normal left inverted right x axis y axis) 518mm x 324mm
	Identifier: 0x45
	Timestamp:  7378
	Subpixel:   unknown
	Gamma:      1.0:1.0:1.0
	Brightness: 1.0
	Clones:    
	CRTC:       1
	CRTCs:      0 1
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	EDID:
		00ffffffffffff0010ac7aa04c564430
		0716010380342078eaee95a3544c9926
		0f5054a1080081408180a940b300d1c0
		010101010101283c80a070b023403020
		360006442100001a000000ff004d3247
		43523232493044564c0a000000fc0044
		454c4c2055323431324d0a20000000fd
		00323d1e5311000a202020202020002a
	Broadcast RGB:	Full
		supported: Full         Limited 16:2
	audio:	auto
		supported: force-dvi    off          auto         on          
  1920x1200 (0x51)  154.0MHz +HSync -VSync *current +preferred
        h: width  1920 start 1968 end 2000 total 2080 skew    0 clock   74.0KHz
        v: height 1200 start 1203 end 1209 total 1235           clock   60.0Hz
  1600x1200 (0x52)  162.0MHz +HSync +VSync
        h: width  1600 start 1664 end 1856 total 2160 skew    0 clock   75.0KHz
        v: height 1200 start 1201 end 1204 total 1250           clock   60.0Hz
  1680x1050 (0x53)  119.0MHz +HSync -VSync
        h: width  1680 start 1728 end 1760 total 1840 skew    0 clock   64.7KHz
        v: height 1050 start 1053 end 1059 total 1080           clock   59.9Hz
  1680x945 (0x54)  131.5MHz -HSync +VSync
        h: width  1680 start 1784 end 1960 total 2240 skew    0 clock   58.7KHz
        v: height  945 start  946 end  949 total  978           clock   60.0Hz
  1400x1050 (0x55)  101.0MHz +HSync -VSync
        h: width  1400 start 1448 end 1480 total 1560 skew    0 clock   64.7KHz
        v: height 1050 start 1053 end 1057 total 1080           clock   59.9Hz
  1600x900 (0x56)  119.0MHz -HSync +VSync
        h: width  1600 start 1696 end 1864 total 2128 skew    0 clock   55.9KHz
        v: height  900 start  901 end  904 total  932           clock   60.0Hz
  1280x1024 (0x57)  108.0MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock   64.0KHz
        v: height 1024 start 1025 end 1028 total 1066           clock   60.0Hz
  1440x900 (0x58)   88.8MHz +HSync -VSync
        h: width  1440 start 1488 end 1520 total 1600 skew    0 clock   55.5KHz
        v: height  900 start  903 end  909 total  926           clock   59.9Hz
  1280x960 (0x59)  108.0MHz +HSync +VSync
        h: width  1280 start 1376 end 1488 total 1800 skew    0 clock   60.0KHz
        v: height  960 start  961 end  964 total 1000           clock   60.0Hz
  1366x768 (0x5a)   85.9MHz -HSync +VSync
        h: width  1366 start 1439 end 1583 total 1800 skew    0 clock   47.7KHz
        v: height  768 start  769 end  772 total  795           clock   60.0Hz
  1360x768 (0x5b)   85.5MHz +HSync +VSync
        h: width  1360 start 1424 end 1536 total 1792 skew    0 clock   47.7KHz
        v: height  768 start  771 end  777 total  795           clock   60.0Hz
  1280x800 (0x5c)   71.0MHz +HSync -VSync
        h: width  1280 start 1328 end 1360 total 1440 skew    0 clock   49.3KHz
        v: height  800 start  803 end  809 total  823           clock   59.9Hz
  1280x768 (0x5d)   68.2MHz +HSync -VSync
        h: width  1280 start 1328 end 1360 total 1440 skew    0 clock   47.4KHz
        v: height  768 start  771 end  778 total  790           clock   60.0Hz
  1024x768 (0x4d)   65.0MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock   48.4KHz
        v: height  768 start  771 end  777 total  806           clock   60.0Hz
  1024x576 (0x5e)   47.0MHz -HSync +VSync
        h: width  1024 start 1064 end 1168 total 1312 skew    0 clock   35.8KHz
        v: height  576 start  577 end  580 total  597           clock   60.0Hz
  800x600 (0x4e)   40.0MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock   37.9KHz
        v: height  600 start  601 end  605 total  628           clock   60.3Hz
  800x600 (0x4f)   36.0MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock   35.2KHz
        v: height  600 start  601 end  603 total  625           clock   56.2Hz
  848x480 (0x5f)   33.8MHz +HSync +VSync
        h: width   848 start  864 end  976 total 1088 skew    0 clock   31.0KHz
        v: height  480 start  486 end  494 total  517           clock   60.0Hz
  640x480 (0x60)   25.2MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock   31.5KHz
        v: height  480 start  490 end  492 total  525           clock   60.0Hz
  720x400 (0x61)   28.3MHz -HSync +VSync
        h: width   720 start  738 end  846 total  900 skew    0 clock   31.5KHz
        v: height  400 start  412 end  414 total  449           clock   70.1Hz
HDMI3 disconnected (normal left inverted right x axis y axis)
	Identifier: 0x46
	Timestamp:  7378
	Subpixel:   unknown
	Clones:    
	CRTCs:      0 1
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	Broadcast RGB:	Full
		supported: Full         Limited 16:2
	audio:	auto
		supported: force-dvi    off          auto         on          
DP2 disconnected (normal left inverted right x axis y axis)
	Identifier: 0x47
	Timestamp:  7378
	Subpixel:   unknown
	Clones:    
	CRTCs:      0 1
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	Broadcast RGB:	Full
		supported: Full         Limited 16:2
	audio:	auto
		supported: force-dvi    off          auto         on          
DP3 disconnected (normal left inverted right x axis y axis)
	Identifier: 0x48
	Timestamp:  7378
	Subpixel:   unknown
	Clones:    
	CRTCs:      0 1
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	Broadcast RGB:	Full
		supported: Full         Limited 16:2
	audio:	auto
		supported: force-dvi    off          auto         on
Comment 2 th0ma7 2012-12-20 12:28:26 UTC
Created attachment 71850 [details]
Xorg log file
Comment 3 th0ma7 2012-12-20 12:32:23 UTC
Interestingly, from the Xorg.0.log there are theses messages that suprised me:

[     8.755] (II) config/udev: Adding input device Lid Switch (/dev/input/event1)
[     8.755] (II) No input driver specified, ignoring this device.
[     8.755] (II) This device may have been added with another device file.
Comment 4 Daniel Vetter 2012-12-20 12:51:49 UTC
Both bugs are still wontfix, but not because we don't care here from the drm/i915 driver team, but because our driver can't fix this ....

(In reply to comment #0)
> Problems:
> 1) The lid detection does not work hence LVDS is not being turned off
> (refers to bugs #11455, wontfix).  I can't believe that more than 5 years
> after the initial creation of that bug that there cannot be a proper fix now
> to detect this in a decent matter, no?

lid detection is acpi stuff, you need report this against the kernel's acpi team and work together with them figuring out how to solve this. Our driver doesn't do anything really with lid detection, safe for fixup up chaos that some really old BIOS make ...

> 2) Should be extending the Xorg to the detected "max" resolution, all the
> time, by default.  Every time I login I have to extend the xorg to 1920x1200
> manually and either turn-off the LVDS or keep it as is (1336x768),
> configured in cloned therefore LVDS only shows a portion of the 1920x1200
> screen visible area.  If xorg would do that by default that would already
> solve part of the problem.  This bug as also been seen with radeon driver
> (#14500) which makes me doubt that it might be more relevant with the
> overall xorg behaviour and not be driver specific?

The default is just that, and imo it's a sane one - the aim here is that we have the highest chance that the user can see the login screen: Which means enable as manu outputs as possible, but restrict the output size to the smallest one. Otherwise if e.g. the largest output doesn't work for some reason, the user won't see the login/desktop because he only sees a tiny part on the one, working screen.

You're correct that this is X server behaviour shared by all drivers and for the above reason likely wontfix even there.

If you want a different default, your desktop/login manager needs to restore that at every boot-up to your preferred setup. If your login manager/DE doesn't provide such a mechanism, you need to file a bug/feature wishlist there.

Hope this explains why we close all such bugs as wontfix.

Sole exception is if the default picker gets confused becuase the kernel detects an output which isn't really there (ghost output bugs). That's a kernel issue and needs to be fixed. But afaict this is not the case here.
Comment 5 th0ma7 2012-12-23 12:59:55 UTC
Thnx for the reply.

Just so I get this right:

1) based on previous Comment Info #3, I should still consider this bug as an ACPI problem even if a lid device was detected, right?

2) I must then presume that the associated device does not work as expected otherwhise the Intel Xorg driver would have make usage of it, known that the lid was closed and therefore turned-off the LVDS display and only be using the external one?

Just confirming so I opened up a new bug entry at the appropriate place.

Thnx and merry christmas ;-)
Comment 6 Daniel Vetter 2013-01-07 17:14:44 UTC
(In reply to comment #5)
> Thnx for the reply.
> 
> Just so I get this right:
> 
> 1) based on previous Comment Info #3, I should still consider this bug as an
> ACPI problem even if a lid device was detected, right?
> 
> 2) I must then presume that the associated device does not work as expected
> otherwhise the Intel Xorg driver would have make usage of it, known that the
> lid was closed and therefore turned-off the LVDS display and only be using
> the external one?
> 
> Just confirming so I opened up a new bug entry at the appropriate place.
> 
> Thnx and merry christmas ;-)

Afaik the intel driver doesn't do any magic on lid close - that's done by your desktop enviroment I think. But if the ACPI lid stuff doesn't work correctly (you could check the sysfs files I think or in procfs through ssh whether it works). If that doesn't work you need to file an ACPI bug. For the desktop integration either write your own script or yell at the people doing your DE ;-)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.