0

For years, I used my old laptop with SIS 771/671 graphical card, having a ugly video configuration, that stretched the image over the external monitor. This issue makes me made this question searching for a distro that could provide a way to correctly configure the video card.

However, now, after 3 years with this incorrect video configuration, my laptop just started to boot in, sometimes, with the correct video configuration, sometimes no. Why? How? Can I determine what is those "automatic" changes that make my graphical card get the correct configuration?

I'm using Debian 8.


the output of xrandr --verbose when boots with incorrect video config:

xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 1024 x 768, maximum 1024 x 768
default connected 1024x768+0+0 (0x148) normal (normal) 0mm x 0mm
    Identifier: 0x147
    Timestamp:  24735
    Subpixel:   no subpixels
    Clones:    
    CRTC:       0
    CRTCs:      0
    Transform:  1.000000 0.000000 0.000000
                0.000000 1.000000 0.000000
                0.000000 0.000000 1.000000
               filter: 
  1024x768 (0x148)  0.000MHz *current
        h: width  1024 start    0 end    0 total 1024 skew    0 clock   0.00KHz
        v: height  768 start    0 end    0 total  768           clock   0.00Hz
  800x600 (0x149)  0.000MHz
        h: width   800 start    0 end    0 total  800 skew    0 clock   0.00KHz
        v: height  600 start    0 end    0 total  600           clock   0.00Hz
  640x480 (0x14a)  0.000MHz
        h: width   640 start    0 end    0 total  640 skew    0 clock   0.00KHz
        v: height  480 start    0 end    0 total  480           clock   0.00Hz
  1280x768 (0x155) 79.500MHz
        h: width  1280 start 1344 end 1472 total 1664 skew    0 clock  47.78KHz
        v: height  768 start  771 end  781 total  798           clock  59.87Hz
  1280p (0x160) 79.500MHz
        h: width  1280 start 1344 end 1472 total 1664 skew    0 clock  47.78KHz
        v: height  768 start  771 end  781 total  798           clock  59.87Hz

the output of xrandr --verbose when boots with correct video config:

xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 1280 x 768, maximum 1280 x 768
default connected 1280x768+0+0 (0x14a) normal (normal) 0mm x 0mm
    Identifier: 0x149
    Timestamp:  29118
    Subpixel:   unknown
    Clones:    
    CRTC:       0
    CRTCs:      0
    Transform:  1.000000 0.000000 0.000000
                0.000000 1.000000 0.000000
                0.000000 0.000000 1.000000
               filter: 
  1280x768 (0x14a) 59.965MHz *current
        h: width  1280 start    0 end    0 total 1280 skew    0 clock  46.85KHz
        v: height  768 start    0 end    0 total  768           clock  61.00Hz
  1024x768 (0x14b) 47.972MHz
        h: width  1024 start    0 end    0 total 1024 skew    0 clock  46.85KHz
        v: height  768 start    0 end    0 total  768           clock  61.00Hz
  800x600 (0x14c) 29.280MHz
        h: width   800 start    0 end    0 total  800 skew    0 clock  36.60KHz
        v: height  600 start    0 end    0 total  600           clock  61.00Hz
  640x480 (0x14d) 18.432MHz
        h: width   640 start    0 end    0 total  640 skew    0 clock  28.80KHz
        v: height  480 start    0 end    0 total  480           clock  60.00Hz

If I try to add a new modeline, with the same parameters that my laptop booted in yesterday (the correct one for my external monitor), that is:

xrandr --newmode "1280x768"   79.50  1280 1344 1472 1664  768 771 781 798 -Hsync +Vsync

the output that comes out is:

xrandr: Failed to get size of gamma for output default
X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  16 (RRCreateMode)
  Serial number of failed request:  19
  Current serial number in output stream:  19

when I select whatever mode with resolution of 1280x768, I get an error message:

xrandr: cannot find mode 1280x768
xrandr: cannot find mode 1280p

with the another pre-existent modes xrandr just works fine.


If I try to add a pre-existent mode, under another name, with the following command:

xrandr --newmode "1024t" 63.50  1024 1072 1176 1328  768 771 775 798 -Hsync +Vsync

I get the following error message:

xrandr: Failed to get size of gamma for output default

