A problem with a happy resolution...
Oct. 27th, 2014 05:03 amI have spent weeks (months? ... but certainly not too hard) trying to find the answer to how to use X11 with the XFCE window manager on my Slackware server at the recommended resolution of my monitor of 1440x900. This has been startlingly hard to get information on (along with information on how to configure the onboard video hardware on my motherboard), so I have decided to document it here in hopes that anyone else having this problem can find a quicker solution to their woes. I have so much other stuff to post (seriously, I met Buzz Aldrin and Bill Nye and Neil deGrasse Tyson earlier this month, how cool is that?), but I just haven't had any time at all these past few months... I have been slammed so hard with work (both work work and school work and my own work... yes, I know that's 150%). Until then... anyone who doesn't care about xorg.conf files can safely skip the rest of this post ;).
Now, before I go any further, full honours to Arun Viswanathan for figuring it out first: http://www.arunviswanathan.com/node/53 ... thank you Arun!!!
Here are the steps: find the manual for your monitor. I have an eMachines E19T6W monitor, and finding the PDF of the User's Manual wasn't hard at all. Next, there were two sections giving technical information... the Specifications section and a section on Video Modes. The Specifications section stated that the monitor had a 1440x900 native pixel configuration (which you always want to use if you can) and a 0.2835mm x 0.2835mm pixel pitch (which gives a display size of about 408mm x 255mm, which is needed for the xorg.conf file eventually). In the video mode section, it specifies a whole bunch of resolutions, but the 1440x900 mode is given as "Mode 15 - VESA 1440x900 - Horizontal Frequency 55.935kHz - Vertical Frequency 59.887Hz - Available in DVI Mode (19-inch Model)? Yes.". The first set of sorcery is the "gtf" and "xrandr" commands. The former automagically generates a Modeline for the resolution setting you want, and the latter allows you to add it and test it out interactively. The second set of sorcery involves permanently setting up an "xorg.conf" file and XFCE configuration to implement it permanently going forward. To interactively test out the hardware, first get the Modeline needed by running "gtf <horizontal resolution in pixels> <vertical resolution in pixels> <vertical refresh rate in Hz>":
Taking a step backward, one of the things that I wasn't sure was set up right was the video hardware. It's the onboard video for the old Asus M4A78LT-M LE motherboard I have in my server (if it ain't broke, don't fix it y'all), and I wasn't sure that the right drivers were being used (I was flailing pretty hard trying to get this to work and followed all sorts of weird paths on my way). I should further mention that I am using the onboard video because my server is really a server and I don't need much in the way of video display hardware capabilities (99.9% of the time, I'm connecting to it over the network from another system running X11 or just through SSH or something, so I hardly ever use the console unless I'm doing serious maintenance on it). The video chip is an ATI 760G class chip (Radeon 3000 family), and I read innumerable old posts about how it was not properly supported by the X servers of the day and more recent posts about how ATI has dropped all support for them from their proprietary drivers for Linux systems. It was not looking good at first, but it turns out there is an open source alternative for this class of video hardware that goes by the name "xf86-video-ati" (and shows up in the kernel output as the "radeon" driver). I initially thought this driver was not being invoked even (as I said it was really hard to find information and much of it was conflicting, confusing, or just plain false), but when I finally knew what to look for, I realized the correct driver was running and that it was simply a configuration issue I was dealing with. The breakthrough here happened when I found a Wiki page on it: https://wiki.archlinux.org/index.php/ATI. Once I had that, it was smooth sailing with the configuration options for the driver and my card (which I have reproduced below).
The last thing I wanted to mention is what is required to create a working "xorg.conf" file. Again, one would think that this would be easily accessible information, but one would be wrong... Not to beat around the bush, the first thing that is needed is a "Device" section. This could be quite simple and only contain key/value pairs for "Identifier" and "Driver". I went a bit further with actual configuration parameters, but it's the "Identifier" that is critical to building a working "xorg.conf" file. I used the Wiki page above to get the information needed, and used the model of my motherboard as the identifier value. The next thing that is required is a "Monitor" section. Again, this could have as little as the "Identifier" and "Modeline" keys. In my case, this was given the value "E19T6W", but these are just text strings and could just as easily have been "Fred" or "Wilma", just pick something that makes sense for the monitor you have and the way your brain works (and this is the same for all the identifier values). I went further and used information from the User's Manual for my monitor and put in the minimum and maximum values for the horizontal and vertical frequencies, and also put in the physical dimensions of the screen so that things would display at the correct size (12 point fonts should be 12 point fonts in physical dimensions on the screen, etc.). Fyi, I got the values I used by multiplying the dot pitch by the horizontal and vertical resolutions, but verified those numbers with a ruler, and they were correct. It was in the "Monitor" section where the "Modeline" generated by "gtf" went. Finally, there needs to be a "Screen" section that pulls it all together. I gave this section the uninspired "Identifier" of "Default Screen", but here a pointer to the "Device" and "Monitor" sections to use for the screen are included using their identifier names. The rest of that section is pretty much boilerplate (including the "Display" subsection), but it is probably good to have multiple resolutions available in case you want to swap displays out at some point (if the display you are using fries) as there is usually some keyboard combination that allows you to switch video modes on the fly between supported modes.
The final "/etc/X11/xorg.conf" file that worked for me is as follows (note that I used the Modeline label "1440x900" rather than "1440x900_59.89" as provided by the "gtf" program as I didn't need to support multiple versions of the 1440x900 resolution):
PF
Now, before I go any further, full honours to Arun Viswanathan for figuring it out first: http://www.arunviswanathan.com/node/53 ... thank you Arun!!!
Here are the steps: find the manual for your monitor. I have an eMachines E19T6W monitor, and finding the PDF of the User's Manual wasn't hard at all. Next, there were two sections giving technical information... the Specifications section and a section on Video Modes. The Specifications section stated that the monitor had a 1440x900 native pixel configuration (which you always want to use if you can) and a 0.2835mm x 0.2835mm pixel pitch (which gives a display size of about 408mm x 255mm, which is needed for the xorg.conf file eventually). In the video mode section, it specifies a whole bunch of resolutions, but the 1440x900 mode is given as "Mode 15 - VESA 1440x900 - Horizontal Frequency 55.935kHz - Vertical Frequency 59.887Hz - Available in DVI Mode (19-inch Model)? Yes.". The first set of sorcery is the "gtf" and "xrandr" commands. The former automagically generates a Modeline for the resolution setting you want, and the latter allows you to add it and test it out interactively. The second set of sorcery involves permanently setting up an "xorg.conf" file and XFCE configuration to implement it permanently going forward. To interactively test out the hardware, first get the Modeline needed by running "gtf <horizontal resolution in pixels> <vertical resolution in pixels> <vertical refresh rate in Hz>":
gtf 1440 900 59.887which resulted in the output:
# 1440x900 @ 59.89 Hz (GTF) hsync: 55.81 kHz; pclk: 106.27 MHz Modeline "1440x900_59.89" 106.27 1440 1520 1672 1904 900 901 904 932 -HSync +VsyncThis then needs to be used to create that video mode using the "xrandr" program. Note that the word "Modeline" is left off, and also note that I got the tag "VGA-0" as being the port I was using just by running the "xrandr" program with no parameters to get the current state of the display subsystem (it showed VGA-0 connected, and DVI-0 disconnected, which is how my system is configured: I am putting my VGA connection through a KVM so I can share my desktop [in the physical sense] between my server and a desktop PC... I need to get a DVI-capable KVM someday, but it's not a high priority by any means).
xrandr --newmode "1440x900_59.89" 106.27 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync xrandr --addmode VGA-0 1440x900_59.89 xrandr --output VGA-0 --mode 1440x900_59.89And this switched the video mode to 1440x900 (you can check just by running "xrandr" with no parameters)! Now one important thing to be said is it actually looked pretty shitty... but the good news is that this was just an intermediate step and as I type this, the display looks marvy! The solution to the quality of the display and fonts and stuff was a two step process. The first step was to create an "/etc/X11/xorg.conf" file on the system for the particular configuration I was using and to restart X11/XFCE again. After the configuration file was created, XFCE came up in 1024x768 mode (which I presume is a fallback setting because just about everything supports that video mode). Typing "xrandr" showed that "1440x900" was a mode that was now supported, but it had not been selected by XFCE. The second part of the solution was to go to the "mouse menu" (in the lower left corner) and run Settings->Display, select the Resolution "1440x900" from the pulldown, and Apply the change. Once that was done, all the weird font and display quality issues I had doing it the manual way above by forcing the issue with the "xrandr" program went away and I had a beautiful desktop to work from! Yay! Just to be sure, I exited X11/XFCE again and restarted it and the settings stayed, so it's a permanent fix.
Taking a step backward, one of the things that I wasn't sure was set up right was the video hardware. It's the onboard video for the old Asus M4A78LT-M LE motherboard I have in my server (if it ain't broke, don't fix it y'all), and I wasn't sure that the right drivers were being used (I was flailing pretty hard trying to get this to work and followed all sorts of weird paths on my way). I should further mention that I am using the onboard video because my server is really a server and I don't need much in the way of video display hardware capabilities (99.9% of the time, I'm connecting to it over the network from another system running X11 or just through SSH or something, so I hardly ever use the console unless I'm doing serious maintenance on it). The video chip is an ATI 760G class chip (Radeon 3000 family), and I read innumerable old posts about how it was not properly supported by the X servers of the day and more recent posts about how ATI has dropped all support for them from their proprietary drivers for Linux systems. It was not looking good at first, but it turns out there is an open source alternative for this class of video hardware that goes by the name "xf86-video-ati" (and shows up in the kernel output as the "radeon" driver). I initially thought this driver was not being invoked even (as I said it was really hard to find information and much of it was conflicting, confusing, or just plain false), but when I finally knew what to look for, I realized the correct driver was running and that it was simply a configuration issue I was dealing with. The breakthrough here happened when I found a Wiki page on it: https://wiki.archlinux.org/index.php/ATI. Once I had that, it was smooth sailing with the configuration options for the driver and my card (which I have reproduced below).
The last thing I wanted to mention is what is required to create a working "xorg.conf" file. Again, one would think that this would be easily accessible information, but one would be wrong... Not to beat around the bush, the first thing that is needed is a "Device" section. This could be quite simple and only contain key/value pairs for "Identifier" and "Driver". I went a bit further with actual configuration parameters, but it's the "Identifier" that is critical to building a working "xorg.conf" file. I used the Wiki page above to get the information needed, and used the model of my motherboard as the identifier value. The next thing that is required is a "Monitor" section. Again, this could have as little as the "Identifier" and "Modeline" keys. In my case, this was given the value "E19T6W", but these are just text strings and could just as easily have been "Fred" or "Wilma", just pick something that makes sense for the monitor you have and the way your brain works (and this is the same for all the identifier values). I went further and used information from the User's Manual for my monitor and put in the minimum and maximum values for the horizontal and vertical frequencies, and also put in the physical dimensions of the screen so that things would display at the correct size (12 point fonts should be 12 point fonts in physical dimensions on the screen, etc.). Fyi, I got the values I used by multiplying the dot pitch by the horizontal and vertical resolutions, but verified those numbers with a ruler, and they were correct. It was in the "Monitor" section where the "Modeline" generated by "gtf" went. Finally, there needs to be a "Screen" section that pulls it all together. I gave this section the uninspired "Identifier" of "Default Screen", but here a pointer to the "Device" and "Monitor" sections to use for the screen are included using their identifier names. The rest of that section is pretty much boilerplate (including the "Display" subsection), but it is probably good to have multiple resolutions available in case you want to swap displays out at some point (if the display you are using fries) as there is usually some keyboard combination that allows you to switch video modes on the fly between supported modes.
The final "/etc/X11/xorg.conf" file that worked for me is as follows (note that I used the Modeline label "1440x900" rather than "1440x900_59.89" as provided by the "gtf" program as I didn't need to support multiple versions of the 1440x900 resolution):
Section "Device" Identifier "M4A78LT-M LE" Driver "radeon" # software cursor might be necessary on some rare occasions, # hence set off by default Option "SWcursor" "off" # supported on all R/RV/RS4xx and older hardware, is on by default Option "EnablePageFlip" "on" # valid options are XAA, EXA and Glamor. Default value varies per-GPU Option "AccelMethod" "EXA" # enabled by default on all radeon hardware Option "RenderAccel" "on" # enabled by default on RV300 and later radeon cards Option "ColorTiling" "on" # default is off, otherwise on. Only works if EXA activated Option "EXAVSync" "off" # when on increases 2D performance, but may also cause artifacts\ # on some old cards. Only works if EXA activated Option "EXAPixmaps" "on" # default is off, read the radeon manpage for more information Option "AccelDFS" "on" EndSection Section "Monitor" Identifier "E19T6W" HorizSync 30.0-75.1 VertRefresh 50.0-75.0 DisplaySize 408 255 Modeline "1440x900" 106.27 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync EndSection Section "Screen" Identifier "Default Screen" Device "M4A78LT-M LE" Monitor "E19T6W" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 Modes "1440x900" "1280x1024" "1024x768" "800x600" "640x480" EndSubSection EndSectionIf you have been struggling with something similar to this, I hope this helped you...
PF