LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Xorg.conf file works on one monitor but not on another (https://www.linuxquestions.org/questions/debian-26/xorg-conf-file-works-on-one-monitor-but-not-on-another-627931/)

kushalkoolwal 03-13-2008 10:48 PM

Xorg.conf file works on one monitor but not on another
 
Hello,

I have a strange problem at least I think.
My Specs:
Code:

Debian Etch Kernel 2.6.24
GNOME/GDM
Xorg 7.1.1

I am using "via" Xorg driver for my "VIA CX700M2 UniChrome PRO II Graphics" chipset. I downloaded the driver from VIA's website, compiled it and installed it.

X works fine on my current Monitor "Acer AL1516". But if I shutdown my system and change my monitor to a "Viewsonic VG510b" and boot, my X system just crashes. Also if don't shutdown my system and just switch the monitor from Acer to Viewsonic, it still works fine.

Here is my current xorg.conf file:
Code:

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#  sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
        FontPath        "/usr/share/fonts/X11/misc"
        FontPath        "/usr/X11R6/lib/X11/fonts/misc"
        FontPath        "/usr/share/fonts/X11/cyrillic"
        FontPath        "/usr/X11R6/lib/X11/fonts/cyrillic"
        FontPath        "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath        "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
        FontPath        "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath        "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
        FontPath        "/usr/share/fonts/X11/Type1"
        FontPath        "/usr/X11R6/lib/X11/fonts/Type1"
        FontPath        "/usr/share/fonts/X11/100dpi"
        FontPath        "/usr/X11R6/lib/X11/fonts/100dpi"
        FontPath        "/usr/share/fonts/X11/75dpi"
        FontPath        "/usr/X11R6/lib/X11/fonts/75dpi"
        # path to defoma fonts
        FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
        Load  "glx"
        Load  "dri"
        Load        "bitmap"
        Load        "ddc"
        Load        "extmod"
        Load        "freetype"
        Load        "int10"
        Load        "vbe"
EndSection

Section "InputDevice"
        Identifier        "Generic Keyboard"
        Driver                "kbd"
        Option                "CoreKeyboard"
        Option                "XkbRules"        "xorg"
        Option                "XkbModel"        "pc104"
        Option                "XkbLayout"        "us"
EndSection

Section "InputDevice"
        Identifier        "Configured Mouse"
        Driver                "mouse"
        Option                "CorePointer"
        Option                "Device"                "/dev/input/mice"
        Option                "Protocol"                "ImPS/2"
        Option                "Emulate3Buttons"        "true"
EndSection

Section "Device"
        Driver "via"
        VendorName  "VIA Tech"
        BoardName  "via"
        Identifier        "Generic Video Card"
        BusID                "PCI:1:0:0"
        Option                "UseFBDev"                "true"
EndSection

Section "Monitor"
        ModeLine "720x480" 26.7 720 736 808 896 480 481 484 497
        ModeLine "720x576" 32.7 720 744 816 912 576 577 580 597
        ModeLine "800x480" 29.58 800 816 896 992 480 481 484 497
        ModeLine "848x480" 31.5 848 864 952 1056 480 481 484 497
        ModeLine "856x480" 31.7 856 872 960 1064 480 481 484 497
        ModeLine "960x600" 45.98 960 1000 1096 1232 600 601 604 622 -HSync +Vsync
        ModeLine "1000x600" 48.07 1000 1040 1144 1288 600 601 604 622 -HSync +Vsync
        ModeLine "1024x512" 41.3 1024 1056 1160 1296 512 513 516 531
        ModeLine "1088x612" 52.95 1088 1128 1240 1392 612 613 616 634 -HSync +Vsync
        ModeLine "1152x720" 67.32 1152 1208 1328 1504 720 721 724 746 -HSync +Vsync
        ModeLine "1200x720" 70.18 1200 1256 1384 1568 720 721 724 746 -HSync +Vsync
        ModeLine "1280x600" 61.50 1280 1336 1464 1648 600 601 604 622 -HSync +Vsync
        ModeLine "1280x720" 74.6 1280 1341 1474 1688 720 721 724 746
        ModeLine "1280x768" 80.1 1280 1344 1480 1680 768 769 772 795
        ModeLine "1360x768" 85.50 1360 1392 1712 1744 768 783 791 807 +HSync +Vsync
        ModeLine "1366x768" 85.86 1366 1440 1584 1800 768 769 772 795 -HSync +Vsync
        ModeLine "1368x768" 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync
        ModeLine "1440x900" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync
        ModeLine "1440x1050" 126.2 1440 1536 1688 1936 1050 1051 1054 1087
        ModeLine "1600x900" 119.00 1600 1696 1864 2128 900 901 904 932 -HSync +Vsync
        ModeLine "1600x1024" 136.36 1600 1704 1872 2144 1024 1025 1028 1060 -HSync +Vsync
        ModeLine "1792x1344" 202.97 1792 1920 2112 2432 1344 1345 1348 1391 -HSync +Vsync
        ModeLine "1856x1392" 218.57 1856 1992 2192 2528 1392 1393 1396 1441 -HSync +Vsync
        ModeLine "1920x1080" 172.9 1920 2043 2249 2578 1080 1081 1084 1118
        ModeLine "2048x1536" 266.95 2048 2200 2424 2800 1536 1537 1540 1589 -HSync +Vsync
        ModeLine "720x480" 34.9 720 752 824 928 480 481 484 502
        ModeLine "720x576" 42.6 720 760 832 944 576 577 580 602
        ModeLine "848x480" 41.0 848 880 968 1088 480 481 484 502
        ModeLine "856x480" 41.3 856 888 976 1096 480 481 484 502
        ModeLine "1024x512" 53.3 1024 1072 1176 1328 512 513 516 535
        ModeLine "1280x768" 103.0 1280 1360 1496 1712 768 769 772 802
        ModeLine "1440x1050" 160.0 1440 1536 1696 1952 1050 1051 1054 1096
        ModeLine "1280x768" 118.5 1280 1368 1504 1728 768 769 772 807
        ModeLine "1440x1050" 184.5 1440 1544 1704 1968 1050 1051 1054 1103
        ModeLine "848x480" 47.4 848 888 976 1104 480 481 484 505
        Identifier        "Acer AL1516"
        Option                "DPMS"
        HorizSync        28-50
        VertRefresh        43-75
 
      ModeLine "800x480" 29.6 800 816 896 992 480 481 484 497
      ModeLine "1280x768" 87.04 1280 1376 1488 1800 768 771 777 806
      ModeLine "1280x800" 68.9 1280 1344 1368 1408 800 803 806 816
      Modeline "1400x1050" 122.61 1400 1488 1640 1880 1050 1051 1054 1087
      ModeLine "1920x1440" 234.0 1920 2060 2269 2618 1440 1441 1444 1490

EndSection

Section "Screen"
        Identifier        "Default Screen"
        Device                "Generic Video Card"
        Monitor                "Acer AL1516"
        DefaultDepth        24
        SubSection "Display"
                Modes  "1024x768"       
                Depth                1
        EndSubSection
        SubSection "Display"
                Modes  "1024x768"       
                Depth                4
        EndSubSection
        SubSection "Display"
                Modes  "1024x768"       
                Depth                8
        EndSubSection
        SubSection "Display"
                Modes  "1024x768"       
                Depth                15
        EndSubSection
        SubSection "Display"
                Modes  "1024x768"       
                Depth                16
        EndSubSection
        SubSection "Display"
                Modes  "1024x768"       
                Depth                24
        EndSubSection
EndSection

Section "ServerLayout"

        Identifier        "Default Layout"
        Screen                "Default Screen"
        InputDevice        "Generic Keyboard"
        InputDevice        "Configured Mouse"
EndSection

Section "DRI"
        Mode 0666
EndSection

And here is my XOrg's log file when it crashes on the Viewsonic monitor.

The lines in the Xorg log file that bothers me are:
Code:

VIASetModeUseBIOSTable: Cannot find suitable mode!!
Mode setting in XF86Config(-4) is not supported!!

Fatal server error:
AddScreen/ScreenInit failed for driver 0


Backtrace:
0: /usr/bin/X(xf86SigHandler+0x84) [0x80c43e4]
1: [0xffffe420]
2: /usr/bin/X(AbortDDX+0xa8) [0x809f5d8]
3: /usr/bin/X(AbortServer+0x23) [0x81a2743]
4: /usr/bin/X(FatalError+0x67) [0x81a2c57]
5: /usr/bin/X(InitOutput+0x8a0) [0x80a0450]
6: /usr/bin/X(main+0x276) [0x806e4a6]
7: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xc8) [0xb7dd8ea8]
8: /usr/bin/X(FontFileCompleteXLFD+0xa5) [0x806d9f1]