The content of Xorg.0.log, when booted with incorrect video config, is this.


The content of Xorg.0.log, when booted with correct video config, is this.

Last update: workaround solution. I found out that, booting the computer with the external monitor off, and then powering it on after the GUI initialization, makes system get the correct video configuration.

  • xrandr should give you the current modeline. If you get different monitor images with the same modeline, then either the driver doesn't set all registers (possible for SIS), or the monitor syncs differently (happened to me quite often). Slightly changing the modeline can help the monitor to settle on the "correct" variant. This has little to do with the distro. – dirkt Jul 17 '17 at 12:00
  • @dirkt, xrandr give it, but cannot adjust the screen modeline. The last time my computer boot in with the correct resolution, I installed ARandR, and saved a script to recover that correct config... but now, booted with the incorrect config, the ARandR script does not work, add the correct modeline with xrand just does not work... – Leandros López Jul 17 '17 at 13:26
  • Please edit question with output of xrandr --verbose, and what happens if you try to add a modeline with xrandr --newmode. – dirkt Jul 17 '17 at 13:48
  • Zero start and end for the syncs in 1024x768 look very wrong... no wonder that mode doesn't work properly. There already is a 1280x768 mode, so try to use a different name. What happens when you select the existing 1280x768, i.e. xrandr --mode 1280x768? What happens if you add a proper 1024x768 mode (again, under a different name)? – dirkt Jul 17 '17 at 19:21
  • @dirkt, question updated with requested info. – Leandros López Jul 17 '17 at 21:43
1

As you can see from the log, you are using the VESA driver, and not the SIS driver. Actually, I'm not sure about the current status of the SIS driver: I vaguely remember support for some drivers was dropped, because nobody maintained them, and the SIS driver may have been among them.

Anyway, the VESA driver uses BIOS calls to set modes, limited to the pre-defined VESA modes. That explains why you have zeroes in the sync timing fields - these values don't matter, as the driver doesn't use them. It also explains why you can't get it to use a modeline that doesn't conform to a VESA mode: The xrandr interface for adding modelines etc. still works, but they won't get used.

The log shows you only have three valid modes, out of the 14 your monitor EDID gives you:

[    27.440] (**) VESA(0):  Built-in mode "1024x768"
[    27.440] (**) VESA(0):  Built-in mode "800x600"
[    27.440] (**) VESA(0):  Built-in mode "640x480"

So with the VESA driver, you can only choose among those three, and you can't adjust sync timing.

As for why the monitor sometimes "stretches" the image, and sometimes syncs corectly, it's still the same guess: Either the BIOS doesn't set all required registers, or the sync timing of the VESA 1024x768 mode is ambigous enough for the monitor to sometimes sync this way, and sometimes that way.

Options: Try to make the SIS driver work. For that, if the driver is really deprecated, you may have to start looking at the code of the driver, and bring it up to date. Or find someone else to do it.

Other options: None I can think of.

Edit

The difference seems to be that in the "correct" case, EDID read from the montitor fails, while in the "incorrect" case, EDID read succeeds. In the former case, the driver probably consults an internal "standard" table, and comes up with an additional mode, which seems to work for you.

You can override the EDID information for other drivers, but AFAIK not for the VESA driver.

Options:

  • Do it properly and get the SIS driver working, see above.

  • Modify the VESA driver to override EDID, as for other drivers (requires good C programming skills).

  • Stopgap solution: Solder a custom VGA plug that does not connect the two DDC pins in the VGA connector, forcing all EDID reads to fail (requires soldering skills).

** Edit **

Workaround solution, as described by Leandros López: Boot the computer with the external monitor off. This will also cause EDID reads to fail, and the available modes will be the fallback modes. Turn it on after the X server has initialized.

  • Today I got to boot with the correct video config again: the Xorg.0.log content is very different, also the xrandr --verbose content. You may be interested to see it. I've update the question with those new info. – Leandros López Aug 4 '17 at 9:58
  • I found a workaround solution: booting the computer with the external monitor off, and so turning it on after the system initializes the GUI. Since you've tried hard to solve this question and you gived a good (but not decisive) answer - the lasts updates of the question could help you improve you answer, so I can chose it to close the question - if you want. – Leandros López Aug 30 '17 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.