Bug 351627

Summary: sax2: add RANDR 1.2 configuration support for radeonhd driver
Product: [openSUSE] openSUSE 11.0 Reporter: Stefan Dirsch <sndirsch>
Component: SaX2Assignee: Marcus Schaefer <ms>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: ms, sndirsch
Version: Alpha 2   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Patch in SaX core
Profile patch for radeonhd
xorg.conf

Description Stefan Dirsch 2008-01-04 14:35:43 UTC
Similar to Bug #270846, but the radeonhd driver uses rather different output names.
Comment 1 Stefan Dirsch 2008-01-06 23:46:31 UTC
I would like to see this implemented for Alpha 1 (Jan 17), so it needs to be done this week. Otherwise I'm afraid we won't see radeonhd driver in our product before Alpha 3 (March 18).
Comment 2 Matthias Hopf 2008-01-25 17:01:23 UTC
I have created a set of patches, that should implement this feature. However, despite my efforts SaX doesn't include the "monitor-<secondard_output>" "EXT" option to the xorg.conf. The profile is called, and it actually tries to set this option (there's a print STDERR included), but somehow this is lost.

Marcus, I'm pretty much lost here, could you take a look? Other than that the changes should be all that's needed.


Attaching both patches now, the first one against the C code, the second includes the profiles.
Comment 3 Matthias Hopf 2008-01-25 17:02:23 UTC
Created attachment 191859 [details]
Patch in SaX core
Comment 4 Matthias Hopf 2008-01-25 17:11:39 UTC
Created attachment 191860 [details]
Profile patch for radeonhd
Comment 5 Marcus Schaefer 2008-01-28 10:08:38 UTC
Thanks for the patches. Matthias, writing profiles is a real pita, isn't it :-)
I found one code point which has not been patched for radeonhd. api/monitor.cpp
(GUI) deletes/re-adds the monitor-* specs when someone deactivates/activates
dualhead. The re-adding happens for intel only because it was our only randr
based driver up to now. I have adapted the code there too

* will checkin the patches now and submit a package, could you double check ?
* sax2 also has been ported to qt4 now and so there is a big change together
  with the readeonhd adaptions. I hope I didn't opened up too many bugs

Thanks
Comment 7 Stefan Dirsch 2008-01-28 17:52:18 UTC
Unfortunately the implementation doesn't work for me. When configuring a dualhead setup (two monitors side-by-side) xorg.conf is not written at all. :-(
Comment 8 Stefan Dirsch 2008-01-28 17:54:43 UTC
Marcus, will you find some time to look at this, if I install a machine, on which you can test this (need my machine for working)? Otherwise we need to wait for Matthias until he's back.
Comment 9 Marcus Schaefer 2008-01-28 22:00:12 UTC
this is not related to the fix mentioned here. See bug #351627
sax2 is not working at all due to the qt4 port
Comment 10 Marcus Schaefer 2008-01-28 22:01:08 UTC
sorry I mean bug: #354386
Comment 12 Stefan Dirsch 2008-01-29 16:17:40 UTC
Thanks. I gave it a try. Problems I encountered:

- For the first monitor I can only select between 800x600 and 1024x768
  (instead of required 1680x1050). 
- Although I selected side-by-side mode I got clone mode.
- I see wrong entries in xorg.conf
  ' Modes      "1024x7681024x768" "800x600" '