FatalError re-entered, aborting
Caught signal 11.  Server aborting

Also, if I use the generic "vesa" driver this problem does not happen. It works fine on both the monitors.

Would really appreciate if somebody can help me in figuring out what's going on.

johnsfine 03-14-2008 07:05 AM

Are you trying to get an xorg.conf that will work with whichever of the two monitors you choose at boot time? Or are you trying to just make it work at boot time with the new monitor?

What resolution do you want to use with the new monitor?

Your xorg.conf is strange because:
Code:

        HorizSync        28-50
50 is a low maximum for HorizSync. That will generally limit you to 768 scan lines, yet you have a lot of modelines in your monitor section many of which have more than 768 scan lines.

Your Screen section limits you to mode 1024x768, but in the big list in your monitor section there is no modeline for 1024x768, so when X starts it needs to find a 1024x768 modeline somewhere that is compatible with that low HorizSync value. I think that is the key to your reported symptom. One place X can get a modeline is from the firmware of the monitor itself. Your old monitor probably provides a 1024x768 modeline that is compatible with your HorizSync value.

Your new monitor works with that modeline (I assume not as well as it would work with a better modeline) but your new monitor may not offer a 1024x768 mode at all and if it does it wouldn't offer one compatible with your low HorizSync value.

If you just want the new monitor to work, change the HorizSync and VertRefresh ranges to be correct for the new monitor, and probably add a modeline for the mode you want to use for the new monitor and if that isn't 1024x768 edit the screen section to reference that mode.

