Bug 14801

Summary: intel driver uses broken resolution/refresh modes, i810 works fine
Product: xorg Reporter: Jörg Höhle <Joerg-Cyril.Hoehle>
Component: Driver/intelAssignee: Hong Liu <hong.liu>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: michael.fu
Version: unspecifiedKeywords: NEEDINFO
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg.0.log with intel driver in ModeDebug
none
i810 driver Xorg.0.log none

Description Jörg Höhle 2008-03-04 05:06:47 UTC
Hi,

The xserver-xorg intel driver misconfigures my Fujitsu Siemens C1110
laptop, whereas the i810 driver has worked fine.

More precisely, there are 2 areas where the configuration is not all right, details follow:
A. screen resolutions and modes
B. resume from RAM

I recently upgraded from Ubuntu Dapper to Gutsy, which installed the
intel driver as default. Luckily, the i810 driver is still available for comparison.

The laptop supports what I call "hardware scaling" of lower screen
resolutions to the full 15" 1024x768. This can be toggled any time via
the key Fn-F5. This has always worked beautifully with i810. The
800x600 and 640x480 modes appear either 1:1, centered with black
borders, or they are scaled to the full screen dimensions, which is
beautiful for the VT consoles and games.

i810: Pressing Fn-F5 in 1024x768 makes the display flicker shortly exactly
once, further presses show no such effect. The display is ok.

intel: Pressing Fn-F5 in 1024x768 causes a visual effect on the LCD I
only knew from CRT until now, when the monitor looses horizontal
sync. Each scanline is shifted 1-2 pixels to the right in the upper
half of the screen. The lower half of the screen remains black
(background color?). Unlike a CRT, the lower left triangle resulting
from the shift is not black but shows the pixels missing from the
right. So the effect is more a roll or rotation than a shift.
(Must I fear this may damage the LCD, as Peter Clifton writes in
Ubuntu launchpad bug 91966?)

I've tried all 5 1024x768 modes using xrandr --rate, with similar results.

In comparison, it seems like the i810 driver uses "good" rates to
drive the LCD, that are handled by the HW scaling machinery.

Switching resolutions

i810: Pressing Ctrl-Alt-Fn-+/ö or Ctrl-Alt-Fn-- (The Fn key serves to
emulate the numerical keypad via the right half of the German qwertz
keyboard) cycles through the 3 known resolutions.
More precisely, I needed to add these entries to the xorg.conf
monitor sections, as mentioned years ago in bug #3262.
	HorizSync	28-51
	VertRefresh	43-60
(The attached Xorg.0.i810.log does not yet report that addition.)
Without these entries, 1024x768 is the only resolution reported by
xrandr and no cycling occurs. Some games nevertheless seem to be able
to use the lower resolution modes, and it's unknown to me how they
manage that when X does not.
Switching via the keys, the Gnome desktop is not resized, instead
the partial view on the desktop is scrolled when the mouse hits the
display borders.
Pressing Fn-F5 in 800x600 or 640x480 works well, as described above
(display is either 1:1 with black borders or scaled).

xrandr -s 0 returns the desktop to 1024x768 in case some game
(gcompris) crashed leaving a lower resolution active.

While the i810 driver seems to perfectly support the LCD, I have had
trouble when simultenously attaching a monitor or beamer: The external
display dances. But that is another (bug/)story.

intel: In 800x600 or 640x480 modes, pressing Fn-F5 displays in
full-panel size garbage pixels somewhat reminescent of the bitmap in
use (instead of total garbage), yet the view is broken. It somewhat
remembers a zoomed view. Pressing Fn-F5 again does not center the 1:1
low-resolution display. Instead it appears in the upper left corner,
with black borders at the bottom & right side. Initially, it was
centered. So it seems like the laptop HW does not handle the mode
chosen by X.


B: resume & suspend from RAM

i810: works perfectly ever since Ubuntu Hoary (2005.04)
My /etc/default/acpi-support is attached.

