Bug 1559 - radeon: Continuing problems with display detection
radeon: Continuing problems with display detection
Status: RESOLVED FIXED
Product: xorg
Classification: Unclassified
Component: Driver/Radeon
git
x86 (IA32) Linux (All)
: high major
Assigned To: Xorg Project Team
:
: 1301 1303 1374 1482 1622 1631 2755 4606 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-08 01:48 UTC by Egbert Eich
Modified: 2006-07-28 10:25 UTC (History)
22 users (show)

See Also:


Attachments
Working log from XFree86 4.3.99.2 (53.83 KB, text/plain)
2004-10-08 01:52 UTC, Egbert Eich
no flags Details
Log from 6.8.0 showing regression (43.63 KB, text/plain)
2004-10-08 01:54 UTC, Egbert Eich
no flags Details
6.8.0 log with only internal display connected (38.79 KB, text/plain)
2004-10-08 01:59 UTC, Egbert Eich
no flags Details
Patch for fixing monitor detection bugs (6.34 KB, patch)
2004-10-17 18:33 UTC, HUI YU
no flags Details | Splinter Review
config file with a IGP320M (3.60 KB, text/plain)
2004-10-19 01:47 UTC, Cyrille Berger
no flags Details
a log file for IGP320M with MonitorLayout and not working (49.50 KB, text/plain)
2004-10-19 01:48 UTC, Cyrille Berger
no flags Details
improved version for attachment# 1121 (7.07 KB, patch)
2004-10-19 09:12 UTC, HUI YU
no flags Details | Splinter Review
[FIXED_X11R68x] Another improved patch (7.91 KB, patch)
2004-10-19 17:09 UTC, HUI YU
roland.mainz: 6.8‑branch+
Details | Splinter Review
Log of above note (43.31 KB, text/plain)
2004-12-13 07:01 UTC, Erik Slagter
no flags Details
Xorg.log on Acer TravelMate 803 (46.28 KB, text/plain)
2004-12-14 13:34 UTC, Christian Boltz
no flags Details
The 6.8.1-901 startup log for entry above (47.14 KB, text/plain)
2005-01-02 07:58 UTC, Han Pilmeyer
no flags Details
The 6.7.0 startup log for entry above (34.56 KB, text/plain)
2005-01-02 08:01 UTC, Han Pilmeyer
no flags Details
mobility 9600 not detecting dual head properly (41.51 KB, text/plain)
2005-01-14 14:13 UTC, Harold Campbell
no flags Details
mobility 9600 config (3.91 KB, text/plain)
2005-01-14 14:15 UTC, Harold Campbell
no flags Details
Xorg.conf with MonitorLayout Option for R50p (3.92 KB, text/plain)
2005-01-19 17:05 UTC, Matthew Luckie
no flags Details
Xorg.0.log with just laptop LCD for R50p without MonitorLayout Option (34.52 KB, text/plain)
2005-01-19 17:07 UTC, Matthew Luckie
no flags Details
Xorg.0.log with just external CRT for R50p without MonitorLayout Option (45.01 KB, text/plain)
2005-01-19 17:07 UTC, Matthew Luckie
no flags Details
Xorg.0.log with the CRT plugged in with the MonitorLayout Option (34.79 KB, text/plain)
2005-01-19 17:09 UTC, Matthew Luckie
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egbert Eich 2004-10-08 01:48:29 UTC
On a Acer Travelmate 803 with Radeon 9000 a regression in the display detection
was introduced with 6.8.0 comared to 6.7.0 (aka XFree86 4.3.99.2). 
Starting X with no external display connected works fine.
When starting X with a analog DDC capable display connected to the external port
the external display is detected as the only available display. As such it is
assigned to screen 0 and aquires the modes from the configuration file that were 
ment for the internal display while the internal display remains inactive. 
The previous versions detected both displays correctly and aquired DDC data
for the external as well as the internal display.
Comparing the code the new version obtains a list of available connectors from
the BIOS while the older version proed every possible connector.
I will attach the relevant log files.
This BIOS list seems to be buggy on the system in question.
Comment 1 Egbert Eich 2004-10-08 01:52:18 UTC
Created attachment 1033 [details]
Working log from XFree86 4.3.99.2

This log file shows that all connectors are probed and the DDC data is found
for both the external display and the internal panel.
Comment 2 Egbert Eich 2004-10-08 01:54:11 UTC
Created attachment 1034 [details]
Log from 6.8.0 showing regression

This log only shows DDC data for the external display.
Comment 3 Egbert Eich 2004-10-08 01:59:05 UTC
Created attachment 1035 [details]
6.8.0 log with only internal display connected