If you want either monitor to work from boot at the slow 1024x768 it is probably getting from the old monitor's firmware, use videogen or similar tool to construct that modeline and put it in your monitor section.

If you want either monitor to work from boot with a mode appropriate to that monitor, sorry I don't know how. I'm sure it can be done, but I'd need to try several different things to see what does what to find out how.

kushalkoolwal 03-14-2008 12:27 PM

Thanks for all your help! Really appreciate it. My answers are below

Quote:

Originally Posted by johnsfine (Post 3088448)
Are you trying to get an xorg.conf that will work with whichever of the two monitors you choose at boot time? Or are you trying to just make it work at boot time with the new monitor?

Both the monitors. Ideally I would like it to use on any kind of monitors in general just the way a live CD works.

Quote:

Originally Posted by johnsfine (Post 3088448)
What resolution do you want to use with the new monitor?

At least 1024x768


Quote:

Originally Posted by johnsfine (Post 3088448)
Your xorg.conf is strange because:
Code:

        HorizSync        28-50
If you just want the new monitor to work, change the HorizSync and VertRefresh ranges to be correct for the new monitor, and probably add a modeline for the mode you want to use for the new monitor and if that isn't 1024x768 edit the screen section to reference that mode.

How do I generate the modeline?

Quote:

Originally Posted by johnsfine (Post 3088448)
If you want either monitor to work from boot at the slow 1024x768 it is probably getting from the old monitor's firmware, use videogen or similar tool to construct that modeline and put it in your monitor section.

Yes, this will also work. Also as I mentioned before, I would like to work on all standard monitors.

johnsfine 03-14-2008 01:46 PM

The liveCD includes some program to look at your hardware and compute an entirely new xorg.conf each time you boot. I don't know what program that is, but I expect you could find one and make it part of your standard init script.

You probably don't want to go that far. You're not changing your display adapter on reboot, just your monitor.

I'm sure you can get it to reconfigure based on the attached monitor each time you reboot, while keeping the info about the display adapter. One disadvantage of doing it that way is it won't configure well if you turn the computer on with the monitor off.

I don't know everything you need to do to automatically reconfigure based on the attached monitor when X starts. One thing you need (maybe the only thing) is to remove the HorizSync line from the Monitor section so the display driver will attempt to get that information from the monitor.

kushalkoolwal 03-14-2008 01:52 PM

Quote:

Originally Posted by johnsfine (Post 3088785)
The liveCD includes some program to look at your hardware and compute an entirely new xorg.conf each time you boot. I don't know what program that is, but I expect you could find one and make it part of your standard init script.

You probably don't want to go that far. You're not changing your display adapter on reboot, just your monitor.

I'm sure you can get it to reconfigure based on the attached monitor each time you reboot, while keeping the info about the display adapter. One disadvantage of doing it that way is it won't configure well if you turn the computer on with the monitor off.

I don't know everything you need to do to automatically reconfigure based on the attached monitor when X starts. One thing you need (maybe the only thing) is to remove the HorizSync line from the Monitor section so the display driver will attempt to get that information from the monitor.

Ok thanks. I think I will try to remove the HorzSync line and see what happens.

As far as like live CD implementation, I have done that several times on different chipsets and the default Xorg.conf file just works fine. I had never to re-create Xorg.conf file except for this particular chipset which is giving me problems.

kushalkoolwal 03-14-2008 03:36 PM

Quote:

Originally Posted by kushalkoolwal (Post 3088789)
Ok thanks. I think I will try to remove the HorzSync line and see what happens.

As far as like live CD implementation, I have done that several times on different chipsets and the default Xorg.conf file just works fine. I had never to re-create Xorg.conf file except for this particular chipset which is giving me problems.

Removing HorzSync did not work.

Also I noticed these lines in my log files:
Code:

(II) VIA(0): Supported additional Video Mode:
(II) VIA(0): clock: 65.0 MHz  Image Size:  304 x 228 mm
(II) VIA(0): h_active: 1024  h_sync: 1048  h_sync_end 1184 h_
(II) VIA(0): v_active: 768  v_sync: 771  v_sync_end 777 v_bla
(II) VIA(0): Serial No: 91Y044450533
(II) VIA(0): Ranges: V min: 50  V max: 75 Hz, H min: 30  H ma
(II) VIA(0): Monitor name: VG510b
(--) VIA(0): Max Monitor H =  0
(--) VIA(0): Max Monitor V =  0

It seems that my "View Sonic VG510b" monitor is not getting H and V rates.

Any ideas?


All times are GMT -5. The time now is 09:44 AM.