intel: Upon resume, the screen shows a 1024x768 display with pixels
that look random yet they reveal the structure of the desktop windows.
Especially some of the pixels blink at the location of the cursor in
the shell window. The colors are those of Ubuntu's brown theme.

Regards,
 Jörg Höhle
Comment 1 Jörg Höhle 2008-03-04 05:07:38 UTC
i810 driver: xrandr --verbose
Screen 0: minimum 640 x 480, current 1024 x 768, maximum 1024 x 768
default connected 1024x768+0+0 (0x54) normal (normal left inverted right) 0mm x 0mm
        Identifier: 0x53
        Timestamp:  -1438963261
        Subpixel:   unknown
        Clones:    
        CRTC:       0
        CRTCs:      0
  1024x768 (0x54)   66.8MHz
        h: width  1024 start    0 end    0 total 1024 skew    0 clock   65.3KHz
        v: height  768 start    0 end    0 total  768           clock   85.0Hz
  800x600 (0x55)   40.8MHz
        h: width   800 start    0 end    0 total  800 skew    0 clock   51.0KHz
        v: height  600 start    0 end    0 total  600           clock   85.0Hz
  640x480 (0x56)   26.1MHz
        h: width   640 start    0 end    0 total  640 skew    0 clock   40.8KHz
        v: height  480 start    0 end    0 total  480           clock   85.0Hz

intel driver: xrandr --verbose
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1024 x 1024
VGA disconnected (normal left inverted right)
	Identifier: 0x4c
	Timestamp:  2028416310
	Subpixel:   unknown
	Clones:    
	CRTCs:      0 1
LVDS connected 1024x768+0+0 (0x4e) normal (normal left inverted right) 0mm x 0mm
	Identifier: 0x4d
	Timestamp:  2028416310
	Subpixel:   horizontal rgb
	Clones:    
	CRTC:       1
	CRTCs:      1
	BACKLIGHT_CONTROL: 0 (0x00000000) range:  (0,4)
	BACKLIGHT: 0 (0x00000000) range:  (0,0)
  1024x768 (0x4e)   64.2MHz
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock   47.8KHz
        v: height  768 start  771 end  777 total  806           clock   59.3Hz
  1024x768 (0x4f)   94.5MHz +HSync +VSync
        h: width  1024 start 1072 end 1168 total 1376 skew    0 clock   68.7KHz
        v: height  768 start  769 end  772 total  808           clock   85.0Hz
  1024x768 (0x50)   78.8MHz +HSync +VSync
        h: width  1024 start 1040 end 1136 total 1312 skew    0 clock   60.0KHz
        v: height  768 start  769 end  772 total  800           clock   75.0Hz
  1024x768 (0x51)   75.0MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1328 skew    0 clock   56.5KHz
        v: height  768 start  771 end  777 total  806           clock   70.1Hz
  1024x768 (0x52)   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
  832x624 (0x53)   57.3MHz -HSync -VSync
        h: width   832 start  864 end  928 total 1152 skew    0 clock   49.7KHz
        v: height  624 start  625 end  628 total  667           clock   74.6Hz
  800x600 (0x54)   56.3MHz +HSync +VSync
        h: width   800 start  832 end  896 total 1048 skew    0 clock   53.7KHz
        v: height  600 start  601 end  604 total  631           clock   85.1Hz
  800x600 (0x55)   50.0MHz +HSync +VSync
        h: width   800 start  856 end  976 total 1040 skew    0 clock   48.1KHz
        v: height  600 start  637 end  643 total  666           clock   72.2Hz
  800x600 (0x56)   49.5MHz +HSync +VSync
        h: width   800 start  816 end  896 total 1056 skew    0 clock   46.9KHz
        v: height  600 start  601 end  604 total  625           clock   75.0Hz
  800x600 (0x57)   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 (0x58)   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 (0x59)   36.0MHz -HSync -VSync
        h: width   640 start  696 end  752 total  832 skew    0 clock   43.3KHz
        v: height  480 start  481 end  484 total  509           clock   85.0Hz
  640x480 (0x5a)   31.5MHz -HSync -VSync
        h: width   640 start  664 end  704 total  832 skew    0 clock   37.9KHz
        v: height  480 start  489 end  492 total  520           clock   72.8Hz
  640x480 (0x5b)   31.5MHz -HSync -VSync
        h: width   640 start  656 end  720 total  840 skew    0 clock   37.5KHz
        v: height  480 start  481 end  484 total  500           clock   75.0Hz
  640x480 (0x5c)   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
  720x400 (0x5d)   35.5MHz -HSync +VSync
        h: width   720 start  756 end  828 total  936 skew    0 clock   37.9KHz
        v: height  400 start  401 end  404 total  446           clock   85.0Hz
  640x400 (0x5e)   31.5MHz -HSync +VSync
        h: width   640 start  672 end  736 total  832 skew    0 clock   37.9KHz
        v: height  400 start  401 end  404 total  445           clock   85.1Hz
  640x350 (0x5f)   31.5MHz +HSync -VSync
        h: width   640 start  672 end  736 total  832 skew    0 clock   37.9KHz
        v: height  350 start  382 end  385 total  445           clock   85.1Hz