This log contains no DDC data. The LVDS as primary display is a fallback.
Comment 4 Alex Deucher 2004-10-08 06:36:33 UTC
Can you try with cvs prior to Hui's r400 support patch?  I think that's what
broke it.  I think the display handling code committed was incomplete (it was a
partial merge of Hui's original code drop for r400 support and better display
handling). Someone probably needs to fully merge the original revamped display
handling patch.  It's complicated since the patch is substantial and it was
against xorg prior to the the DRI merge and now that part of it was merged it's
even more complicated.  I started to a while back, but lack of time has
prevented me from finishing it.  The patch in question is here:
http://www.botchco.com/alex/radeon/hy0/x440_radeon_4_newchips.diff

I may get to it one of these days, but I can't make any promises.  if someone
beats me to it...
Comment 5 Alex Deucher 2004-10-08 06:37:24 UTC
*** Bug 1482 has been marked as a duplicate of this bug. ***
Comment 6 Alex Deucher 2004-10-08 06:45:17 UTC
*** Bug 1301 has been marked as a duplicate of this bug. ***
Comment 7 Alex Deucher 2004-10-08 06:47:47 UTC
this patch should handle lvds + DVI, so it may help thinkpad owners with DVI
ports in addition to their LCD's.
Comment 8 Egbert Eich 2004-10-08 07:44:22 UTC
> Can you try with cvs prior to Hui's r400 support patch? 
That's not so easy because it is not my machine. A customer reported this
problem and they are not very good at testing.
However I'm positive that this patch is involved because the wrong information
appearantly comes from RADEONGetConnectorInfoFromBIOS().
It only talks about one connector therefore the other one doesn't get probed.




Comment 9 HUI YU 2004-10-08 09:07:08 UTC
It is caused my patch. Basically in the old code, the driver doesn't trust the 
DDC mapping info collected from BIOS, the DDC detection code made some default 
assumptions: DDC_DVI for first head and DDC_CRT for second head, both heads will
fallback to DDC_CRT2 if not detected on the default line. This scheme works for
most of existing cards, but has problem with new cards. Also this scheme causes 
longer delay in X startup because of redundant DDC detection. 