Comment 13 Stefan Dirsch 2008-01-31 16:54:24 UTC
(In reply to comment #12 from Stefan Dirsch)
> Thanks. I gave it a try. Problems I encountered:
> 
> - For the first monitor I can only select between 800x600 and 1024x768
>   (instead of required 1680x1050).

Seems to be a general problem since switching to Qt4. Marcus will investigate.


> - Although I selected side-by-side mode I got clone mode.
> - I see wrong entries in xorg.conf
>   ' Modes      "1024x7681024x768" "800x600" '

I was still using an older SaX2 version. With the latest version a correct
configuration is created by SaX2. Still the driver thinks it needs to do
clone mode.

  (EE) RADEONHD(0): Cannot position output DVI-I_2/digital relative to output
  Monitor[0] without modes

Matthias need to look into this when he's back.




Comment 14 Marcus Schaefer 2008-01-31 17:04:40 UTC
> Seems to be a general problem since switching to Qt4. Marcus will investigate

fixed in latest submission
Comment 15 Stefan Dirsch 2008-01-31 18:10:39 UTC
Thanks. Resolution problem is fixed now. But now SaX2 generates strange Modes lines in xorg.conf (again). :-(

  SubSection "Display"
    Depth      24
    Modes      "1680x10501680x1050" "1680x10501680x10501680x1050" [...]
Comment 16 Stefan Dirsch 2008-01-31 18:24:37 UTC
This also happens when creating a single head configuration.
Comment 17 Stefan Dirsch 2008-02-19 16:59:21 UTC
Tried again with current SaX2 of STABLE. I'll attach the complete xorg.conf.

[...]
Section "Monitor"
  Option       "CalcAlgorithm" "XServerPool"
  DisplaySize  433866 271271
  HorizSync    30-66
  Identifier   "Monitor[0]"
  ModelName    "200W (DIGITAL)"
  Option       "DPMS"
  VendorName   "PHILIPS"
  VertRefresh  30-61
  UseModes     "Modes[0]"
EndSection
[...]
Section "Device"
  BoardName    "FireGL V3300"
  BusID        "1:0:0"
  Driver       "radeonhd"
  Identifier   "Device[0]"
  Option       "SaXDualHead"
  Option       "monitor-DVI-I_2/digital" "EXT"
  VendorName   "ATI"
EndSection

DisplaySize is wrong and results in a Xserver crash. The second monitor section for "EXT" is missing completely. :-(

Comment 18 Stefan Dirsch 2008-02-19 17:00:03 UTC
Created attachment 195738 [details]
xorg.conf
Comment 19 Matthias Hopf 2008-03-05 16:55:06 UTC
Current sax2, after upgrading libqt* and sax*:

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct NULL not valid


Seems like I'll have to upgrade the full system first...
Comment 20 Stefan Dirsch 2008-03-05 18:05:44 UTC
I'm not sure if this will help. I've seen this before with a fully upgraded system. :-(
Comment 21 Matthias Hopf 2008-03-05 18:21:15 UTC
Even worse:

gkar:/suse/mhopf # sax2 -r -a
SaX: initializing please wait...
SaX: your current configuration will not be read in

SaX: no X-Server is running
SaX: will start own server if needed

SaX: something went wrong while X was called with -probeonly
SaX: try to call 'sax2 -p' and select a single device ?
abort


There's no Xserver running, I deleted all left-over locks and sockets. /var/log/SaX.log doesn't give me a single hint. Last line after sysp detection is

05-Mar 19:17:31 <I> Sysp: XStuff detection data


X -probeonly works fine.

gkar is running ATM, if you want to try. I'll just switch of the monitor.
Comment 22 Marcus Schaefer 2008-03-06 08:33:10 UTC
I guess sysp -s xstuff crashes with segfault. I guess a duplicate of #367457
could you verify ?
Comment 23 Stefan Dirsch 2008-03-06 10:31:42 UTC
Bug #367457 has been closed as fixed. So what should we verify? Update hwinfo?
Comment 24 Marcus Schaefer 2008-03-06 10:34:47 UTC
yes latest hwinfo and test if sysp -s xstuff crashes or not
Comment 25 Stefan Dirsch 2008-03-06 10:39:29 UTC
Thanks. Matthias, the one in /work/src/done/STABLE/hwinfo.
Comment 26 Matthias Hopf 2008-03-06 11:52:33 UTC
Yes, sysp -s xstuff segfaults. Compiling STABLE hwinfo, stay tuned.
Comment 27 Matthias Hopf 2008-03-06 12:03:10 UTC
sysp segfaults even with the hwinfo that has been submitted to stable.

To be verified on gkar.

rpm -q --changelog hwinfo:

* Thu Mar 06 2008 snwint@suse.de
- fix compilation on x86_64

* Thu Mar 06 2008 snwint@suse.de
- try a bit harder to find matching card for an interface (bnc #356405)
- fix segfault in new mouse code (bnc #367457)
Comment 28 Matthias Hopf 2008-03-06 14:17:47 UTC
sigh. sysp only segfaults if I sudo it - Stefan doesn't have this issue, so
sysp is apparently highly environment dependent.

Running after logging in as root does work. Oh well.
Comment 29 Marcus Schaefer 2008-03-06 14:25:17 UTC
that's what I have found too. installing debuginfo package now
Comment 30 Marcus Schaefer 2008-03-06 14:30:03 UTC
Hmm, I have installed latest sax2 from stable and the problem is gone

   sudo /usr/sbin/sysp -s xstuff

works now... don't ask me why ??
Comment 31 Matthias Hopf 2008-03-06 14:44:30 UTC
Ok, the multimonitor configuration is completely broken - SaX notices this himself with the following error report:

SaX library: Success
X configuration: Parse error on line 180 of section Monitor in the file /var/lib/sax/xorg.conf: This section must have an identifier line.


Section "Monitor"
  DisplaySize  380 290
  HorizSync    27-110
  Identifier   "Monitor[0]"
  ModelName    "VISION MASTER PRO 450"
  Option       "DPMS"
  VendorName   "IIYAMA"
  VertRefresh  50-150
  UseModes     "Modes[0]"
EndSection

Section "Modes"
  Identifier   "Modes[0]"
[...]
EndSection

[...]
Section "Device"
  BoardName    "Radeon X1550 64-bit"
  BusID        "1:0:0"
  Driver       "radeonhd"
  Identifier   "Device[0]"
  Option       "SaXDualHead"
  Option       "SaXExternal" "VertRefresh&50-60"
  VendorName   "ATI"
EndSection

Section "Monitor"
  VertRefresh  50-60
EndSection
Comment 32 Matthias Hopf 2008-03-06 15:15:25 UTC
sysp issue is now known and (almost :) fixed.
Comment 33 Matthias Hopf 2008-03-06 15:25:53 UTC
(In reply to comment #31 from Matthias Hopf)
> Ok, the multimonitor configuration is completely broken - SaX notices this
> himself with the following error report:

Exactly the same issue on intel.
Comment 34 Marcus Schaefer 2008-03-06 15:32:50 UTC
could you bring gkar only again ?
thanks
Comment 35 Marcus Schaefer 2008-03-06 17:09:58 UTC
* the sudo / sysp problem is fixed. wrong usage of sprintf
* the sax2 -a -b MergedFB problem if no DDC[2] information is available
  is also fixed. Profile.pm wrong ddc check

remaining problems:

* remote GUI tests are a pita
* I need gkar in a state where randr provides more than one channel as
  connected to test if dualhead setup in principal works

Matthias can you check that ?

Thanks
Comment 36 Matthias Hopf 2008-03-06 18:23:08 UTC
Marcus, the machine is now booted with the radeon card. radeonhd driver is installed and working. I also attached my 2nd DFP to the DVI-I port (via analog).

Interestingly, hwinfo --monitor only detects this second monitor now. So everything should be set up now.

I handcrafted a xorg.conf.2monitors, which shows that the EDID data of both monitors can be retrieved by the Xserver. This can also be used as a reference configuration.

I let an Xserver run on :0, so DPMS can actually kick in. I don't know whether this works correctly with the console...
Comment 37 Marcus Schaefer 2008-03-07 11:29:45 UTC
ok according to our telephone call the non-gui parts works again.
I have added the PreferredMode setup for the standard Monitor section
and will submit a package now.

I'm 100% sure there are still problems with the GUI
Matthias I hand over this one to you again for inspection of the GUI
problems as soon as sax has built

thanks
Comment 38 Matthias Hopf 2008-03-07 12:01:44 UTC
Thanks, Marcus, just drop me a mail when the build is finished :)
Comment 39 Matthias Hopf 2008-03-07 14:49:40 UTC
Ok, testing:

1) sysp - s xstuff still segfaults if run in a NFS directory (root=nobody).
2) sax2 -r -b MergedFB works fine, and creates a nice configuration file.
3) sax2 GUI just loading the created config and saving again creates a broken
   config like in comment #31.
4) sax2 -r GUI with just saving (single head) seems to work fine. PreferredMode
   is apparently set correctly as well.
5) sax2 -r GUI with just activating dual head fails like in comment #31.

So clearly the GUI needs some love, so does sysp :-]
Comment 40 Marcus Schaefer 2008-03-07 17:04:40 UTC
1) updated hwinfo source, local source doesn't had the bios fix in it
3) I found several bugs due to this great qt3to4 program and fixed them
   You can be sure there will be other GUI problems which we still did
   not found yet :(

submitted a sax2 package to stable and BS. Would you mind to test it again ?

Thanks

Comment 41 Stefan Dirsch 2008-03-07 17:15:42 UTC
Unfortunately Matthias already called it a day. So testing needs to wait until monday. :-(
Comment 42 Matthias Hopf 2008-03-12 17:42:22 UTC
Looks good :)

Apparently, everything works now.

The sax information windows still stick in the upper left corner, and some texts there aren't wrapped around, but the configuration works fine.

For me this is fixed :)
Comment 43 Marcus Schaefer 2008-03-12 17:57:46 UTC
*puh* good news. Thanks for testing.

the info window problem and the problem that no message text gets wrapped
correctly anymore is a bug due to the qt4 port. There is already a bug
open but Tom Patzig seems not to work anymore on this issue
will ask Kulow how to proceed
Comment 44 Marcus Schaefer 2008-04-25 14:12:35 UTC
*** Bug 382592 has been marked as a duplicate of this bug. ***