Comment 2 Julien Cristau 2008-03-04 05:39:07 UTC
On Tue, Mar  4, 2008 at 05:06:48 -0800, bugzilla-daemon@freedesktop.org wrote:

> The xserver-xorg intel driver misconfigures my Fujitsu Siemens C1110
> laptop, whereas the i810 driver has worked fine.
> 
> More precisely, there are 2 areas where the configuration is not all right,
> details follow:
> A. screen resolutions and modes
> B. resume from RAM
> 
Please attach (not paste) your full Xorg log, preferrably with the
ModeDebug option turned on (see the intel(4) manpage for details).

Thanks.
Comment 3 Jörg Höhle 2008-03-05 05:24:32 UTC
Created attachment 14855 [details]
Xorg.0.log with intel driver in ModeDebug

Here's Xorg.0.log after logging into X, then switching once to VT1 and back.
Note in line 1718 the binary junk:
(II) intel(0): Mode for pipe B:
(II) intel(0): Modeline "<junk>"x59.3   64.23  1024 ...
Comment 4 Jörg Höhle 2008-03-05 05:49:03 UTC
Created attachment 14856 [details]
i810 driver Xorg.0.log

For comparison, i810 driver log on the same machine.
Xorg.0.log after logging into X, then switching once to VT1 and back.
Comment 5 Wang Zhenyu 2008-03-05 21:30:36 UTC
How about try our 2.2.1 release?
Comment 6 Gordon Jin 2008-03-06 18:30:44 UTC
>> More precisely, there are 2 areas where the configuration is not all right,
>> details follow:
>> A. screen resolutions and modes

Let's focus on A here.

>> B. resume from RAM

