Much ado about scripting, Linux & Eclipse: card subject to change

Showing posts with label monitor. Show all posts
Showing posts with label monitor. Show all posts

2008-11-06

xorg.conf: Fedora edition

After installing a Fedora 10 preview spin on my new Thinkpad X200 last week, I got to learn yet another way to generate and test an /etc/X11/xorg.conf file. Every time I upgrade my OS, my xorg.conf file gets simpler. I expect one day I won't need one at all!

Where in the past for *ubuntu I've used dpkg-reconfigure -phigh xserver-xorg, with Fedora I needed to discover a new way. Here's what I did.

  1. First, run man startx to see a sample /root/.xinitrc file
  2. Next, create a /root/.xinitrc file
     #!/bin/bash
     xrdb -load $HOME/.Xresources
     xsetroot -solid gray &
     xclock -g 50x50-0+0 -bw 0 &
     xload -g 50x50-50+0 -bw 0 &
     xterm -g 80x24+0-0 &
     screenruler &
     twm
  3. To generate a new config file, you can run:
     startx -- :2 -configure
  4. To test a given config file (other than the default, /etc/X11/xorg.conf):
     startx -- :2 -config /root/xorg.conf.new

The above steps let you be booted graphically @ default resolution, then switch to another vt (CTRL-ALT-F2, for example), log in, and try a new xorg.conf on a different video port without affecting your running instance. To kill a trial X, use CTRL-ALT-BkSp. To switch from vt2 to the existing graphical instance, use CTRL-ALT-F1 or CTRL-ALT-F7 (it should be on vt1 or vt7).

Once I was statisfied that the xorg.conf file worked, I rebooted. On restart, using xfce or gnome, I can now graphically switch from laptop @ 1280x800 to 24" external monitor @ 1600x1200, or run both screens at 1024x768, eg., for presentations.

2008-09-19

915resolution + xorg.conf = Intel 82852/855GM @ 1600x1200x60Hz

Last week I ordered a new Sceptre 24" monitor from Tigerdirect.ca, and this week it arrived, only a few days later. Zero dead pixels, works perfectly -- and the current website price is 22% more! Timing is everything, apparently.

Of course setting up my laptops to play nice with it was another story, but for my Thinkpad T60p, I've managed to get a single display using aticonfig:

aticonfig --initial=dual-head -f
aticonfig --dtop=horizontal --overlay-on=1 --mode2=1920x1200 \
 --resolution=0,1920x1200,1600x1200,1400x1050,1280x1024,1024x768 \
 --resolution=1,1920x1200,1600x1200,1400x1050,1280x1024,1024x768

Granted, I don't have both the laptop and monitor enabled at the moment, but that's probably because I'm trying to push the laptop screen to a res it can't support (1600x1200). I could probably get them to both go to 1400x1050, but so far I'm happy w/ the single screen.

Anyway, the harder project was getting my wife's old R51 to connect to the Sceptre X24, for two reasons: one, its screen is all but dead (still works, but it's as if it's set to a brightness level of 2%); and two, the automatic configuration in Xubuntu kinda sucks for xorg.conf creation.

After a number of searches, attempts, and failures, I finally found a way to push the Intel 82852/855GM (rev 02) card to 1600x1200 at 60Hz. Here's how:

First, install 915resolution 0.5.3-1ubuntu1 from the ubuntu universe repositories. I tried downloading drivers from Intel, but I couldn't compile anything -- xf86-video-intel-2.4.2.tar.bz2, i915Graphics.tar.gz, drm.tar.gz or mesa.tar.gz -- missing dependencies, apparently.

Next, read the README that comes with 915resolution, /usr/share/doc/915resolution/README.Debian. It explains exactly how to use this tool. Here's what I put in my /etc/default/915resolution file:

MODE=3c
XRESO=1920
YRESO=1440
BIT=8

Next, in your xorg.conf, set the Driver to "i810", set the BusID to the value shown by lspci | grep VGA, set HorizSync & VertRefresh to values that will work for your monitor, and then add Display subsections for all the resolutions you want to try to use.

Section "Device"
       Identifier      "Intel Corporation Mobile Integrated Graphics Controller"
       Driver          "i810"
       BusID           "PCI:0:2:0"
       Option "DevicePresence" "true"
       Option "DRI"      "true"
EndSection

Section "Monitor"
 Identifier "Configured Monitor"
 ModelName    "Sceptre X24"
        HorizSync    31 - 80
        VertRefresh  55 - 76
        Option      "DPMS" "true"
EndSection

