Bug 12476 - PreferredMode freezes xserver 1.4
Summary: PreferredMode freezes xserver 1.4
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.3 (2007.09)
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-18 16:03 UTC by Evgeni Golov
Modified: 2007-11-15 08:55 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
xorg.log when freezed with preferredmode for internal screen (35.00 KB, text/plain)
2007-09-18 16:05 UTC, Evgeni Golov
no flags Details
xorg.conf (1.83 KB, application/octet-stream)
2007-09-19 12:27 UTC, Evgeni Golov
no flags Details
backtrace of Xorg freezed after startup because of the PreferredMode option (2.76 KB, text/plain)
2007-09-21 10:10 UTC, Evgeni Golov
no flags Details

Description Evgeni Golov 2007-09-18 16:03:35 UTC
I have a ThinkPad X31 with an ATI Technologies Inc Radeon Mobility M6 LY (r100 afaik) which serves two screens, the 1024x768 internal one, and a 1280x1024 external one. Latest radeon randr-1.2 git used as the driver.
For the last one to automaticaly start at the right resolution and extend my desktop, I have an entry in my xorg.conf which looks like:
Section "Monitor"
        Identifier      "VGA"
        Option          "DPMS"
        Option          "RightOf"       "LVDS"
        Option          "PreferredMode" "1280x1024"
EndSection

Today I've upgraded to Xorg 7.3 (had 7.2 before, on Debian unstable) and after a restart, X freezed (what 7.2 did not), but system was still reachable via SSH, so I've killed X and restarted it again, which again gave me a freeze. I killed it once more, pulled out my external screen and started X again - it worked without problems.

After some debugging (trying older radeon driver, the latest git, different options etc) I found out, that X freezes only when PreferredMode is set, either for the internal or for the external screen.
When I remove the option I can start X without problems, but the external screen is at 1024x768 (what looks really ugly on a cheap LCD designed for 1280x1024).
However, after successful start and login, I can use "xrandr --output VGA-0 --mode 1280x1024 --right-of LVDS" to set the screen correctly up.

I will attach a Xorg.log of a freeze with latest radeon git (2fbbd9c5f0ec27e72780e8b054bc59502f1e5651) and PreferredMode set for the internal screen.
Please let me know, if I can supply any other information.

Regards
Evgeni
Comment 1 Evgeni Golov 2007-09-18 16:05:05 UTC
Created attachment 11623 [details]
xorg.log when freezed with preferredmode for internal screen
Comment 2 Alex Deucher 2007-09-18 16:49:33 UTC
Can you attach the output of xrandr as well?
Comment 3 Evgeni Golov 2007-09-18 16:57:57 UTC
XRandR without PreferredMode (both screens connected):
zhenech@chiisai ~ % xrandr -q
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 2304 x 1024
VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
   1280x1024      74.9     75.0     59.9     60.0  
   1024x768       74.9*    75.1     70.1     60.0     59.9  
   832x624        74.6  
   800x600        72.2     75.0     74.9     60.3     59.9     56.2  
   640x480        75.0     72.8     74.8     66.7     60.0     59.4  
   720x400        70.1  
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0*+   60.0  
   800x600        60.0     60.3  
   640x480        60.0     59.9 

When I set PreferredMode, start X without the monitor the PM is set for, connect the monitor afterwards and run xrandr then, X freezes too :(
Comment 4 Alex Deucher 2007-09-18 17:20:21 UTC
can you post your xorg config as well?
Comment 5 Michel Dänzer 2007-09-19 04:07:09 UTC
It sounds like the X server enters an infinite loop when the option is present for a connected monitor. Please try attaching gdb to the X server when it's frozen and attach the backtrace.
Comment 6 Evgeni Golov 2007-09-19 12:27:00 UTC
Created attachment 11647 [details]
xorg.conf
Comment 7 Evgeni Golov 2007-09-19 13:12:37 UTC
(In reply to comment #5)
> Please try attaching gdb to the X server when it's frozen and attach the backtrace.

Could you tell me how to do that? gdb is installed, then start X, bring it to freeze, login via SSH, and run `gdb /usr/bin/X <pid of X>`? But how do I get a backtrace as soon I'm in?
Comment 8 Evgeni Golov 2007-09-21 10:10:02 UTC
Created attachment 11669 [details]
backtrace of Xorg freezed after startup because of the PreferredMode option
Comment 9 Alex Deucher 2007-09-22 13:43:08 UTC
this is an xserver bug.
Comment 10 Alex Deucher 2007-09-22 18:12:13 UTC
this patch may help:
http://www.botchco.com/alex/xorg/fix_crtc_loop.diff
Comment 11 Alex Deucher 2007-09-23 21:02:14 UTC
while there is still potential for an infinite loop in the server, the latest version of ati git master, should avoid the situation.  see if that helps.
Comment 12 Evgeni Golov 2007-10-01 14:45:13 UTC
Hm, it seems like neither the patch for xorg, nor the latest ati git can help.
My xorg still hangs.

Regards
Evgeni
Comment 13 Alex Deucher 2007-11-15 07:09:23 UTC
This should be fixed in xserver from git with Keithp's recent-ish changes to mode types.
Comment 14 Evgeni Golov 2007-11-15 07:52:21 UTC
You mean commits
feac0759522cbdc3e61ccfa373df735903c5cb27 and
29e0e180729a4f0cc020985a4de4c8bc4b9c7f5f ?
Will these be in 1.4.1? *hope*
Comment 15 Alex Deucher 2007-11-15 08:06:21 UTC
(In reply to comment #14)
> You mean commits
> feac0759522cbdc3e61ccfa373df735903c5cb27 and
> 29e0e180729a4f0cc020985a4de4c8bc4b9c7f5f ?

yes.

> Will these be in 1.4.1? *hope*
> 

doesn't look like it.  they should probably be added to the 1.4 page:
http://wiki.x.org/wiki/Server14Branch
Comment 16 Evgeni Golov 2007-11-15 08:55:49 UTC
really fixed in git, patches nominated for 1.4.1


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.