suspend/resume should have been fixed. Please try kernel 2.6.25-rc1+ plus xf86-video-intel 2.2.1
Comment 7 Hong Liu 2008-03-09 20:15:24 UTC
(In reply to comment #0)
> The laptop supports what I call "hardware scaling" of lower screen
> resolutions to the full 15" 1024x768. This can be toggled any time via
> the key Fn-F5. This has always worked beautifully with i810. The
> 800x600 and 640x480 modes appear either 1:1, centered with black
> borders, or they are scaled to the full screen dimensions, which is
> beautiful for the VT consoles and games.
> 

i810 used vbios to do modesetting, and your "hardware scaling" feature seems also be serviced by the vbios. So with i810, vbios is the only place to do modesetting.
This works OK.

While intel driver does modesetting in driver itself. So when you press Fn-F5, vbios is invoked to do "hardware scaling". This may cause the problem since the graphic hardware is configured by two independent software.

Does the intel driver work on X server startup (1024x768?), and changing mode with xrandr is OK?

For your hardware scaling feature, I am afraid we probably can't support with native modesetting in intel driver.

Thanks,
Hong
Comment 8 Michael Fu 2008-03-21 06:48:53 UTC
(In reply to comment #6)
> >> More precisely, there are 2 areas where the configuration is not all right,
> >> details follow:
> >> A. screen resolutions and modes
> 
> Let's focus on A here.
> 
> >> B. resume from RAM
> 
> suspend/resume should have been fixed. Please try kernel 2.6.25-rc1+ plus
> xf86-video-intel 2.2.1
> 

Jorg, For B, are you able to try that? For A, is it a dup of bug# 13505?
Comment 9 Michael Fu 2008-04-01 19:56:54 UTC
I think we lost contact with bug reporter. I'll reject this bug now and will see if we can revive this bug using this way...
Comment 10 Jörg Höhle 2008-04-04 04:33:23 UTC
>I think we lost contact with bug reporter.
Oops, I'm sorry. Please excuse my slow reaction as I'm overwhelmed with work and it's unclear to me how to use a particular version of Xorg or the Linux kernel since basically I'm using a distribution (Ubuntu Gutsy) and not sources from kernel.org and x.org.
It's completely unclear to me how (easily?) I could use X 2.2.1 and kernel 2.6.25-rc1+ and what requirement there are for doing so and whether I can integrate that with Ubuntu or must create a pristine partition and system.
Comment 11 Jörg Höhle 2008-04-04 04:44:57 UTC
Hong Liu wrote:
>For your hardware scaling feature, I am afraid we probably can't support with
>native modesetting in intel driver.

Ouch!!
I found hardware scaling working so well that I made a fierce decision to use it as one of the most distinguishing features|requirements for my next PC purchase.  A former machine's scaling was not so beautiful and esp. not changeable at run-time.

Beside this criteria, new machines look very similar; all have RAM, CPU, Mhz, GB HD etc., so there's a need for discriminating criteria to help me choose one.
Other criteria I plan to use:
 - supported Linux gfx driver (probably means no ATI)
 - location of USB connectors
 - suspend/resume
 - weight (e.g. possibly separate CD-ROM/DVD)

Thus I really, really hope that hardware scaling will be supported by the new Intel driver, as the well-working i810 becomes/is unsupported.

Regards,
Comment 12 Jörg Höhle 2008-04-04 05:21:41 UTC
> A. screen resolutions and modes
>For A, is it a dup of bug# 13505?
Indeed, it looks very similar:

>Note 1:
>  The "center/stretch" key of the keyboard has no effect (screen flickers
>  once) when Xorg is started from text-console, not tested from framebuffer
Same for me (as reported, screen flickers shortly once only).

>Fujitsu Siemens S7020 with i915
>Intel Corporation Mobile 915GM/GMS/910GML
>Express Graphics Controller [8086:2792] (rev 04)
Fujitsu Siemens C1110 with i810
Intel Corporation 82852/855GM Integrated Graphics Device rev 2

>The screen (not stretched) appears in left top corner of my monitor,
Same here

> but the rest of the monitor is not blank.
I observed black lower right borders initially, and the diagonal triangle after pressing Fn-F5.

>The brightness being controlled by the BIOS/ACPI in background is not so much
>of a problem
Agreed, this has always worked perfectly, in all modes (text and X).

So indeed, what I observed in Ubuntu Gutsy is very similar to what 'Bruno' reports in bug# 13050 and bug# 13844

>>The Center/Stretch hotkey is more of a problem as Xorg's programming of video
>>modes is not compatible with what ACPI expects. (X does not seem to suffer
>>directly from it, but results on display are broken)
>I'll mark this bug as NOTOURBUG.
Uh oh.

Regards

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.