Section "Screen"
       Identifier      "Default Screen"
       Device          "Intel Corporation Mobile Integrated Graphics Controller"
       Monitor         "Configured Monitor"
       DefaultDepth    16
       SubSection "Display"
               Depth           16
               Modes           "1920x1440_60" "1920x1200_60" "1920x1080_60" "1680x1050_59.883" "1360x768_59.8" "1600x1200_60" 
       EndSubSection
       SubSection "Display"
               Depth           24
               Modes           "1920x1440_60" "1920x1200_60" "1920x1080_60" "1680x1050_59.883" "1360x768_59.8" "1600x1200_60" 
       EndSubSection
EndSection

Note that the most useful thing I managed to find was how to explicitly set display frequencies: for 1600x1200 at 60Hz, use "1600x1200_60". (This was required because xubuntu by default was trying to run at 59Hz and was creating terrible ghosting effects.)

To test out the above configuration, I wrote this little script (based on ideas here):

#!/bin/bash
# start a new X session on head :5, fire an xterm, and 
# launch kruler to measure screen res
# switch between vt sessions with CTRL-ALT-Fx, 
# eg., for vt2, CTRL-ALT-F2.
# I found this new vt with CTRL-ALT-F9
X -novtswitch :5 & xterm -display :5 & kruler -display :5 &

Now, granted, I still can't get 1920x1200x60Hz (the monitor's native resolution), but I may have found a solution: Tritton TRIUV200 See2 Xtreme USB 2.0 to DVI/VGA adapter.

Anyway, using a Kinamax KVM-USB4 USB 4 Port KVM Switch, I've got two laptops sharing the 24" 1600x1200 screen, with room to add up to two more systems. Minimal desktop clutter, maximum productivity.

Now, if I can just figure out a solution to my wife's workspace clutter...

2008-03-21

Multiple monitors & screen real estate

Reading Seva Lapsha's blog got me thinking about my multi-monitor screen usage today. In the past, depending on the type of work I'm doing, I might have one monitor for code and another for testing... eg., Eclipse + a browser for web testing, or main dev Eclipse + a second eclipse for plugin testing, etc.

Or multiple Eclipse instances sharing plugins (one with a workspace which actually contains plugins, the other with a second, empty workspace in which the other projects are imported with Import > Existing Projects). (Why? To keep the contents of the workspaces smaller and to make startup faster, esp. considering bugs like this happy li'l PDT bug.) :)

Since the Eclipse 4.0 path has now started, here's a few ideas for ways to improve the UI experience. I'd like to see Eclipse one day work like GIMP, where detached views show up in the task bar (or maybe they do, it's just KDE that's filtering them? -- I can ALT-TAB between detached windows, but I only see one Eclipse item in my task bar). Or allow detached views to dock against each other into composite view blobs like they do when they're not detached. Or allow me to grab a set of docked tabbed views and detach them all in one go, instead of having to drag each one out, one by one. Or, even better, just let the whole editor area be detachable. And while we're at it, how about the toolbars?

If anyone else agrees with these ideas, please consider opening a bug to track them. Or better yet, bug your PMC so you can become a committer on E4 and contribute to the work effort.

At any rate, I agree with Seva: putting all your panels on one screen and the editor on the other is certainly a handy way to take advantage of all those extra pixels, esp. when your 20" 1600x1200 monitor dies and you're stuck dropping back to a 19" 1280x1024 one. :(

2008-02-13

Dual-Monitor X.Org Configuration In Under 10 Minutes

If the above title shocks you, you're not alone. I'm still reeling from the fact that I was able to get a dual-monitor xorg.conf with almost no effort. Here's the steps:

  1. Check your ATI hardware specs.
    lspci | grep VGA
    01:00.0 VGA compatible controller: ATI Technologies Inc M56GL [Mobility FireGL V5200]
  2. Download the latest proprietary ATI Radeon driver from ati.amd.com.
  3. Quickly scan the documentation.
  4. Install the driver.
    chmod +x ati-driver-installer-8-01-x86.x86_64.run
    ./ati-driver-installer-8-01-x86.x86_64.run
  5. Configure X.Org. In my case, I have my external 1600x1200 monitor to the right of my 1400x1050 Thinkpad T60p. Of course, in "stretch" mode, both screens must be at the same resolution.
    aticonfig --dtop=horizontal --overlay-on=1 --mode2=1600x1200 \
        --resolution=0,1600x1200,1400x1050,1280x1024,1024x768 \
        --resolution=1,1600x1200,1400x1050,1280x1024,1024x768
  6. Restart X (I just hit CTRL-ALT-BkSp). If that breaks things, there's always CTRL-ALT-F1 to get back to a console.
  7. Change wallpaper from Centered to Tiled Maxpect so it's not stretched across both screens.
  8. Note the new K Menu entry for ATI Catalyst Control Center.
Thank you, AMD!