Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
X GUI

Configuring Monitors in X 408

Another Anonymous Coward submitted this question: " Everyone that I know, myself included, has had some trouble getting X11 configured under Linux. If your monitor doesn't happen to "work with X" right off the bat, it seems that you're out of luck. Why is it that I can plug my generic 17" monitor into any old Windows box and get 1024x768, but it won't work at ALL with my Linux box yet I can plug in my Sony Trinitron 15" and it works just fine? We're using the latest version of X, of course. Even Windows 3.1 didn't have the sort of monitor problems that plague X. I see this as being one of the biggest installation headaches for beginners *and* advanced users of the Linux OS." Ah yes: Modelines. I know there are programs that help with this. Which ones do you all suggest?

Actually, I could have sworn we had done an Ask Slashdot on this, but as time passes improvements are made, so I don't mind doing another article on the subject. Just via a quick search on the web, I've found:

  • Modeline
  • and kvideogen (I'd bet there is a Gnome version of this as well)
  • This page that has a simple, web based, Modeline calculator.

So if anyone has tried the above resources, we'd be interested in hearing your thoughts on how they work. If you know of other Modeline resources, please post links. I don't see why X11 has to have the reputation as "difficult to configure" when the tools to do such are out there.

Just a thought: Would including Modeline functionality in configurators like Linuxconf be a good idea?

This discussion has been archived. No new comments can be posted.

Configuring Monitors in X

Comments Filter:
  • by Anonymous Coward
    Red Hat includes a text-mode tool called Xconfigurator, which walks you through several steps to create an X config file. It automatically probes for your video card, and lets you choose from a long list of monitors. You can choose what video modes and color depths you want (or let it probe for those too), and it writes an XF86Config file. If you don't have the program, you can download it as an i386 RPM [redhat.com] or source RPM [redhat.com].
  • by specht ( 13174 ) on Sunday December 19, 1999 @03:38AM (#1462343) Homepage

    I've done more than my share of pencil and paper work in order to configure X11 (even before the days of XFree86). What still puzzles me is that for Windows you get some .inf files with your monitor that contains everything there is to know about it (at least I assume that's what these files are for, I acutally never opened one).

    Would it be possible to just use these .inf files and extract just the information XFree86 needs to configure the monitor?

  • There is no good reason whatsoever to require users to configure X modelines. Standing alone, this is the single biggest reason (well, aside from performance) to shell out some money for AccelleratedX from XInside [xinside.com].

    I'm sure someone will tell me now how understanding how modelines work is good for the soul, kind of like self-flagellation, and I should spend 3 or 4 hours doing that, instead of my job. Let me issue a preemptive "bite me" to anyone inclined to recommend that.

  • Corel Linux's installer seems to probe your monitor the same way that Windows does. I was quite impressed when I was beta testing it and went to /etc/devices, the exact modelines for my monitor were right there, one for each of it's four favorite modes. Too bad I didn't save that when I switched back, I could have this baby running at 85Hz!
  • I remember trying Corel Linux 2.2 with its support for "over 1700 monitors" and finding that mine wasn't one of them - and ending up hand-setting everything. Now I have a different monitor and Corel has a new/improved installer, so I suppose it's time to try again. We'll see...

    - Robin

  • Wow! I had no idea that so many people have problems getting X to work. I always thought that I would have more trouble than most with my new and unsupported video card! I use an ATl All-inWonder 128 thingy, and I can get 1280x1024 using xf86config (and I did it wilest being a newbie)! I guess that I'm lucky to have a Trinitron... I'm not trying to brag, but... I didn't know that getting X to work was so hard!
  • Is the code that does this GPL'd? If so, somebody should incorporate this into the existing X configuration tools so that newbies won't get turned off by the complexity (and headache) of configuring X. (I know what it's like... I'm using a barely-supported chipset SiS 6326. I've suffered with using X at 800*600 since XF3.3.3. Apparently XF3.3.5 supports it but on 3.3.5 I still can't get XAA to work *at all*, can only use BitBlt but with no ImageBlt.)

  • Corel Linux's installer seems to probe your monitor the same way that Windows does.


    RedHat 6.1 does the same thing. As long as you have a monitor that knows how to answer that request, you are fine. But often you will want to use another resolution than the standard ones, then you are stuck with modelines again.


    My favorite:
    Modeline "1368x1024" 150 1368 1400 1516 1712 1024 1027 1030 1064
  • Excellent idea, I was just going to suggest it myself. :-) The .INF files don't contain enough information for full modelines, but at least they can be used to determine a monitor's HF/VF ranges and suggested maximum resolutions. Indeed, it would be easy to build a database of existing (old) monitors and distribute it with XFree86. Then again, projects such as SaX (SuSE's X configurator) have a better monitor database than Windows already (SuSE 6.3's SaX monitor database is 2234 lines long, one monitor per line).
  • Could you have Corel Linux confused with Caldera OpenLinux 2.2? Corel just went 1.0 and doesn't brag about supported monitors.

    One thing I must add about Corel Linux, while personally I think it's too sugar coated (born Slack, die Slack), it's a great distribution for beginners, very easy to install.
  • I don't know if Corel's code is GPL'd or not, but I know that the Xconfigurator code under RedHat is GPL'd and that code ROCKS... if you have one of the known monitors.

    Personally, I think the issue is driver code that every monitor manufacturer gives out on floppy disks that plug right into a window system. I think the idea that a previous poster had of trying to gather the appropriate info from those driver disks is a great idea.
  • What I find most interresting, is that XFree86 3.9.x dosen't need modelines, thow you can have them. I had to create some modelines to get my 21 inch monitor to work, without them, it tried to use a slightly higher resolution than the configuration file told it to, and it looked all weird, but i finaly got it to work, after lots of battaling with it.
  • too bad red hat blows

    There are two things that come with Red Hat, that are GPL'd, that I wish other distros would use: Xconfiguration and sndconfig. Those two programs are completely awesome!

  • by Anonymous Coward
    That's Caldera 2.2, I imagine.. This guy's talking about Corel, the Canadian company whose stock is more than 10x higher than it was earlier this year because of the word "linux" being associated with it.

    Slackware 7 comes with VESA FBDev installed and setup correctly out of the box. If you're willing to take a small performance hit in X, this allows you to use pretty much whatever graphics card you like.

    I never did find it difficult to set up the monitor by hand myself though...

    (Off topic, unrelated.. Some guy got moderated down as a troll for saying he had no problems with xf86setup. What's up with that mod?)
  • I wonder if they publish it? And if so - is it possible to make distribution-independent tool to use it?
  • SuSE's X-Configuration Tool SaX is GPLed. See /usr/doc/packages/sax/LICENCE for info.
  • I was very impressed with sndconfig - it got my sound card working perfectly , instantly.

    Why does the red hat installation not mention it at all? They could at least mention it, and say "it doesn't work for every card but would you like to try to configure your sound card now?"

    I was fortunate enough to remember the sndconfig command from a slashdot forum discussion a long time ago. Otherwise, I wouldn't have known about it at all.

  • As always, things like this swing both ways. I don't complain too much about the X configuration and the modelines. In fact, my biggest problem with X has traditionally been to get the keyboard correctly installed and not the monitor. I like X and I like modelines, they make my monitor go 110Hz instead of 90Hz which the Windows drivers refuse to cross.
  • The first few sentences seem like he's being facetious, but I think this person was just making an earnest statement.

  • my new spiffy toshiba has a button that you can press and it tells you the current frequency range and recommended timing, and you can look at the info for other resoulutions, all on a handy on screen display!
  • I tried first looking at my monitor documentation and figuring out the capabilities and adjusting the configuration file accordingly. In the end it didn't work too well and I just ended up choosing the preconfigured option of "High Freguency SVGA 1024x768 @70hz" /w h 31.5-57 v 50-70. Didn't need to know much else about the monitor brand or type etc. Works great and seems to be one of the settings my monitor is actually calibrated for(It could do higher but not calibrated and that wouldn't look so nice).
  • Don't want to be a sore head, but I usered XF*^Setup and got 1024x768 in my old 14" Hi-micro. So use that it comes with RH and Debian....
  • You can download SaX from SuSE's ftp server, the file is installed in /var/X11R6/sax/config/MonitorData. I don't see why it shouldn't be possible to make another tool to use it, it's just a simple matter of extracting the info from the (text) database and putting it in the XF86Config file.
  • by FORTYoz ( 5393 )
    Whats so hard about entering your horizontal and vertical frequencies? xf86config does everything else.
  • What kind of Toshiba? What button? I've got a Portege 3010 and I used a config file from the Linux laptop site. It seems to work just fine, but if there's some more fine tuning I could do, I would like to.
  • I am very naive on this issue here - I assumed that VESA DDC eliminated configuration of refresh rates by informing the system of this info at boot up? Windows '98 seems to know exactly what the "optimal" refresh rates are for any monitor/video board combination manufactured after 1996(and some older ones)

    Is this a case of Linux distros just not shipping with support for this? It seems if it were as simple as a querying the BIOS somehow at bootup, we would have this issue licked.

    Excerpt from Windows registry for Vision Graphic 19" monitor:
    .
    .
    .
    MaxResolution 1600x1200
    MonitorRanges 30-95,50-150,+,+
    EDID 00 ff ff ff ff ff ff 00 28 ae c7 ...
    DPMS 1
    .
    .
    .

    The only missing component is knowing the limitations of the video board and how to set it.
  • I like SuSE's SAX quite a lot, because I could never get a good XF86Config with other tools. I just use autoprobe for my video card and then select a monitor and it works automagically. :)
  • I've got a Toshiba Portege 3010. It has a port expander that allows me to plug in a second monitor. There's a button labeled 'Fn' that pressed with 'F5' switches the display to either monitor or both.

    I was wondering if there is a way to use this to create a dual-headed display?
  • http://www.inria.fr/cgi-bin/nph-col as-modelines [inria.fr]

    Get your monitor manual and look up the parameters (max hor/vert refresh rate, etc). I was able to get 1536x1152 @ 95Hz for my Iiyama, veeery nice...

    -adnans
  • It works for some and not for others. I have
    never been able to get Xconfigurator to give me
    an acceptable setting, something that would not
    give me a black screen or no sync.

    Sax works for me.

    As for sndconfig, same thing. I ended up
    buying the commercial sound driver.

    sndconfig is only good for a handfull of sound
    cards and doesn't recognize a lot of sound cards.
  • I have only set up X under Redhat, and so with the advantage of xf86config.

    I have installed it on about half a dozen systems, with quite different monitors (from a very bad 15 inch to at quite nice 20 inch trinitron.)

    I have never had a problem, BUT I have ALLWAYS LOOKED UP THE SPECS for the monitor and entered the CORRECT values for both V and H refresh.

    Perhaps the key here is to RTFM.

    -Peter

    PS: This is intended as a serious post. Just because I use the phrase RTFM does not make it a troll!!
  • The problem with VESA FBDev is that it requires a VESA 2.1 compliant videocard to work. Most recent cards are, but many elder cards aren't. Those cards would give no output at all or just random noise which is IMHO worse than error messages from an X-server.
  • If your monitor doesn't happen to "work with X" right off the bat, it seems that you're out of luck.
    This usually dosn't have something to do with X itself but with those fancy graphical installation programs, which aren't capable of generating proper modelines.
    Even Windows 3.1 didn't have the sort of monitor problems that plague X.
    Sure, but you're usually stuck with 60 Hz SVGA and a very limited choice of resolutions. And there's no way to get it to run on more exotic hardware like fixed frequency Workstation monitors.
    Modelines. I know there are programs that help with this. Which ones do you all suggest?
    I've made the experience that the best program to generate modelines is still the offical X installation tool xf86config, which usually comes up with a usable mode you can then fine tune by just using the monitor controls. No need for specialized programs unless you really want to go to the limits (but then you're better off with a pocket calculator and a text editor, anyways).
  • On the other hand, I gave up on SuSE 6.2 and went back to Mandrake when I couldn't get X to work. SaX wouldn't even load. I never had a chance to find out if it was idiot proof or not. The other configurators YAST offered didn't help that much, either. It is unfortunate that a normal install using a major distro CAN lead to disasters like this. I'm glad I had good luck the first time I installed Linux, with RH 5.2. I had to do a little research on the web to optimize my laptop display, but that was that.

  • by Anonymous Coward on Sunday December 19, 1999 @04:32AM (#1462384)
    Why not use CDDB as a model for this sort of thing. Keep the monitor specific parameters on line somewhere, and make a generic setup utility that fits on a 640X480 screen which all monitors do. Then pull down the virtual .inf file from the site, compare to a similar site for video, (same site) and then compare them, and present the user with the choices. Why not build on the windows looking interface? Would be a good thing for Andover.net or CNET to provide to the consumer community. John Westerdale
  • What if you don't have a manual? I got my monitor from a friend, no manual or anything, and I couldn't find the specs on the Web. In fact, I had to email the manufacturer for the supported refresh rates.
  • by Anonymous Coward
    I've configured at least 50 different boxes (albiet with RedHat) Heck the system I'm on has a fixed frequency monitor off of an old Sun IPX. If you're sure that things are hopeless, go get an OLD CHEAP S3 video card and try it there. If you can get close, use xvidtune to fine tune your settings and get the modelines from it. Better yet, find who will give you a fixed frequency for free and enjoy a 19-21 freeby monitor.
  • The problem, of course, is when T.F.M. is L.O.S.T., or was never available to start with. I had an incredibly difficult time just recently getting X to work on an old AT&T laptop I have... xf86config simply would not create a valid configuration file, no matter what values I put in.

    The solution I used? I had a copy of muLinux, and knew it worked because I had used it on the laptop earlier... I edited the config (ignoring the big DO NOT EDIT BY HAND) to put in the values in muLinux's config, and with a little more fiddling I had a working 256-color config. Later I tempted fate by setting up the SVGA driver by hand to get more colors.

    That sort of thing, however, is not something your average user would do... Even though I'm fairly good with computers, I was still nervous about messing around with those values (I've only been using Linux for a couple of months, and had no clue what some things meant in the X config file).
  • This approach could be used for storing various (moderated) user feedback about the monitors, along with success/failure stories about what it works well with...

    Also, once we have XF86 4, we could do similar with the driver source (even having precompiled binary drivers for each processor type -- since the loading mechanism is independant of the OS...)
    John
  • get em 40oz! People always complain. If it's so hard, run in console or stick with win. It's not too tough to read some man pages or some web pages and figure it out. I for one like to have more control over my hardware. Ever had a windows machine add hardware with plug-and-pray that wasn't in the machine? I have. Now ask me if I ever had a linux box assume that there was hardware in there that wasn't. NO. Linux will probably never be as plug-n-pray ready as Winblows, cuz it's meant for different stuff. There is a place for all OSs. I have gotten some tech support calls from some pretty dumbassed people. They need windows to accomplish anything. I have actually had to explain repeatedly to people how to get thier email with windows. So don't be too hard on billy's bullshit, it has a place and always will.
  • Because the average user doesn't know this information. And the newbie user doesn't even know what hsync and vsync are.
  • Not a troll. I had no idea people had problems getting a monitor to work either. In my case, I found an easy was to find information by scanning dejanews for each monitor I set up. Setting up the maximum resolution and refresh rate is easy if you know how to use a search engine. [deja.com]

    Here is the setup I use for 1600x1200 on my V775 monitor. ...oh, there's a little hack in that search query on deja to rid most of the advertising crap.

    Else, break out the calculator and look at the XFree86-Video-Timing s-HOWTO [linuxdoc.org] and customize your own (and possibly exceed the performance limits of your monitor!) If you go beyond specs, the driver circuits can consume too much current and overheat. Not cool.
  • by jmaaks ( 125204 ) on Sunday December 19, 1999 @04:52AM (#1462392)
    Whereas this AC started attacking trolls, he has quickly become what he is accusing... The original poster never suggested X is inferior to Win 3.11. What he said, which is very true, is that the configuration of monitors under X is inferior to Windows configuration.

    Personally, I've never had any trouble getting a system working with X (although the monitor may not have been configured as optimally as I'd have liked). But I did think to myself while looking up scan rates that there has got to be a better way. And I think the volume of posters that agree with this issue would underscore the fact this is a real problem, not some phantom issue being raised to suggest "X is inferior to Win 3.11."

    My suggestion to people that think like this: Get off your high horse! The original poster was making an honest observation about the quality of X configuration. If we attack posts where people come forward and ask "Why does it have to be this way?", others will be afraid to come forward and point out areas where we can improve. We need to be strong enough to recognize that Linux and its associated applications and tools are not the end-all be-all they can be, and be willing to take this as constructive criticism that points out where we need to start working on improvements.

  • Nope. It's the same screen (same video card, same video memory, etc). No way to split it so that you get different things to the monitor and LCD. You'd need a second video card for that.

  • I've been installing X under Linux since back in the SLS days, and later under Slackware and then Redhat. It has gotten better. Unfortunately, it has not reached the point where Grandma can do it. If the intension is to sell to mainstream users, it has to be that easy.

    Yes, RTFM will help. I read the original guidelines on doing the calculations back in the mid-90's. It was annoying, but I got it working.

    These days, I pretty much select my monitor from a list and go. But I am using one of the monitors that someone else has already gone to the trouble of working out the configuration for. I think Linux has reached the point where there is a demand for somebody to do this packaging of the information. Somebody need to have a lab where they generate and test the configurations for various monitors.
  • by redhog ( 15207 ) on Sunday December 19, 1999 @04:57AM (#1462395) Homepage
    It is strange that the Xfree86 manual is that bad at describing how modelines works. It even uses the word "magic"! In fact, the SVGATextMode docs are quite good at describing, by example, how they work. The description is in the file creating_textmodes_from_scratch.HOWTO in the SVGATextMode dist.
    In fact, modelines aren't as hard as people likes to say. I'l try to explain them roughtly (Please read the SVGATextMode doc before creating any modelines, though, while I won't cover all aspects):
    A modeline consists of five parts - name, dot pitch, horizontal values, vertical values and optional parameters. The name is a name to assign the modeline to be able to refere to it later on (In the screen section, for instance). The dot pitch is the number of pixels to draw each second, in Mhz (Note that you should check the abilities of your graphics card before setting this value). Each of the vertical and horizontal part has the same format. They consists of bfour values each - the size of the visible area, the sync start and end and the size of the total area.
    A monitor needs some extra "black" space at the end of each line and at the end of the screen. The visible area, plus this "margin" forms the total area. For most monitors, the unviewable area should be about 25% of the visible area horizontally, and about 5% of the visible area vertically.
    The sync is a signal sent after each completed line, and after each completed screen, in order for the monitor to start drawing pixels at the same moment as the graphics card starts sending pixels.
    Note that the start and end of the sync is stated in pixels, not microseconds (Remember that we know the number of pixels per second). This may crate the somewhat obscure situation of sync start and ends being fragments of pixels (i.g. 800.25).
    For most monitors, this signal is to be emitted just after the visible area. The vertical sync should be just a few lines for most monitors. The horizontal sync should be about 2 microseconds in with, or for really low-frequency monitors, somewhat longer (3ms).
    The start of the syncs is what centers your visible area on the monitor. You may experiment with adding or subtracting some microseconds to them after calculating them, to center the image nicely.
    Note that the start of the sync may _never_ be before the end of the visible are as well as the end of it may _never_ end after the end of the total area!
    As a last not, there is one parameter to add at the end of the modeline that I'l describe: DoubleScan. It forces the graphics card to draw each line twice. This will reduce the the resolution to the half vertically. This is to any use mostly when you need some low resolution (For displaying MPEG videos, for instance) on a fixed sync monitor.


  • This might be a little offtopic, but...

    I installed Red Hat 5.2 as a clueless newbie, but was pleased to find that the video probing went quite well, letting me see a rather pretty display of 1024x768 on my 17". Clueless newbie that I was, however, in a few days I was so confused and thought I'd gunked up so much that I formatted the partition and installed Red Hat 6.

    6, however, DID NOT support my video. I ended up reinstalling 5.2 and then installing 6 on top of it.

    Now I've learned my lesson--just use the XF86Config file from 5.2 instead of a whole new installation--but this puzzles me. Why would an earlier version support something that a later version didn't?

  • XFree86 3.9.x and 4.0 will support this. It is a module that scans the monitor hardware and uses the modeline info returned. Only some drivers support it for now though. See http://www.xfree86.org/snaps hots/3.9.16/RELNOTES1.html [xfree86.org] for details...
  • In my experience with the various distros, I noticed that Corel gave me a refresh rate of 60hz with the 1024x768x16bit mode it chose for me.

    Caldera, OTOH, gave me a much more solid 80hz, since it actually knew what my (Philips) monitor was capable of.

    RedHat (Ok, Mandrake) gave me 75hz, since it didn't know my monitor, but I gave it the ranges for refresh and it decided that was good enough.

  • 1. Use xf86config
    2. Know your monitor specs and specify them correctly when the xf86config program asks

    When I say monitor specs I mean - the ranges in khz (horizontal scan rate?) and hz. (vertical refresh rate) xf86config will ask questions like: I have a monitor that can do 1024x768 @ 70Hz, if this is what it can do in Windows then use it.

    I think most of the problems experienced by Linux users are probably from trying to get 1152x864 and other Sun (or "non-standard") modes to work on monitors that were not designed for that.

    I wrote my own modeline a long time ago to get 1152x864 on my ADI Microscan 4v - but I wouldn't recommend it now, especially as my Microscan now plays up a fair bit.

  • Sax took the pain out of modelines and getting the syncs for different modes right. If you know your basic monitor data - Hsync range, Vsync range, you can in expert mode enter it and configure your monitor if it's not in the database (did so with LCD). Then you can finetune the individual modes with a graphics interface.
    ##
    ## -----> sax -----
    ##
    Filename: sax.rpm
    Label: SuSE advanced X Configuration
    ...
    Description:
    SaX steht für ( SuSE advanced XF86-configurator ) und ist eine alternative zur herkömmlichen X Konfiguration.
    trans:
    Sax stands for ( SuSE advanced XF86-configurator) and is an alternative to the regular X Configuration

    As for the Troll post(s):
    I find the X interface far superior to whatever the M$ world offers
    - OS can run without it,
    - choice of different window mangers,
    - mode switches between resolutions,
    - no-nonsese one-click cut and paste,
    - different functionalty on every of my three mouse buttons,
    - interfacing to other X-servers over network allowing me to xhost other machines.

    It has the feel to be made for the purpose of providing functionality rather than marked share and dominance - and it's XF86Free

    Hey, I ran across a good one:
    The best remote admin tool for NT is a car
    (In Network Intrusion Detection by Stephen Northcutt)
  • I'm surprised no one mentioned this before..

    I have a Diamond V770 Ultra (TNT2-Ultra) with
    32megs of RAM. I also have a "21 monitor which
    claims to have a max resolution of 1600x1200.

    BUT..

    In Win98 I run at a res of 2048x1536.

    Yep. Thats right.. 2048x1536. Thats the MAX
    my video card will go, and my monitor can handle
    it.. and I do notice a big difference between
    that res and the common 1600x1200.

    My monitor is a Hitachi CM751U.. Its specs are:

    Horizontal - 31-95 kHz
    Vertical - 50-160 Hz

    Video Clock Frequency - 200 Mhz (typical)
    Resolution - Horizontal - Up to 1,600 dots
    Vertical - Up to 1,280 dots


    My question is though.. I always see the MAX
    resolutions for Xfree86 at 1600x1200. Can't
    it go higher? I'd love to have the same
    resolution in Xwindows. I thought perhaps maybe
    the Xconfigurations tools out there just maxed
    out at 1600x1200, but perhaps by manual configuration a higher resolution might be gained.
    I really HATE modelines though and would rather
    not try to figure it out myself.


    So.. Is higher then 1600x1200 even POSSIBLE in Xwindows or Xfree86? And if so.. HOW? :)



    Thanks,

    -Matthew
    Technetos, Inc.
  • by warlock ( 14079 ) on Sunday December 19, 1999 @05:21AM (#1462412) Homepage
    Inf files really don't contain much, here's the relevant bit from my monitor's .inf:

    [NOKIA_447Xpro.AddReg]
    HKR,"MODES\1600,1200",Mode1,,"30.0-96.0,50.0-150 .0,+,+"
    HKR,,ICMProfile,0,"447XP93.icm"

    Basically states max resolution, horizontal/vertical freq range and v/h polarization.

    I am quite sure that you can get this information easily from all PNP monitors (all recent ones, ie less than 3 year old should support this) simply by talking to them, if your graphics card supports the protocol (again, if you bought it within the last 3-4 years it will).

    I think that is what windows does with most monitors anyway, it talks to them, grabs the "name" string (ie Nokia Multigraph 447Xpro) and the relevant stuff (like horizontal/vertical size in mm, polarization, freq ranges etc) and computes the rest automagically. All my monitors seem to work perfectly at the PNP mode, so the .inf files seem redundant, and such a database a waste of time if this can be implemented.

    -W
  • by account_deleted ( 4530225 ) on Sunday December 19, 1999 @05:22AM (#1462414)
    Comment removed based on user account deletion
  • I've used many monitors under X, some of them with brand names that sounded like they were being manufactured by a fly-by-night operation in some East Asian country I never heard of. I never had a single problem getting X up and running, except for the requisite problems setting up *any* program under Linux when the kernel is at (or less than) 1.0 and you've never used any UNIX but SunOS (and only as a user).

    Here's how you find the specs on your monitor:

    • Read the monitor book.
    • Don't have a book? Book in Korean or Japanese? Search altavista and google for the monitor model # (it's on the back).
    • Monitor model # scratched off or illegible? Use conservative VESA standard defaults.
    • Don't know what VESA is? I'm not so sure you should be using Linux...

    Here's how you configure X with the info you gathered:

    • Run xf86config and plug in the horizontal and vertical frequencies.
    • Don't have xf86config? Get a real Linux distribution, one that includes all the required programs in a package...
    • Your display looks weird? Run xvidtune or run at a lower refresh rate (like 70Hz or 60Hz) or resolution (800x600 is usually safe).

    Remember, if you're working with obsolete junk, like $25 monitors you bought at a computer show, BE CONSERVATIVE. Don't try it push it and run at 1024x768@72Hz, even though you think that's the base minimum any monitor should support. Not every monitor is created equally, and some used monitors are over ten years old! Stick with standard VGA and VESA standard modes until you *know for a fact* that your hardware can do better. Call up Compaq, Digital, Sony, etc, and ask them what model monitor you've got. Measure the monitor's height, width, depth, diagonal viewable screen size, and weight. Maybe they might even spare a tech if you're polite.

  • Two links to get you started:

    Using multi-headed framebuffers [demon.co.uk]

    Multi-Hea d Mini HOWTO [alaska.edu]

  • We need to be strong enough to recognize that Linux and its associated applications and tools are not the end-all be-all they can be, and be willing to take this as constructive criticism that points out where we need to start working on improvements.

    In other words, some people need to remember that the the strength of open source is not that programs don't need to be improved, but that they can be improved. Any time someone says: "Doing foo is easy, just do:
    1. x
    2. y
    3. z"

    I always think, then write a program to perform steps 1.,2.,3. since that's the kind of thing computers excel at; then we can leave the stuff like drawing, writing, communicating, playing, etc. to people, who excel at that sort of thing.

    The fact that something is 'simple' to do does not make it easy for the average person. The thing that sets geeks apart from normal people is the ability to see things compartmentalized into their most basic components. I think most people think a great deal more holistically.

    Chris
  • by gregbaker ( 22648 ) on Sunday December 19, 1999 @05:44AM (#1462424) Homepage
    I've been working on a program recently that does just these calculations. It's still pretty rough, but you can try it if you want [www.sfu.ca] (seems like a good opportunity to get some testers).

    It gets better refresh rates than KVideoGen or the other calculators I've found.

    If you have Perl/Tk, you can run the X version with the command xvidcalc, or the command line version with vidcalc (try "vidcalc -h" first).

    I did a lot of work on the caclulations to ensure that the resulting modeline was optimal in terms of refresh rate. You have to enter the specs for your monitor (either in the X interface or a settings file), so it's not for the faint of heart; you should probably look through ESR's VideoTimings HOWTO [linuxdoc.org] first.

    Let me know how it works for you, ggbaker@sfu.ca.

    Greg

  • by Tom Christiansen ( 54829 ) <tchrist@perl.com> on Sunday December 19, 1999 @05:57AM (#1462428) Homepage
    My goodness, that was terrible Perl code. At the very least, you should fix the formatting. But it still is, well, icky. As posted, it won't work due to HTML lossage. This should be better, but... oh my. There are still potential bugs, too, due to incorrect detection of error conditions after matches.

    Anyway....

    #!/usr/bin/perl

    unshift @ARGV, 'mga.mon' if !@ARGV && -t STDIN;

    while (<>) {
    chomp;
    if ( /^\[\*/ ) {
    s/\r//; # chop ^Ms
    ($name = $_) =~ s/^\[\*([^\]]*)\].*/$1/;
    print "# $name";
    /([0-9]+X[0-9]+)[^0-9]/i;
    ($mode = $1) =~ s/X/x/;
    print "Modeline \"$mode\" ";
    $pixel_clk=$h_disp=$h_fporch=$h_sync=$h_bp orch=$h_sync_pol=$v_disp="";
    $v_fporch=$v_sync=$v_bporch=$v_sync_pol=$i nterlace_enable="";
    do {
    $_= <>;
    chomp;
    s/\r//; # chop ^Ms
    $go="";
    if (/^PIXEL_CLK/) {
    ($pixel_clk = $_) =~ s/PIXEL_C LK\s*=\s*//;
    print !$pixel_clk;
    $go="yes";
    } elsif (/^H_DISP/) {
    /([0-9]+)/;
    $h_disp = $1;
    $go="yes";
    } elsif (/^H_FPORCH/) {
    /([0-9]+)/;
    $h_fporch = $1;
    $go="yes";
    } elsif (/^H_SYNC_POL/) {
    /([0-9]+)/;
    $h_sync_pol = $1;
    $go="yes";
    } elsif (/^H_SYNC/) {
    /([0-9]+)/;
    $h_sync = $1;
    $go="yes";
    } elsif (/^H_BPORCH/) {
    /([0-9]+)/;
    $h_bporch = $1;
    $go="yes";
    } elsif (/^V_DISP/) {
    /([0-9]+)/;
    $v_disp = $1;
    $go="yes";
    } elsif (/^V_FPORCH/) {
    /([0-9]+)/;
    $v_fporch = $1;
    $go="yes";
    } elsif (/^V_SYNC_POL/) {
    /([0-9]+)/;
    $v_sync_pol = $1;
    $go="yes";
    } elsif (/^V_SYNC/) {
    /([0-9]+)/;
    $v_sync = $1;
    $go="yes";
    } elsif (/^V_BPORCH/) {
    /([0-9]+)/;
    $v_bporch = $1;
    $go="yes";
    } elsif (/^INTERLACE_ENABLE/) {
    /([0-9]+)/;
    $interlace_enable = $1;
    $go="yes";
    }
    } while ( $go );

    print $pixel_clk / 1000 . " ";
    print "$h_disp ";
    $h_disp += $h_fporch;
    print "$h_disp ";
    $h_disp += $h_sync;
    print "$h_disp ";
    $h_disp += $h_bporch;
    print "$h_disp ";
    print "$v_disp ";
    $v_disp += $v_fporch;
    print "$v_disp ";
    $v_disp += $v_sync;
    print "$v_disp ";
    $v_disp += $v_bporch;
    print "$v_disp ";
    print $h_sync_pol == 0 ? "+HSync " : "-HSync ";
    print $v_sync_pol == 0 ? "+VSync\n" : "-VSync\n";

    }
    }

    It seems like a good candidate to hand to a programmer and say, "how would you rewrite this to make it less of a hack and more aesthetically pleasing as well?".
  • Har, har, har, I must laugh here. Yeah, I tried Corel Linux, esp. because I'm somewhat the target group of this software (a dumb computer-illiterate biologist). Well, let me put it that way: my first Slackware 2.0 installation with kernel 1.3.1 when all I knew about Unix was "rm, ls, pico" was a lot faster and... easier. Easier, because I had to RTFM and help hints during the installation, and there are practically none with Corel Linux.

    Back to the topic, anyway. Corel s***d up my XF86Config. It launched KDM right away before reassuring that the graphics is properly tuned (I did a standard, idiot-proof instalation! starting with formatting the disk - well, *a* disk I didn't need). I have a quite old SVGA monitor and a S3 PCI graphics card. I didn't look at the config file produced by Corel (just replaced it with the proper one), but it was certainly flawed.

    Regards,

    January

  • See my modeline program:

    http://pegasus.rutgers.edu/~elflord/unix/modeline/

  • The tools make it easy to configure modelines. It certainly doesn't take 3-4 hours. For example, in my modeline program, you just type "modeline", and it prompts you for sync rates. You don't need more info than the vsync rate and resolution.

  • If anyone out there is using a NEC MultiSync 5d, and has gotten it to go over 1152x864 please tell me how! I did it in windows, but in X I can't get it to work. I don't have the manual, and a search of the net was pretty much fruitless. I found lots of stuff about the other Nec MultiSync 5x models, but nothing about the 5d.

  • Arrgh. Yes, I'm confused. I obviously meant Caldera; haven't tried Corel yet. I get so much PR crap by e-mail and snail mail these days that I can barely keep it all sorted out.

    Gotta cut the number of hours I work...

    - Robin

  • always worked well, and involved a lot less reentering of the wheel than xf86config. YMMV.
  • by blazer1024 ( 72405 ) on Sunday December 19, 1999 @07:17AM (#1462476)
    One big reason that at least newer monitors work with Win9X so well, is that they're plug and play monitors. They just tell Windows what timings they need for each resolution, and then it works. Of course, you need a PNP monitor, and possibly a recent graphics card, but it's still a breeze.

    XFree needs PNP monitor support (Unless 3.9.x/4.x has/will have it) as well as some sort of user submitted modeline database for old monitors. I think a user submitted modeline database that could be included in a distro would be great. So that if Joe Average has some crappy no-name 14" (8.5" viewable :) and maybe Jenny Linux Girl tried it before, and submitted the modeline(s), then Joe Average has it easy. What does anyone else think?
  • by Karcaw ( 28053 ) on Sunday December 19, 1999 @07:22AM (#1462482) Journal
    I put up a web site a while back doing just This. I wrote a little perl scripte to suck the timings out of the WIndows INF files and dump them in a database. I had a lot of response to it initially, but my connection was slow, and I moved since then. I can provide information about it to people, or if someone has web space to donate I can put it back up(I need a Postgress DB and a perl interpeter).
  • Because you have to force people to have an connection to the internet, which is a very bad idea for any sort of install program.

    Mirror the database on an install CD.
  • So.. Is higher then 1600x1200 even POSSIBLE in Xwindows or Xfree86? And if so.. HOW? :)

    Of course it's possible. The only reason you have for thinking that "1600x1200" is somehow magic is that your setup has that as its max; you didn't hear anyone else say so, did you? It's the max because you (or the software tool you used) said that was the max.

    X/XFree86 is supremely flexible (and wait and see when 4.0 comes out, it's going to be amazing -- not necessarily easier to configure, but even more capable than before).

    I configured a max of 1800x1440 on my system, which is the maximum my video card can support with its 250 Mhz dot clock at 70 frames per second. This is made possible by two entries in my /etc/XF86Config file. One says:

    # 1800x1440 @ 70Hz, 104.52 kHz hsync
    ModeLine "1800x1440" 250 1800 1896 2088 2392 1440 1441 1444 1490 +HSync +VSync

    That sets up the possibility of using 1800x1440. To actually use it requires that resolution to appear in a "Modes" line in the Display subsection further down:

    Subsection "Display"
    Depth 32
    Modes "1800x1440" "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
    ViewPort 0 0
    EndSubsection

    Since 1800x1440 comes first in that list, it will be the initial resolution when I start X. Pressing ctrl-alt-PLUS and ctrl-alt-MINUS causes X to change to the next resolution (rightward or leftward, respectively) in that list.

    It's quite possible that the tool you used to set up your XF86Config file would have given you higher resolutions if you had asked for them. Or perhaps it thought you had a video card dot clock maximum smaller than what it actually supports; check your documentation.

    Make sure you don't exceed the specs on your video card or monitor. If you do, it's extremely likely that one or the other will die young (although extra cooling can help).

    P.S. I'm listed as a contributing author for the XFree86 Matrox driver (largely for fixing some really nasty bugs), and I think that setting up modelines by hand is a real pain, and that the various tools from XFree86 and others all have sad shortcomings. Anyone who claims that it's easy either is settling for suboptimum settings, or is bragging the same way that marathon runners claim that running 10 miles a day is easy and fun.

    As others have pointed out, Windows users are usually getting 60 frames per second, and very often much lower resolution (and sometimes fewer bits of color) than their hardware supports, unless they actively reconfigure it (and even most engineers never bother), so I don't think Windows is hands-down superior in this area. And to the extent that it at least is easier, that's not a credit to Microsoft, that's a matter of every hardware vendor (like Matrox and Diamond and SIII etc) writing drivers and configurations for Windows. The more they do the same help for Linux, the easier things will get for us.

  • try sourceforge, from VALinux....they seem to be giving out free web space. Not sure about the sql server though, but I am sure a perl interpreter is available.
  • by Mawbid ( 3993 ) on Sunday December 19, 1999 @07:50AM (#1462493)
    At one time, I want looking for a modeline generator and found this one [inria.fr]. I was surprised to see all sorts of weird resolutions in the results, like 1448x1086. Much to my surprise, that one actually worked on my monitor, which isn't rated for anything higher than 1280x1024. So, the question is: Why doesn't anyone talk about or offer resolutions other than the familiar 1024x768, 1280x1024, 1600x1200, etc? It doesn't seem there's anything magical about these numbers at all.
    --
  • by alhaz ( 11039 ) on Sunday December 19, 1999 @07:56AM (#1462496) Homepage
    that XFree86 got this reputation due to shortcomings in the "easy" configuration programs, such as XF86Setup, XConfigurator.

    I haven't used Corel, haven't used Caldera in a while, haven't used RedHat 6.2 either, so i can't speak for the latest of any of those.

    But the kicker was, even if you did know the sync range, if you used the most popular consumer distribution, RedHat, you were shit outa luck unless it was on their list.

    For those lacking an irrational fear of linearly-scripted text mode configuration, xf86config has always allowed you to enter a custom sync range, and it's calculations are pretty decent.

    SuSE's x configuration app, SaX, is a TCL/TK based graphical configuration app that tends to do a great job, too.

    The only real problem is getting ahold of the sync numbers. I sure wish manufacturers would just print it on the back of the monitor. I tend to use a fine point perminant marker to scribble it over the FCC info on mine, in case i have to reinstall.

    But there are several ways of getting those numbers. I'll suggest a few.

    RTFM: this is the most obvious. I've got no sympathy for you if you've got the manual and insist that you shouldn't have to read it.

    Windows: A lot of Win9x video drivers will spit out the sync range if you get into the "advanced" display settings. Handy if you use dual boot. I know that nVidia's drivers do this, for one.

    deja.com: somebody else out there probably already asked for help with it. make sure you tell it to search "all" messages. it's idea of "recent" is getting pretty freakin recent these days.

    manufacturer web site: They just might have had the presence of mind to publish it online.

    altavista/metacrawler: Someone else might have too.

    email the manufacturer: if you're lucky they might respond.

    Steal a manual: if it's a current model, CompUSA or similar might have one on hand they'll let you photocopy. Even if it's not, a store that sold it locally might have the specs on hand in their service department. I know when i worked on the service end of the industry years ago I hoarded that information. Believe me, the tech will sympathise with your plight. Imagine how they feel when someone dumps something on their table and says "make it work" - they know what it's like to pray for documentation.

    I agree with a previous poster that it would be really nice if we could just parse a windows "monitor driver" .inf file for the info we need, does anybody here know what'd be involved in doing that?
  • Awhile back on slashdot there was mention of an XFree86 Modeline Database on the web... the URL is http://www.netmaster.ca/fvlug/monitor/ [netmaster.ca]. Give it your montior's name and it spits out Modelines. You can also submit your monitor's info for others.
    ---
  • by Tom Christiansen ( 54829 ) <tchrist@perl.com> on Sunday December 19, 1999 @07:59AM (#1462498) Homepage
    How the fuck did you get the formatting so nice? Thanks.
    Now, isn't that a silly question-- by using a perl program, of course. Were you expecting anything else? :-)

    Here it is, having been run on itself:

    #!/usr/bin/perl -p
    #
    # code2html - convert code to html for posting to slashdot
    #
    # tchrist@perl.com
    # Sunday, December 19th, 1999

    BEGIN { print "<TT>\n" }# and the spirit of awk...

    # first kill all the tabs
    1 while s{ \t + }
    { " " x (length($&)*8 - length($`)%8) }ex;

    # then the four standard naughty bits
    s/&/&amp;/g;# must remember to do this one first!
    s/</&lt;/g;# this is the most important one
    s/>/&gt;/g;# don't close too early
    s/"/&quot;/g;# only in embedded tags, i guess

    # make lines break where they should
    s/^\s*$/<P>/ || s/$/<BR>/;

    # make sure spaces aren't squishticated so we
    # can do indentation and properly align comments
    s/( {2,})/'&nbsp;' x length($1)/ge;

    END { print "</TT>\n" }# ...shall be with us always

    Also, if you're going to preview, make sure you hit the back buttand submit from the pre-previewed part. Slashdot has a bug on its escaped stuff otherwise; you lose the escaping after the preview. So look, but don't launch. There are other bugs in the slashdot presentation code that I'd really love to find (my nbsp code above is working around it by looking at only long stretches of spaces), but I don't have a recent copy to inspect.
  • Different automated tools that exist to create or select modelines work with different degrees of succsess. However, what one really needs as a good personal backup solution in the case these tools fail is a private database of typically used modes. Monitors file from doc directory of XFree installation is a good place to start. You can copy all modes people have created, indentify individual ones and sort them by resolution and dotclock. (For ignorant, dotclock is the first numeric value in the modeline definition).

    Thus, you may have "1024x768a", "1024x768b", .... etc (the same for other resolutions). Once you have such private database built, I doubt you will ever find a monitor that does not work.

    I built my database five years ago and I have never come across the monitor that I could not configure in five minutes. What I need to know is what the monitors capabilities are (approximately) and I immediately can take the appropriate modelines from my list.

    It is not that dificult once you get an idea of what "classes" of monitors are out there. Believe me there are not that many -- for 99.9% users it is five, maximum six types.

    With this approach I had to write modelines only twice -- and those were special modes not suitable for desktop X and not in any databases I could find. One mode was for full screen TV and the other for full screen mpeg. Those were the only cases that I had to learn how to write the modes.

    In general, I find X approach more flexible than Windows', since it lets you to define modes manually. When similar multiple modes exist, I can try them and chose the one best looking. I usually have to redefine modes manually after the installation, because I'm not happy with the results. The older tools tended to put the most conservative modes while the latest tools (like latest Xconfigurator form RedHat) put those that have the highest refresh rates, maxing out the monitor. In either case the results were not acceptable and there were not enough choices for me.

    X can be very flexible here with just a little effort and understanding from the user side. For example, my modes declaration in Display section begins with "1280x1024f" and ends with "320x200" going thorugh many modes in between. Which windows computer can do that? Another example is my home monitor, which is a cheep 17" allowing to do only 1280x1024 at 60Hz, which is unusable. In windows, I can use it only as 1024x768 (since the only possible selection above 1024x768 is 1280x1024). In linux under XFree, however, I am happily using it as 1152x900 at 70Hz. And I did not have to write that mode either. I just took it from a database of modes. There are other monitors out there (there were much more in the early days of Win95) which when failed to be probed by Windows will work miserably or fail to work at all.

    The stuff you mention is a problem, no doubt. But it is not that difficult to master. You need to understand that due to microsoft monopoly and its proprietry standards it is very easy to test monitors under windows (because vendors provide the specs and make their monitors windows probe friendly) and very difficult elsewhere. This situation is going to change rather quickly with expansion of Linux, erosion of Windows monopoly and a bunch of Linux friendly hardware available.

    I can e-mail my mode database to anyone who is interested or post it if there is enough demand.
  • ElvenKnight wrote:
    I'm surprised no one mentioned this before..

    I have a Diamond V770 Ultra (TNT2-Ultra) with 32megs of RAM. I also have a "21 monitor which claims to have a max resolution of 1600x1200.

    BUT..

    In Win98 I run at a res of 2048x1536.

    [...]

    My monitor is a Hitachi CM751U.. Its specs are:

    Horizontal - 31-95 kHz
    Vertical - 50-160 Hz

    Your Horizontal sync limit is going to kill your refresh rate here. 95000 lines/sec divided by 1536 lines per screen leaves you at a max of 61.8 Hz. After you take into account the extra time needed at the end of a scan of the screen, you'd be lucky to make 60 Hz in that mode without exceeding your monitor's horizontal sync limit. I recommend you check what refresh rate that Windows 2048x1536 mode is running at, and if it's more than 60 Hz -- well, you've been warned.

    /dev/joe

  • XFree comes with a number of "stock" modelines included in the sample configuration files. They go up to 1280x1024. By combining these modelines with the maximum horizontal and vertical frequencies of your monitor, X can pick the best modeline possible for monitors up to 1280x1024.

    MS-Windows, in contrast, defaults to a "lowest common denominator" that works nearly everywhere, but typically gives you a 60 Hz vertical refresh rate. 60 Hz is pretty lousy, and can lead to eye injury. OSHA recommends at least 72 Hz for safe computing.

    If you have an OEM monitor information file (.INF), you can clue MS-Windows in to the maximum frequencies for your monitor, and MS-Windows will do what XFree does -- pick the best possible mode from a list of pre-configured "stock" modes.

    Note that MS-Windows has no built-in way of manually entering your monitor specifications, like XFree does. Thus, if you do not have an OEM .INF file, you are generally out of luck with MS-Windows. Not so with XFree. On the gripping hand, many OEMs provide .INF files, while few provide XFree mode lines.

    As usual, it comes down to a matter of OEM support. Many OEMs support MS-Windows, thus it is perceived as better. Fewer OEMs support Linux, thus it is perceived as inferior. In reality, this reflects the quality of the OEMs, not the operating systems.

    Case in point: I have a 19-inch Samsung SyncMaster 900p monitor. To set it up under MS-Windows, I downloaded an .INF file from Samsung's website, and fed it into MS-Windows. To set it up under XFree, I cut and pasted the modeline from their website. In both cases, I was up and running in seconds.

    There are things that could be done to improve the situation under XFree. One is to write a converter program which will extract needed the information from an .INF, taking advantage of the larger installed base of MS-Windows. Other people have posted more information on such a program elsewhere in this discussion. (I see no need to invent a new specification format just for XFree; MS's files work fine for this; why reinvent the wheel?)

    The other thing to do is modify xf86config, Xconfiguration, and the other dozen or so X configuration programs to actually prompt for and use said .INF files. It won't matter how easy it could be to setup X unless we actually make it so.

    We also need to include stock mode lines for higher resolutions, as many monitors are capable of more then 1280x1024 these days.

    Just my 1/4 of a byte. ;-)
  • So you don't mind spending a little extra time to max out the performance on your system, but if you have to spend 10 extra minutes to get a user's refresh rate up to something where they won't be able to count the scan lines going down the screen, that's a problem?
  • by Anonymous Coward
    My understanding is that those resolutions were defined by VESA to be standards, which is why monitor manuals only mention them. (Sometime they also mention Mac-specific resolutions like ?864x720.)

    It's probably just a matter of what resolutions they've done QA on and are known to work well.
  • by Anonymous Coward
    1. Write down that FCC id from the back of the monitor.

    2. Go to http://www.fcc.gov/oet/fccid

    3. Punch the FCC id in.

    4. Read the specs...

    Is this fool proof? No. For example, read the results from searching on evokd-1910t. In this case, it's a wonder that the request for an FCC ID was accepted.
  • I have around ten years of PC experience, including tweaking, optimizing, configuring HW and SW, programming in various languages, and countless DOS, Windows & Mac reinstalls. I am not a moron. I read manuals, I do research on the Web, and if I don't know how to do something I know where to learn. But I have never had as much frustration as when I tried to get X running on my system. The card is an ATI Rage IIC. Yes, I RTFM. Yes, I had all the numbers on my monitor. Yes, I read esr's FAQ. Guess what? None of it helped. No matter what I did, at best I always got a screen that was clear on the left side and distorted on the right. I upgraded my XFree86 installation. I switched between three different distributions (Debian, Red Hat, Mandrake). I tinkered with XF86Config until I wanted to shoot myself. Nothing worked. I banged my head against it for a month. Then I asked about it at comp.windows.x to see if anyone else had had this problem. I got ONE response, from somebody who had the same thing happen to him and was hoping I would get an answer. I never got any help at all. I finally swapped in a crappy old video card and got it working, but later took it out so I could concentrate on learning the command-line interface. I'll buy a different video card later, when I have more money and when I've learned my way around the system the hard way. So, I get very frustrated when I see people complain that if you can't get it working you must be clueless. I can easily imagine less sophisticated users being completely turned off to Linux by: 1) the relative difficulty of using it; 2) the difficulty in some cases of getting it working at all; and 3) the contemptuous attitude of those who have figured it out and therefore think they're hot shit. Every single one of you was once a newbie. Please try to remember that. p.s. Advice and constructive criticism are welcome. Flames will be cheerfully deleted.
  • One big part of Linux's reputation for being hard to configure is that the online documentation lacks connections leading from obvious keywords to the monitor configuration tools or information.

    For instance, try to figure out how to change your monitor resolution in less than an hour, starting from "resolution" or "monitor".

  • Does BSD do this any better?

    Unlikely, given that the free-software BSDs tend to use as their window system, err, umm, XFree86.

    This is largely not a Linux issue, it's an X server issue; Accelerated-X, say, might do better, but, given that my monitor accepts a bit stream rather than an analog signal, I can't really say, based on my experience with Accelerated-X on my monitor, how it handles glass-bottle displays.

  • The question is not "How hard can it be?"

    The question is "Where do you start?"

    Consider the appliance user, with his new Linux install. He just wants to adjust the resolution of his monitor. He looks for a menu item. No menu item. He looks in the man pages. No help there, either.

    Even if he figures out that he's got to twiddle a file himself, how the HELL is he supposed to know that the magic word is "modeline"?

    And if he does find out that word, just try looking it up in the man pages.

    The problem isn't that it's hard to adjust the resolution (though that is a problem, too). The problem is that the newbie has no obvious way to find out how to do it.

    Windows and Mac both make it easy. Linux stock distributions make it arcane. So the new Linux user is stuck with some minimalist stock install resolution until he fights this battle for himself or gets help from somebody else.

    THAT's why Linux gets a rep for being hard to use, requiring a geek under the hood at all times.

  • by Anonymous Coward
    Whoops, I just ran into that "preview mangles entities bug" with that last post. Here I go again, without preview...

    And for those who'd rather not install Perl, here's a Python translation (having been run through itself, of course):

    #!/usr/bin/python
    #
    # code2html.py - convert code to html for posting to slashdot
    #
    # Sunday, December 19th, 1999

    import re
    from string import *
    from sys import *

    print "<TT>"

    ent_re = re.compile('[&<>"]')
    spaces_re = re.compile(' {2,}')

    def ent_sub(m): # replaces forbidden chars with HTML entities
    return '&' + {'&':'amp', '<':'lt', '>':'gt', '"':'quot'}[m.group(0)] +';'

    for line in stdin.readlines():
    line = expandtabs(rstrip(line))# strip trailing spaces and expand tabs
    line = ent_re.sub(ent_sub, line) # convert entities

    # terminate lines correctly
    if len(line)>0:
    line = line + '<BR>'
    else:
    line = '<P>'

    # make spaces non-breaking, and print the line
    print spaces_re.sub(lambda m:"&nbsp;"*len(m.group(0)), line)

    print "</TT>"

    Note that you need to use "HTML Formatted" mode. In "Plain Old Text" mode you'll get extra newlines. That seems to be true for Tom's version as well, but I'm not sure. I don't have Perl installed on this machine...

    This is also not a direct translation. The Perl version converts the "naughty bits" one after eachother. This version converts them simultaneously, so we don't have to be so careful about the order. Also, this version converts all (non-trailing) spaces to nbsp's, to prevent word wrap from kicking in (bad for lots of code, including Perl/Python/sh comments...).

    Finally, both versions of the script don't prevent Slashdot from wrapping long lines. This can be a problem for languages that care about newlines. This includes Perl (imagine a comment getting wrapped at the wrong point...), Python, most shell scripting languages, C and C++ (preprocessor directives), Java (again, the comment issue), most config file formats, etc., etc...

    BTW Tom, why is the userid part of your email address only 7 characters long? I thought most systems that truncated did it at 8 characters.

  • by ewhac ( 5844 ) on Sunday December 19, 1999 @01:21PM (#1462602) Homepage Journal

    Okay, I don't have time to write a full treatise, so here's a quick overview of all the sTUfF involved. For the record, my job is writing graphics drivers for BeOS.

    There are several constraints which need to be observed. These are:

    • Minimum/maximum pixel clock rate of the card,
    • Minimum/maximum horizontal rate of the monitor,
    • Minimum/maximum vertical rate of the monitor.

    Typically, the graphics driver will constrain the pixel clock rate, so the only thing left to worry about is monitor scan rates. The scan rates supported by your monitor are printed in your owner's manual.

    Modern monitors also support DDC (Display Data Channel), which is a funky serial protocol to get identification and configuration information out of the monitor. The original DDC spec provided only for transmitting a unique monitor ID. The ID was supposed to be looked up in a database which would contain the monitor's min/max scan frequencies and other characteristics (can you say C:\WINDOWS\INF\MONITOR*.INF?). A more recent revision of the DDC spec now supplies these frequencies directly, as well as gamma characteristics and other cool stuff. Neither XFree86 nor BeOS support DDC yet.

    Trivium: Absolutely every monitor out there will support 31.5 KHz horizontal, 60 Hz vertical. Unfortunately, this is only useful for 640 x 480. That's why Windoze defaults to this when it can't identify your monitor or graphics card; it knows this will work in any case.

    Once you have a mode line for a particular resolution, you can not simply tweak the pixel clock. Sync timings vary not only by resolution, but also by scan rate. This is because the horizontal sync pulse is not simply a percentage of total horizontal time; it needs to be of a fixed duration, regardless of the scan frequency. If you stray outside the sync pulse requirements, the monitor's flyback transformer can overheat, shortening the monitor's life (and possibly killing it in ugly ways).

    There are three ways "The Rest of the World" generates mode lines. One is via a direct DDC probe as outlined above. Another is to use the official mode table provided by VESA. This table contains fixed sync timings from 320 x 200 all the way out to 1900-something. Monitor manufacturers are supposed to make certain that their monitors respond well to these modes. When compiling their BIOS mode tables, however, some graphics card manufacturers, however, will make minor alterations to the VESA table, usually to the HSync and HTotal parameters. I've never discovered why they do this (except that if you don't, the graphics will come out looking funny in some cases).

    The third way is to use the VESA GTF (General Timing Formula). This formula takes the following parameters:

    • Desired display resolution,
    • Desired (vertical scan rate OR horizontal scan rate OR pixel clock frequency)

    From this, it will compute a mode line that will work on all modern monitors, and most old ones (too old to support DDC). The formula is rather ugly, involving a square root somewhere, and I don't have it in front of me.

    Copies of the VESA mode tables, GTF, and DDC specs can all be ordered from VESA [vesa.org]. I don't know offhand what, if anything, they charge to print up and send you a copy.

    XFree86 should at least use the VESA mode table as a starting point for mode lines.

    Schwab

  • I sort of liked this idea, and hadn't thought of it before. I went and checked it out. I Just created 3 or so more optimal modelines for my config. Here's how:

    0) Go find the .inf files for your video card and your monitor. I found mine under my windows/inf directory for win98.
    1) look in your video card inf file. For instance, mine is called "nv4agp.inf", for an nvidia agp TNT. There should be some similar lines to:

    HKR,"MODES\8\1152,864",,,"60,70,72,75,85,100,120 ,140,144,150"

    These are the vertical refresh available for your video card at 8bpp, at resolution 1152/864. By going over to the microsoft site, I was able to determine that any higher color depths that don't have a listing default to the same thing for a lower color depth, for instance, i think the following more or less blank line means that for 16bpp the vert sync rate is the same as 8bpp:

    HKR,"MODES\16\1152,864"

    2) Now look at the .inf file for your monitor. Mine is a 19" Hitachi CM751, it was under "monitors6.inf". Just grep around till you find it. There should be a line towards the bottom with something like:

    [CM751.AddReg]
    HKR,"MODES\1600,1200",Mode1,,"30.0-94.0,50.0-160 .0,+,+"

    I _think_ that means that my highest resolution supported by my monitor would be 1600x1200, my horizontal sync frequencies are 30-94 and 50-160 (this is atually correct, as stated in my manual).

    3) Now you know manufacturer specified vertical frequencies for your video card, and the maximum vertical and horizontal frequencies for your monitor. Now use this information in one of the autoconfigure utilities such as "modeline", or that web page mentioned in the original article. The web page seemed easiest and worked best for me. I just plugged into the web page the resolution I wanted, and then kept feeding it higher and higher vertical frequencies as per my video card inf file until I maxed out my monitors horizontal refresh range. Be careful not to plug any vertiacal frequency past the vertical range of your monitor that you found in your monitor inf file. Similarly, make sure that the figured mode line doesn't go over the horizontal frequency either (the web page reported what the horizontal freq was for the calculated mode line but the "modeline" utility didn't, so you have to do it yourself. go look in the video tuning howto).

    Seems to me that it would be easy enough for installation programs to do this for you from windows inf files if you have funky configuration. If _windows_ can do it, linux should be able to. All the info is right there!

    CAVEATS!!!: You can burn out your monitor if you overdrive it. Don't do it if you're scared of doing so. I've been messing around with this stuff for a while. Also, when I tried to push my monitor to the highest limits of what it was supposed to do, it usually doesn't do what its supposed to. For instance, I usually had to settle for a vertical refresh of 85 instead of 100, even though my monitor and vid card are supposed to be able to do it. Your mileage may vary.
  • YMMV, but I don't get too pushed out of shape about monitor info. I believe any modern 15" monitor should handle 1024x768, a modern 17" monitor should handle 1280x1024 at 70Hz, and a 20"+ monitor should handle 1600x1280 at 60Hz+. And, furthermore, I expect a well-built modern monitor not to die immediately because it gets the wrong video signal (but some undoubtedly will).

    I figure it's not worth the hassle trying to track down old monitor specs, so if there is nothing obvious, I just make one up that has very generous ranges. I can then read off the actual frequencies from the console output of the X11 server. If a monitor were to die using that procedure, well, they have gotten pretty cheap and I probably didn't want it anymore anyway. But after installing Linux with dozens of different monitors, so far, I have not had a problem.

    Of course, if Linux wants to take over the desktop, I think a more plug-and-play approach is needed. IT departments want easy installation on a variety of hardware.

  • I don't think that making the X config easier to do is neccessarily "dumbing-down" Linux. Quite the opposite.

    To me, getting an optimal X config is not terribly difficult, but it is pure drudgery from where I sit. I, for one, would love to have a widget that could suck the info from a .inf or a cddb-style thing and use that as a basis for building an XF86Config file's modeline and monitor entries. Someone else mentioned also querying the VESA stuff from the monitor directly. I'm all for it.

    If these sources of information provide what's needed to assemble optimal configs for the standard resolutions and bit-depths, great. Then, if I want a funky resolution, I can go edit the XF86Config myself.

    Should we even do this? Do we really want to change things to make it easier for EVERYONE (read: computer illerate)?

    In a word, yes.

    Linux must make some progress toward becoming mainstream. That's ok, since we can still have it as raw and unfiltered as we want, but if my mom is ever going to have a machine with Linux on it, it must have some provision for making it simple to get working. To avoid doing so means marginalizing Linux, and that would be tragic.

  • Dunno what's planned about 4.0, but 3.9.16 merely grabbed the data and displayed it upon bootup - they were not used to compute (even optionally) modelines, which is a shame. It did use the gamma and v/h size stuff to adjust the DPI and gamma correction though.

    -W
  • Yes, quite, I did a little calculation at the time and this was the highest res I could get with the card I had at the time - I didn't even know that Suns (& as you State Macs have this res available too in Mac OS 8.5 & 8.6).

    However, users should also note that Video Card memory that you don't use for screen data is now usually used by the low-level acceleration functions of the card, and that if you don't make the memory available to the card then these functions won't be available to it and the card might start to run like a dog for you.
  • It isn't just during initail install that it's a problem. Newbies can usually get something configured, with the help of the probe.

    The problem is that they get some minimal default configured. Now that they're up, they'd like to use the whole screen.

    How do they CHANGE it?

    How do they FIND OUT how to change it?

    Pretend you know NOTHING about X. You're fresh from Mac or Windows. You have a machine that has a multi-megapixel monitor running 640x480 and want to make more use of it. Your old environment had a graphic monitor config tool, that's what you're used to.

    What do you do?

    Hunt for a tool. No tool.

    Hunt for online documentation. Try "monitor". Try "resolution". Nothing.

    Now what?

  • read the README file.

    WHAT readme file? They're up and running at 640x408 and have no CLUE about README files, let alone the one associated with the X windows system.

    go to xfree web site and read the jump start guide.

    So what's this "xfree"? Where are they supposed to learn:

    That there is something called "xfree" that has something to do with their screen resolution.

    That they should go to a web site to learn how to configure it.

    We are talking appliance user here, not programmer.

    It comes back to this: The online documentation MUST quickly vector the naive user to the answer to the question, or the system is "hard to use". For screen resolution questions, Linux distributions don't do this.

  • I'd take 1600x1200 *any day of the week* over a 60 Hz refresh rate, no matter what the resolution. Chances are, you'll be able to run 1600x1200 at *at least* 75 Hz, and probably 80 or more. You probably start getting migraines from a 60 Hz refresh rate.

    At any rate, the "Max" refresh rate is probably just the manufacturer's recommended maximum rate. The warranty might well be void if you drive it at anything more than that.

    - A.P.
    --


    "One World, one Web, one Program" - Microsoft promotional ad

  • I thought that the dotpitch was the size of a pixel at the highest resolution from the main page... Digital for home systems is great, but will 1280x1024 be good enough for theatres? That's about 10mm dot pitch, folks...
  • It's a fair point that visual configuration tools are pretty non-existent for Linux. But given the relative youth of Linux as a desktop OS and the speed of development in most other areas I can't imagine this situation will exist for long.

    But that's almost beside the point, which is that the Linux way of providing configurations as text files if you want them is inherently superior to the Windows way. Simplicity, in this case, is a good thing. In Linux it is possible for third party vendors to write sophisticated configuration tools without having to conform to Microsoft's API of the month.

    Linux will evolve to contain all the visual config tools that you desire, and when it does Windows will have little left to recommend it to a novice. Then Windows will be left as your dinosaur OS. And when this happens, experienced sysadmins will still be able to dip into the raw config files and activate settings that nobody though to include in a pretty dialog box.

  • Comment removed based on user account deletion
  • I would appreciate it if the author of this code would publish his mail address so I can contact him. His code aborts with fatal exceptions, and I'd like to know why.
  • I know both, and I can tell you that Python code is significantly easier to read than Perl code.
    That's a silly thing to say. Please try to refrain from such subjective assessments. They're anecdotal at best, and serve mainly to perpetuate the leyenda negra; that is, FUD.
    Python has its faults, and I'm surprised Tom hasn't come to point some of them out (or maybe he's masquerading as an AC, doing some astroturf for himself).
    First off, I have a life, and yesterday was Sunday. I just got around to looking at this stuff this Monday morning.

    Second off, why should I bother to jam on Python's faults? I see no profit from that.

    I'd rather discuss the discrete advantages and disadvantages of your particular program--which, by the way, doesn't bloody work.

    Even with Pythons' faults though, maintainability is king when it comes to writing real programs. Perl is notorious, even among Perl programmers, for being unmaintainable. Hence, Perl loses.
    Nope, I'm sorry. That's not true. I don't know whether you're lying or simply wrong, but in any event, your fudding is unbecoming of any serious cyberlinguistic researcher and analyst.

    Badly written code is notorious for being unmaintable irrespective of the implementation language. Fuzzy thinking and sloppy coding makes any program a nightmare. A software professional has been trained in ways that your common CGI hacker has not.

    Perl is very accessible to these untrained but eager nonprofessionals just trying to get their jobs done. They shall forever come up lacking when held to the same standard as you would hold a softare design engineer. But they, too, have a place in the world. It's officialyy perfectly ok to speak "Perl baby talk". That's what they're doing. Do you criticize your nearest eight-year-old for his inability to construct and execute an intricate novel or a symphonic composition? Of course not.

    Just look at the long code I originally reformatted. The bug is in the thinking of the coder, and inability to generalize approaches and work at high levels of abstraction. The fault of bad art lies here in the artist, not his paint.

    Now, if you would, login to Slashdot and authenticate yourself. I need to have your mail address because your code is broken, and I'd like to discuss this privately in order to spare you public embarrassment.

    If you insist upon maintaining your anonymity, then please do not bother to reply.

  • Hint: your import ordering is wrong. Please test your code next time.

    You and yours have an incompatible change between library versions causing mysterious failures in a non-backward compatible fashion. Your toy language gives the most idiotic error message known to man, rendering it utterly indiscernible; this is what makes you want to punch python's lights out. I have never seen a programming language with such horrid error messages. Bug isolation and error recovery would be easier with your eyes closed than reading that embarrassment. A programmer doesn't need this kind of grief from a compiler. Your toy language also doesn't allow you to specify a version requirement the way Perl does with its modules or the way normal Unix shared library stuff does. This is just not something that a serious programmer in a real-world project should put up with. And we don't.

    Your code is also inferior in that it does less than Perl's does. Apparenly you've confused the -n flag for some STDIN reading. Read the perlrun(1) manpage next time.

    And your sorry script is slower, way slower--glacially slower--than my Perl version, just like so much in Python:

    % time perl /tmp/code2html.pl < random_cgi_script > /dev/null
    0.470u 0.010s 0:00.49

    % time python /tmp/code2html.py < random_cgi_script > /dev/null
    5.140u 0.070s 0:05.23

    If I wanted to take an order of magnitude performance hit, I'd code in Javascript or something. No thanks, buddy. Get yourself a real programming language.

Saliva causes cancer, but only if swallowed in small amounts over a long period of time. -- George Carlin

Working...