Bug 402581

Summary: yast2-x11: value for PreferredMode option not adjusted
Product: [openSUSE] openSUSE 11.0 Reporter: Albert Astals Cid <aacid>
Component: YaST2Assignee: J. Daniel Schmidt <jdsn>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: jdsn, ms, sndirsch
Version: Final   
Target Milestone: ---   
Hardware: i586   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: hwinfo --gfx
hwinfo --monitor

Description Albert Astals Cid 2008-06-22 18:04:11 UTC
Installing OpenSuse 11.0 in my laptop detected the screen as 800x600 10", i clicked on 800x600 and choose 1024x768 and clicked on 10" and clicked on 15"

After doing that, i continued installation.

When having X on screen i was only seeing a part of the X window.

Manually removing 

Option "PreferredMode" "800x600"

from the "Monitor" Section on xorg.conf solved the problem, but a non knowledgeable normal user would have just uninstalled OpenSuse and installed something else.
Comment 1 Albert Astals Cid 2008-06-22 18:26:29 UTC
Created attachment 223613 [details]
hwinfo --gfx
Comment 2 Albert Astals Cid 2008-06-22 18:26:58 UTC
Created attachment 223614 [details]
hwinfo --monitor
Comment 3 Stefan Dirsch 2008-06-23 01:00:25 UTC
Can you reproduce this issue also by running 'sax2 -r' or does this occur only during installation?
Comment 4 Albert Astals Cid 2008-06-23 09:31:09 UTC
sax2 -r misdetects the monitor and resolution, but changing the monitor to 1024x768 makes it work correctly.
Comment 5 Stefan Dirsch 2008-06-23 09:42:32 UTC
Ok. So it only happens during installation, but not when running sax2 afterwards. 
Comment 6 J. Daniel Schmidt 2008-06-23 17:08:20 UTC
(In reply to comment #5 from Stefan Dirsch)
> Ok. So it only happens during installation, but not when running sax2
> afterwards. 

No, it always happens, Stefan. 

In comment #4 Albert says sax2 -r misdetects the monitor. So it is a hardware issue, if the display returns wrong data on its own resolution.
In yast2-x11 the PreferredMode setting is not handled at all; this setting is computed automatically in sax2.



Marcus: in  modules/detect/Resolution.pm:193  this setting is computed. Here is the place for an exception _if_ it should be handled with a configuration tool.

But as it is an Intel 855 chip I'd rather suggest to use 855resolution to correct the settings in the bios, just as it is done with various Laptops so far (I know that you added an exception for the Samsung X20 series laptops).
Could you please take over - you are the sax expert.

Lowering to "major", as this is definitely no "blocker".
Comment 7 Marcus Schaefer 2008-06-23 21:23:56 UTC
I'm sorry I don't understand. I was told it is important that sax2 set
the PreferredMode to the first item of the resolution list. This is done
during detection phase in modules/detect/Resolution.pm:193 and in the GUI
api/monitor.cpp:1186

so maybe the code in monitor.cpp hasn't worked ? but for me it works
Comment 8 Stefan Dirsch 2008-06-24 07:10:51 UTC
>I'm sorry I don't understand. I was told it is important that sax2 set
>the PreferredMode to the first item of the resolution list.

... which is absolutely correct. The issue here is that PreferredMode value is not adjusted to the new settings. I understood, that this only happens during
installation and not with SaX2 (see comment #4). Therefore I reassigned it to Jens Daniel.

Comment 9 Marcus Schaefer 2008-06-24 11:03:37 UTC
sax2 sets the value at initial detection and adapts it via the GUI.
I have tested it and it worked. During my tests I found several other
severe problems which makes me really think nobody has tested sax2 ;)
I have created patches for all problems I found but the Preferred
mode setup worked

I'm pretty sure if the yast2-x11 module hasn't been adapted it will
not set the PreferredMode along with a possible change of the resolution
so this definitly should be addressed in the ycp/perl code in yast

reassigned to maintainer
Comment 12 Marcus Schaefer 2008-06-24 16:44:44 UTC
why do we post comments privately now ??

* the not detected monitor has nothing to do with the PreferredMode
  setup. The monitor information is obtained from hwinfo (DDC probing)
  if there is no data the default framebuffer console settings are used
  (most often 800x600)

* I'm sorry for not informing you earlier about this PreferredMode
  change but the x11 setup during installation is a unique code which
  uses libsax but has its own workflow so changes in the sax2 GUI
  are not directly related to yast2. As long as I maintained the code
  I've tested the sax2 GUI and the yast2 x11 setup separately and this
  bug turns out that nobody from Alpha to RC has changed the resolution
  during the installation process which would have disclose this bug

in the sax2 GUI I adapt the preferred mode to the first resolution
selected when the configuration is about to be saved:

    if (saxCard.getCardDriver() != "fbdev") {
        saxDesktop.setColorDepth ( display->getColorDepth() );
        saxDesktop.setPreferredMode (
             display->getResolution().at(0)
        );
    }

you can do exactly the same thing in yast2-x11 in the perl code with
the libsax perl binding when saving the configuration
Comment 14 Stefan Dirsch 2008-09-03 19:32:15 UTC
Jens-Daniel, this is another important issue. Any chance to give it more priority? Thanks.
Comment 15 J. Daniel Schmidt 2008-11-07 02:07:00 UTC
Fixed with yast2-x11 2.17.8