Bug 12025

Summary: Use the detected native panel resolution instead of initial video mode
Product: xorg Reporter: Stefan Dirsch <sndirsch>
Component: Driver/intelAssignee: Hong Liu <hong.liu>
Status: RESOLVED DUPLICATE QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: eich, libv, mat, sndirsch
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 11917    
Bug Blocks: 13027    

Description Stefan Dirsch 2007-08-16 01:53:21 UTC
I have a Sony Vaio, whose panel has a native resolution of 1366x768.
X doesn't want to use a mode with that resolution when the initial video mode
(before entering X, i.e. the one set by the vga=0x... kernel cmdline)
isn't also 1366x768.  That this initial mode itself isn't the 1366 one is
a different deficiency in the installer, but nothing which should prevent
the X server from using the native resolution.

I think I know the cause for this for the 'intel' driver.  It tries to
setup modes in these steps (i830_lvds_init):

1) Try to detect EDID modes.  In my case the panel doesn't provide any.
2) Try to detect the current video mode, if the panel is turned on.
   (In my case it detects the 1024x768 mode)
3) Look through the BIOS modes, but use any of the BIOS only, if step
   (2) didn't find anything.

Step (2) can't be switched off it seems, so whenever _any_ mode is already
set on the panel, that one will also be used unconditionally by the X server.
The reasoning being, that the BIOS tables are sometimes unrelieable, hence
whatever is set already should be used.

But this reasoning only makes sense if the initial video mode is of the
same resolution as the native panel resolution, otherwise a matching BIOS
mode should be used.

The intel driver doesn't seem to try to detect the native panel resolution
(I at least see nothing in the log file).  But the i810 driver does.
As can be seen in the attached Xorg-i810.log it detects the panel correctly:

(II) I810(0): Display Info: LFP (local flat panel): attached: TRUE, present:
     TRUE, size: (1366,768)

(and that despite the initial mode being 1024x768).  Nevertheless also the
i810 driver refuses to use the 1366x768 mode ("no mode of this name",
despite having found a nicely matching mode in the BIOS table).

With the i810 driver I can make it somewhat work by commenting out the
Modes line of the Screen section (so that "1366x768" isn't explicitely
referred to).  In that case X seems to chose a 1368x768 (!) mode (although
such doesn't exist in the BIOS table), no matter what initial mode was set.

I have two suggestions how to fix this, the first being more preferred:
a) make the intel driver detect the native panel resolution and ignore
   an initial video mode if it isn't of that resolution (i.e. make it trust
   the BIOS in that case)
b) add a Option for the Driver section, where I can explicitely specify
   that it should ignore the initial video mode.

I attach four files:
1) My /etc/X11/xorg.conf (with intel driver)
2) Xorg-intel.log, that's with the above xorg.conf
3) Xorg-i810.log, that with the above xorg.conf, just with i810 instead of
   intel driver
4) Xorg-i810-strange.log, with the above xorg.conf, i810 instead of intel,
   and the "Modes" line of the Screen/Display/Depth24 subsection commented
   out, i.e. to look like so:
    Section "Screen"
      ...
      SubSection "Display"
        Depth      24
        # Modes      "1366x768" "1024x768" "800x600"
      EndSubSection
      ...
    EndSection
Comment 1 Stefan Dirsch 2007-08-16 01:55:36 UTC
See 

  https://bugzilla.novell.com/show_bug.cgi?id=299824 

for logfiles and more details.
Comment 2 Julien Cristau 2007-08-16 02:13:17 UTC
This seems to be a duplicate of #11932.
Comment 3 Stefan Dirsch 2007-08-16 03:08:27 UTC
I agree, but IMHO in this bugreport more investigation is done and even a proposal to improve the situation. By closing it as duplicate of Bug #11932, this information likely get lost. :-(
Comment 4 Jesse Barnes 2007-10-31 15:02:46 UTC
Does your machine have an EDID file somewhere in /proc/acpi?  That would be another way of getting at builtin flat panel data.  We don't currently look for it...
Comment 5 Hong Liu 2007-12-13 01:20:08 UTC
Can ddcprobe get edid data on your system?
Comment 6 Michael Fu 2007-12-25 00:15:25 UTC
reject the bug due to no response from bug reporter.
Comment 7 Michael Fu 2007-12-25 00:20:14 UTC
found it should be a dup of bug# 11932...reopen
Comment 8 Michael Fu 2007-12-25 00:20:32 UTC
found it should be a dup of bug# 11932...reopen

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

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.