With the new code, driver trusts whatever collected from BIOS and just tries
DDC pin indicated by BIOS. But this doesn't seem to work correctly always, 
especially for some laptops. I was hoping there won't be too many of these 
cases, in which you can overwrite the autodetection with MonitorLayout option.
I'll look into this, see if I can find a better solution.
Comment 10 Alex Deucher 2004-10-12 09:48:27 UTC
*** Bug 1374 has been marked as a duplicate of this bug. ***
Comment 11 Christophe Jacquet 2004-10-13 01:07:19 UTC
Confirming the problem on a Compaq/HP NX9000 laptop with a Radeon IGP 340M. My
second (VGA) monitor no longer gets detected with Xorg 6.8, and my logs look
like Egbert's.
Comment 12 Christophe Jacquet 2004-10-13 01:43:46 UTC
BTW, is there any workaround for this bug ? I tried the "NoDDC" option, but it
seems not to be taken into account by the driver.
Comment 13 Alex Deucher 2004-10-13 05:58:40 UTC
(In reply to comment #12)
> BTW, is there any workaround for this bug ? I tried the "NoDDC" option, but it
> seems not to be taken into account by the driver.

You should be able to use override the detected outputs with the "MonitorLayout"
option, however, if DDC doesn't work on one of the heads, you'll have to
manually enter the hsync and vrefresh ranges for your monitor in the monitor
section. See the radeon man page for the monitorlayout options.
Comment 14 Stefan Dirsch 2004-10-15 13:10:49 UTC
*** Bug 1631 has been marked as a duplicate of this bug. ***
Comment 15 Lance Albertson 2004-10-15 20:53:35 UTC
I'm having the same problem here with two radeon cards (one AGP, the other PCI).
Below is the two cars I'm using. 

0000:00:0f.0 VGA compatible controller: ATI Technologies Inc Radeon RV100 QY
[Radeon 7000/VE]
0000:01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R100 QD
[Radeon 7200]

I did the suggestion of using MonitorLayout in the config, and after that X
would try to start up, then segfault :(. I'm going to try rebooting and seeing
if that helps. If you'd like, I can post the Xorg log file. Btw, I'm running
6.8.0. There's a followup bug on gentoo's bug site concerning this:
http://bugs.gentoo.org/show_bug.cgi?id=67485

Thanks for any input!
Comment 16 Alex Deucher 2004-10-17 13:17:34 UTC
*** Bug 1303 has been marked as a duplicate of this bug. ***
Comment 17 HUI YU 2004-10-17 18:33:49 UTC
Created attachment 1121 [details] [review]
Patch for fixing monitor detection bugs

Here is a patch for fixing a few monitor detection bugs. 7200 related problem
(Bug 
# 1301, Bug# 1622 and comment #15 From Lance Albertson) and MonitorLayout
problem 
(Bug# 1374 and Bug# 1482) should be fixed with this patch. There are also some 

experimental code for fixing DDC detection problem originally reported in this
bug 
report and in Comment #11 From Christophe Jacquet. Since I can't find any of
these 
laptops, the fix is based on the log file posted. Please try this patch see if
it 
makes any difference. If it still doesn't work, please post your log file,
Thanks.
Comment 18 stamm 2004-10-18 09:33:26 UTC
(In reply to comment #17)
> Created an attachment (id=1121) [edit]
> Patch for fixing monitor detection bugs
> 
> Here is a patch for fixing a few monitor detection bugs. 7200 related problem
for me it works so far (Bug # 1301) I was able to start xorg without the NoDDC
option.
Thanks for your patch
Comment 19 Lance Albertson 2004-10-18 19:16:34 UTC
This patch fixed the issue I had! I'll have to test on my laptop to see if it
fixes the lid problem which I think may be related. Thanks!
Comment 20 jabawok 2004-10-18 19:32:24 UTC
The Patch fixed the problem for a Radeon M6 LY in a Toshiba Libretto L5. Dual
Head working again perfectly. Cheers..
Comment 21 Alex Deucher 2004-10-18 20:57:08 UTC
bug 1666 may also be related.  I haven't had a chance to look into it yet.
Comment 22 Cyrille Berger 2004-10-19 01:46:32 UTC
It's still not working on my computer (a presario 900 with an IGP320M). The 
only difference is that whithout the MonitorLayout option, now xorgs detects 
my internal monitor. 
I get the same results with two devices sections. 
I have post my xorg.conf (maybe I am doing something wrong in it ?) and 
Xorg.0.log in attachement. 
Comment 23 Cyrille Berger 2004-10-19 01:47:41 UTC
Created attachment 1128 [details]
config file with a IGP320M
Comment 24 Cyrille Berger 2004-10-19 01:48:31 UTC
Created attachment 1129 [details]
a log file for IGP320M with MonitorLayout and not working
Comment 25 Christophe Jacquet 2004-10-19 01:58:42 UTC
With the original version, I couldn't ovverride the detected outputs with
"MonitorLayout". However, it works when I apply the patch, but only when using
"MonitorLayout". If I don't use this option, I can't use dual head.

Also, I had a look at radeon_bios.c, around line 240 (section modified by the
patch): if I get it right, it assumes that if only one connector is found, it
has index 0, and copies it to index 1. I tried to add a debugging output, and it
turns out that my only connector originally found by the driver has index 1 and
not 0 ! (when incrementing connector_found at line 230 or so, tmp1 is equal to 1
on my system...) Of course I tried to comment out the memcpy on line 242 or so,
but the additionnal entry I get still doesn't hold a valid monitor description
so I don't get any further.
Comment 26 HUI YU 2004-10-19 09:12:22 UTC
Created attachment 1130 [details] [review]
improved version for attachment# 1121 [details] [review]

Here is an improved version of patch according to the feedback in comment #25 
from Christophe Jacquet. 
As for the problem reported in comment #24 From Cyrille Berger, I don't think
the problem is really monitor detection related. There are many IGP320M laptops

that we have never be able to make them work with dual-head (I'm still not sure

what's wrong with radeon driver for these laptops, I've never had access to 
one of them). I suspect this is one of them, try XFree86 4.4 (or FC2 or 
SuSE9.1) and see if it makes any difference. Thanks.
Comment 27 Cyrille Berger 2004-10-19 10:05:29 UTC
Unfortunately, I already tried xfree 4.4. I am available to provide any help 
possible to fix the problem with the IGP320m.  
Comment 28 Kevin E. Martin 2004-10-19 12:06:11 UTC
Just doing some regression testing with Hui's latest patch from comment #26 on
the following cards:

Radeon R100 QD
Radeon R200 QL [8500 LE]
Radeon R300 NE [9500 Pro]
Radeon R300 ND [9700 Pro]
Radeon RV280 5961 [9200]
Radeon RV100 QY [7000 -- Dell dual head]

The R100 and RV280 are single headed, and the rest are dual head.
All worked fine with Hui's patch.
I don't have access to any laptops with Radeons.

The only oddity is that the 9200 detected two CRT heads, but there was only one
connector detected.
Comment 29 HUI YU 2004-10-19 17:09:40 UTC
Created attachment 1133 [details] [review]
[FIXED_X11R68x] Another improved patch

Good catch, Kevin. 9200 oddity is actually another bug. See new patch.
To Cyrille Berger, if XFree86 4.4 doesn't work for your 320M, it's the old dual
head problem I was talking about. I don't have a solution for this, unless I
can access such a laptop some day.
Comment 30 Mike A. Harris 2004-10-20 00:46:57 UTC
Ok, I've got Hui's patch from comment #29 now added to our xorg-x11-6.8.1-11
as "xorg-x11-6.8.1-ati-radeon-mobility-display-detection-fix2.patch".  Doing
test build.
Comment 31 Christophe Jacquet 2004-10-25 03:54:16 UTC
I tried the latest patch with two external monitors connected to a notebook
equipped with an IGP 34OM:
 - Belinea/Maxdata monitor: the driver does not get DDC information (maybe this
monitor is not DDC-capable ?). So by default, the monitor is not detected, and
it displays a clone image of the integrated flat panel's. However I can activate
dual head with "MonitorLayout" (all went fine without this extra option with
X.org 6.7);
 - Iiyama AX3815U: the driver manages to get full DDC information. But in this
case, the integrated flat panel is blanked and only the external monitor
displays an image.
Comment 32 Christopher O'Neill 2004-10-31 09:24:06 UTC
I can confirm the latest patch works on a RV350 (9600 Mobility) in an eMachines
amd64 laptop - the MonitorLayout option is required however.

Thanks Hui.
Comment 33 Roland Mainz 2004-11-12 09:06:52 UTC
Comment on attachment 1133 [details] [review]
[FIXED_X11R68x] Another improved patch

Approved for checkin into X11R6.8.x in the 2004-11-12 release-wranglers call.
Comment 34 Alex Deucher 2004-11-12 09:13:33 UTC
when this is applied to 6.8.2, can someone please update HEAD as well?  If not,
I'll do it if everyone is ok with that.
Comment 35 Alex Deucher 2004-12-11 16:15:44 UTC
committed to HEAD
Comment 36 Christian Boltz 2004-12-12 15:03:28 UTC
The last patch works for me (Acer TravelMate 803, Mobility Radeon 9000) and 
enables dualhead again. 
Thanks for this! 
 
However, it still has some disadvantages compared with the old XFree driver: 
- I need   Option   "MonitorLayout" "LVDS,TMDS"   in my Xorg.conf 
- if external monitor is disconnected, the desktop still uses dualhead size  
  which means windows appear in the "off". The old driver detected this and  
  reduced desktop size to existing screens. 
It would be nice if you could fix this. 
Comment 37 Alex Deucher 2004-12-12 19:17:09 UTC
(In reply to comment #36)
> The last patch works for me (Acer TravelMate 803, Mobility Radeon 9000) and 
> enables dualhead again. 
> Thanks for this! 
>  
> However, it still has some disadvantages compared with the old XFree driver: 
> - I need   Option   "MonitorLayout" "LVDS,TMDS"   in my Xorg.conf 

Does you laptop actually have a DVI port?  If not does replacing TMDS with CRT
also work?

Could you attach your xorg log?

Comment 38 Erik Slagter 2004-12-13 06:40:02 UTC
On Dell Inspiron 4150 (Mobile Radeon 7200), it can get it working now, with the
MonitorLayout option to "LVDS, CRT".

I cannot get to any virtual consoles using alt-ctrl-f1 etc. now. X freezes and h
as to be killed. I am not sure if it's related, but it's annoying.
Comment 39 Alex Deucher 2004-12-13 06:53:44 UTC
(In reply to comment #38)
> On Dell Inspiron 4150 (Mobile Radeon 7200), it can get it working now, with the
> MonitorLayout option to "LVDS, CRT".
> 
> I cannot get to any virtual consoles using alt-ctrl-f1 etc. now. X freezes and h
> as to be killed. I am not sure if it's related, but it's annoying.

can you please attach your xorg log?
Comment 40 Erik Slagter 2004-12-13 07:01:22 UTC
Created attachment 1539 [details]
Log of above note
Comment 41 Christian Boltz 2004-12-14 13:34:18 UTC
Created attachment 1545 [details]
Xorg.log on Acer TravelMate 803

> > - I need   Option "MonitorLayout" "LVDS,TMDS"   in my Xorg.conf
>
> Does you laptop actually have a DVI port? 

No, just an analog port.

> If not does replacing TMDS with CRT also work?

Yes, it also works.
Comment 42 Roland Mainz 2004-12-15 18:09:34 UTC
Comment on attachment 1133 [details] [review]
[FIXED_X11R68x] Another improved patch

Patch checked-in into X11R6.8.x stable branch:

/cvs/xorg/xc/ChangeLog,v  <--  ChangeLog
new revision: 1.365.2.97; previous revision: 1.365.2.96
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
/cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_bios.c,v  <-- 
radeon_bios.c
new revision: 1.1.2.1; previous revision: 1.1
/cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v	<-- 
radeon_driver.c
new revision: 1.19.2.4; previous revision: 1.19.2.3
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
Mailing the commit message to xorg-commit@lists.freedesktop.org...
Comment 43 Han Pilmeyer 2005-01-02 07:57:05 UTC
I don't believe that the latest patch fixes all of the problems yet (although it
certainly is an improvement). I have a Compaq Evo N1000c laptop with a Medion
TFT monitor on the external port. I tried the patch before and it didn't work
with the external monitor. I tried the 6.8.1-901 version today and it still has
an issue.

Have to be a bit vague about the problem as I'm not completely sure how to
describe it. However the 6.7.0 version doesn't have any issues with this monitor
and neither do I see any issues with the occasional use of an "other operating
system".

What I see on the Medion TFT monitor with 6.8.0 or later is that the displayed
screen is shifted vertically and starts at about 1/3 of the monitor screen. By
powering off/on the monitor, it displays correctly, but there is a "pop-up error
box" that is displayed by the monitor over the screen. This is done by the
monitor and it blocks part of the image. The makes it impossible to use the monitor.

I'll attach the 6.8.1-901 and 6.7.0 Xorg-x11.log files next.
Comment 44 Han Pilmeyer 2005-01-02 07:58:54 UTC
Created attachment 1611 [details]
The 6.8.1-901 startup log for entry above
Comment 45 Han Pilmeyer 2005-01-02 08:01:04 UTC
Created attachment 1612 [details]
The 6.7.0 startup log for entry above
Comment 46 Harold Campbell 2005-01-14 14:12:27 UTC
(In reply to comment #36)
> The last patch works for me (Acer TravelMate 803, Mobility Radeon 9000) and 
> enables dualhead again. 
> Thanks for this! 
>  
> However, it still has some disadvantages compared with the old XFree driver: 
> - I need   Option   "MonitorLayout" "LVDS,TMDS"   in my Xorg.conf 
> - if external monitor is disconnected, the desktop still uses dualhead size  
>   which means windows appear in the "off". The old driver detected this and  
>   reduced desktop size to existing screens. 
> It would be nice if you could fix this. 

I just tried the 6.8.1.902 release as packaged by Fedora Rawhide and still see
these problems on my eMachines M6805 (x86_64) laptop (Radeon Mobility 9600).
Seeing as how a switch between dual head and single head every day this is
really a bummber for me. I'll attach the output and my config.
Comment 47 Harold Campbell 2005-01-14 14:13:59 UTC
Created attachment 1683 [details]
mobility 9600 not detecting dual head properly
Comment 48 Harold Campbell 2005-01-14 14:15:53 UTC
Created attachment 1684 [details]
mobility 9600 config

With the monitorlayout option dual head works and single head does not. Without
the monitorlayout option it's the other way around.
Comment 49 Matthew Luckie 2005-01-19 17:03:00 UTC
I have just tried the patch applied to CVS.  My laptop is an IBM ThinkPad R50p
with an ATI FireGL Mobility T2 (M10) NT (AGP) found.  I am running FreeBSD 5.3
and xorg 6.8.1.

I am using Option "MonitorLayout" "LVDS, CRT" which allows the X server to start
when a monitor is attached, but the CRT does not seem to be functional,
according to the logs I've attached.  Without this option, the laptop's LCD is
inactive, and the CRT says that the refresh rate 57.2kHz / 40 Hz is out of range.

I'm attaching 4 things:
1. my xorg.conf
2. Xorg.0.log with just the LCD without the MonitorLayout Option
3. Xorg.0.log with the CRT plugged in without the MonitorLayout Option
4. Xorg.0.log with the CRT plugged in with the MonitorLayout Option

the next thing I'm going to try is the current 6.8.2 CVS code for the radeon to
see if i have anymore luck there.
Comment 50 Matthew Luckie 2005-01-19 17:05:06 UTC
Created attachment 1720 [details]
Xorg.conf with MonitorLayout Option for R50p
Comment 51 Matthew Luckie 2005-01-19 17:07:04 UTC
Created attachment 1721 [details]
Xorg.0.log with just laptop LCD for R50p without MonitorLayout Option
Comment 52 Matthew Luckie 2005-01-19 17:07:51 UTC
Created attachment 1722 [details]
Xorg.0.log with just external CRT for R50p without MonitorLayout Option
Comment 53 Matthew Luckie 2005-01-19 17:09:01 UTC
Created attachment 1723 [details]
Xorg.0.log with the CRT plugged in with the MonitorLayout Option
Comment 54 Jennifer Elaan 2005-01-20 00:37:52 UTC
The use of the patch in attachment 1133 [details] [review] leads to the manifestation of bug 1991.
 The module without the patch does not have this bug.
Comment 55 Erik Slagter 2005-01-20 01:34:25 UTC
> The use of the patch in attachment 1133 [details] [review] [edit] leads to the manifestation of
bug 1991.
>  The module without the patch does not have this bug.

Yeah, confirmed here. OTOH the X server version used (6.6.8 or any 6.7) does not
matter, so that suggests it's in de patch as well.
Comment 56 ajax at nwnk dot net 2005-04-03 14:36:05 UTC
mass update: the fix for this bug was applied to both HEAD and the stable 6.8 branch, but the bug was 
never closed.  closing now.
Comment 57 Harold Campbell 2005-04-05 10:13:49 UTC
Unless a fix was applied post-6.8.2 then this bug is not yet fixed for me. Using
Fedora's xorg-x11-6.8.2-1.FC3.13 I still have to use MonitorLayout to get dual
head to work and comment it out to switch back to single head when no monitor is
plugged in.
Comment 58 ajax at nwnk dot net 2005-08-28 11:20:16 UTC
*** Bug 1622 has been marked as a duplicate of this bug. ***
Comment 59 Erik Slagter 2005-09-02 04:42:13 UTC
Please note: at least one CVS change since 6.8.2 has broken dual-head operation.
I have located one already (a change in a macro that exposed an old bug), fixing
  of that makes 6.8.3-6.8.99 work. Now I run into another one which I am hunting
down now.
Comment 60 Christian Boltz 2005-09-11 14:35:29 UTC
There's another regression which is even worse :-(

I'm testing SUSE 10.0 beta at the moment - when I start X with the external
monitor connected, the laptop display is switched off.

This means I have to _disconnect_ the external monitor _every time_ before
starting X which is really annoying.

My system is a Acer TravelMate 803 laptop with Mobility Radeon 9000. 
The same xorg.conf (with MonitorLayout option) worked on SUSE 9.3.
X version is 6.8.2 in both cases, but SUSE has added some new patches to support
new graphic cards AFAIK.
Comment 61 Matthias Hopf 2005-09-13 09:30:42 UTC
It seems to be that this is fixed in current CVS code. SUSE will ship 7.0 as
soon as it is out, so this 'regression' shouldn't be seen too long.

Waiting for customer input (Christian :) to confirm so we can close this one for
good.

Thanks Erik for working on this! Maybe it's good for you to know that CVS works
better than 6.8.2, at least for me...
Comment 62 Matthias Hopf 2005-09-14 03:52:57 UTC
Christian just replied that for him the CVS driver doesn't work any better (even
worse)... :-(
Comment 63 T. Hood 2005-09-25 03:50:01 UTC
*** Bug 2755 has been marked as a duplicate of this bug. ***
Comment 64 T. Hood 2005-09-26 03:01:09 UTC
*** Bug 2985 has been marked as a duplicate of this bug. ***
Comment 65 T. Hood 2005-09-28 02:06:58 UTC
*** Bug 4606 has been marked as a duplicate of this bug. ***
Comment 66 Brandon Darbro 2005-10-31 17:13:55 UTC
This bug still exists in CVS as of 10/24/2005 and no one seems to be working it.
 I have a Dell Latitude C610 laptop with the Radeon Mobility M6 LY video
chipset.  Currently I must use manually switch between using an external or
internal monitor, because if I let it auto detect, the external display is
locked at 800x660 maximum resolution.  Manual work around of:

Option "MonitorLayout" "CRT, LVDS"

Is used when wanting to drive an external display at anything higher than
800x600.  Please fix this before 6.9/7.0 final.  Please!  This wasn't a problem
with 6.8.2, that release worked perfect without workarounds.

With this submission, I'll be attempting to change "Version" to CVS_head in
hopes it will finally get some developer attention.
Comment 67 ajax at nwnk dot net 2005-11-30 17:12:05 UTC
this bug is getting so long as to be useless.  can people please clarify what
the actual issue they're experiencing is?
Comment 68 Harold Campbell 2006-03-22 17:00:09 UTC
(In reply to comment #67)
> this bug is getting so long as to be useless.  can people please clarify what
> the actual issue they're experiencing is?

Sure. As of today, using the X11R7.0 as distributed by Fedora Core 5 I can no
longer get a monitor detected on the VGA port of my laptop's Radeon 9600. X 6.4
worked as expected. X 6.8 could be made to do dual head using a MonitorLayout
incantation.
Comment 69 Benjamin Herrenschmidt 2006-03-23 16:32:01 UTC
Ok, let's start again then :)

Can you try the ati-1-0-branch driver (I suspect it needs xorg 7.0 though) and
send me the logs if it still fails ? This branch is where we are trying to fix
as much as possible of the known bugs without adding features in order to maybe,
finally, have a radeon driver that doesn't suck like hell
Comment 70 Erik Slagter 2006-03-25 04:23:25 UTC
> Can you try the ati-1-0-branch driver (I suspect it needs xorg 7.0 though) and
> send me the logs if it still fails ? This branch is where we are trying to fix
> as much as possible of the known bugs without adding features in order to maybe,
> finally, have a radeon driver that doesn't suck like hell

That would be great. For a long time I used the ati driver from 6.8.2 which I
compiled myself, which (at least for LVDS+CRT) worked like a charm. After that
version, it got worse and worse.

My exact problem (still) is that with versions after 6.8.2 my CRT does get
detected, but nothing is sent to it. Xorg log says it sees the monitor, gets the
valid resolutions, picks a valid one, but the monitor says: no signal. I did
some trickery to force the CRTC2 output to be sent to external TMDS (DVI) as
well, and then on DVI it does show some picture, light blue, nothing on it, and
a garbled mouse pointer. There must be something really screwed up here. Even if
you start X afterwards with WORKING (i.e. 6.8.2 or older) dual head, the second
screen is still messed up. It needs a reboot to get it right.

Now I installed FC5 as well, of course new Xorg server, new driver model (.so)
so my own compiled driver didn't load anymore. So I compiled again 6.8.2, now in
so mode, copied the ati drivers over and now it works like a charm. But (of
course) this is not satisfying, if only because Alex's superpatch, which I'd
really like to see working, won't apply to it. OTOH I cannot apply it to newer
versions; the driver simply won't work.

So... I'd really like to see someone (preferrably the one who made the changes)
to review the changes after 6.8.2 and reverse the change that broke a working
dual head setup.

If anyone is interested I can supply the 6.8.2 *.so files for ati/radeon, which
do work.
Comment 71 Benjamin Herrenschmidt 2006-03-25 08:51:16 UTC
I think I fixed that in the ati-1-0-branch driver, so please test and report
Comment 72 Erik Slagter 2006-04-16 06:08:38 UTC
(In reply to comment #71)
> I think I fixed that in the ati-1-0-branch driver, so please test and report

I finally got to this...

It appears that the "old" (non-modular) xserver cvs repository isn't being
updated anymore. So I switched to the "modular" xorg cvs. And finally got it
working :-(

Now, when I do cvs update -r ati-1-0-branch in the ati directory, it doesn't
compile. If I do the same on the top level, many files are thrown away and I
can't compile anything anymore.

How am I supposed to fetch this ati-1-0-branch and build it?
Comment 73 Benjamin Herrenschmidt 2006-04-16 06:35:26 UTC
the ati-1-0-branch is for use with the 7.0 server. If you are using the server
from CVS as well, use the normal top of tree ati driver, it contains the same fixes
Comment 74 Erik Slagter 2006-04-16 20:11:29 UTC
I already compiled and tested Xserver & ati driver from CVS HEAD and it doesn't
solve the problem. I still have no output from my second head at all, even
though the monitor is probed and found, the head is initialised as :0.1 and
xrandr says it is set to the right resolution (1280x1024@75).

I also tried checking out -r ati-1-0-branch from both the "old" and "new" cvs
server, both throw away a lot of files and do not compile.

I have both a HEAD Xserver (installed in an alternative root) and 7.0 Xserver
(from fedora core 5) installed in the usual location.

7.0 Xserver + ati driver that comes with it (from FC5 rpms) have the problem,
HEAD Xserver and HEAD ati driver also have the problem

The only thing that works is (again) to compile the 6.8 ati driver with .so
output together with any post-6.8 Xserver.

Please note that this change broke things to start with:

Index: radeon_macros.h
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_macros.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- radeon_macros.h 29 Mar 2005 03:49:04 -0000  1.5
+++ radeon_macros.h 23 May 2005 09:50:20 -0000  1.6
@@ -78,7 +78,7 @@
 do {                                   \
     CARD32 tmp = INREG(addr);                      \
     tmp &= (mask);                         \
-    tmp |= (val);                          \
+    tmp |= ((val) & ~(mask));                      \
     OUTREG(addr, tmp);                         \
 } while (0)

@@ -90,7 +90,7 @@ do {                                  \
 do {                                   \
     CARD32 tmp_ = INPLL(pScrn, addr);                  \
     tmp_ &= (mask);                            \
-    tmp_ |= (val);                         \
+    tmp_ |= ((val) & ~(mask));                     \
     OUTPLL(pScrn, addr, tmp_);                     \
 } while (0)

Although I can't see anything wrong with it, apparently it triggers another bug.

If I leave this change out, I can use newer releases, but from a certain point
up (somewhere around XORG-6_8_99_7 IIRC) again it stops working, this time I get
a picture, but it's completely lightblue with a garbled pointer and nothing
shows up on the screen. Maybe it's this issue you resolved (I hope...)?
Comment 75 Michel Dänzer 2006-04-17 01:04:55 UTC
(In reply to comment #74)

Interesting, sounds like at least one of the OUTPLLP() calls is incorrect. The
ones in RADEONCrtIsPhysicallyConnected() look fishy, e.g.
Comment 76 Christian Boltz 2006-04-17 01:25:46 UTC
Some words about the current status (SUSE 10.1 RC1, Xorg 6.9 + "radeon10b" 
driver on the Acer Travelmate 803 from initial comment)
- dualhead works again :-))
- I currently use my old xorg.conf with "MonitorLayout" option - I didn't have 
  the time to do tests without it yet.
- but: Ctrl-Alt-F1 gives me a black laptop display (backlight is on) + external 
  monitor "out of range". The funny thing: When I switch back to X, I see the 
  console for about half a second on the laptop display...
Comment 77 Erik Slagter 2006-04-17 02:11:42 UTC
The nasty thing is that once I had this sorted out, which exact line gave the
problem, but I don't have the modified source anymore :-(

I do know it's not a PLL thing, it's an INREG or OUTREG thing. it might be this
one. If not, I guess I'll have to redo the search :-(

(around line 899)

    if (info->MergedFB)
        OUTREGP(RADEON_CRTC2_GEN_CNTL,
            0,
            ~(RADEON_CRTC2_DISP_DIS));
    } else {
    switch (info->DisplayType) {
    case MT_LCD:
    case MT_DFP:
    case MT_CRT:
->      OUTREGP(RADEON_CRTC2_GEN_CNTL,
->          /* 0, */ RADEON_CRTC2_CRT2_ON | RADEON_CRTC2_EN, /*EMS*/
->          ~(RADEON_CRTC2_DISP_DIS));
        break;
Comment 78 Michel Dänzer 2006-04-17 03:10:02 UTC
Yeah, that looks like it wouldn't work as intended either.

BTW, I tracked the macro changes down to bug 3369, which has some interesting
pointers to other bugs as well.
Comment 79 Benjamin Herrenschmidt 2006-04-17 06:37:53 UTC
This is one of the reasons I dislike those "P" macros a lot: they tend to hid
bugs like that. Also, it's never clear by reading the code if a given
implementation does (old & mask) | new, (old & ~mask) | new, (old & mask) | (new
& ~mask) or (old & ~mask) | (new & mask). All 4 variations "make some sense" and
are used in various drivers every now and then . Even worse in radeon, we
actually change the semantics of one.

In general, I just prefer open coding:

 v = INREG(...);
 v &= ~(bits to clear);
 v |= (bits to set);
 OUTREG(..., v);

I would suggest that for any "bug" you guys end up fixing regarding the misuse
of those macros, to also open code the fix. One reason for the "P" accessors
which can be considered useful is when fine-grained locking is needed on
register accesses but that isn't the case for us.

Ben.
Comment 80 Christian Boltz 2006-04-19 10:27:45 UTC
(In reply to comment #76)
> - but: Ctrl-Alt-F1 gives me a black laptop display (backlight is on)+external 
>   monitor "out of range". The funny thing: When I switch back to X, I see the 
>   console for about half a second on the laptop display...

I just found that this is framebuffer-related. The TTYs work with vga=normal.
Comment 81 Stefan Dirsch 2006-06-07 13:40:10 UTC
Well, are there still any open issues in this bugreport, which haven't been 
adressed yet?
Comment 82 Erik Andren 2006-07-28 10:25:45 UTC
Closing.