Ubuntu 6.06 and DPMS

It wasn't until I connected an Apple Cinema Display to my Ubuntu box that I realized that it wasn't the cheap Samsung display's fault it wasn't going to sleep. I had assumed that the Samsung's DPMS support was somehow lacking, because I couldn't believe that DPMS didn't just work out of the box. I couldn't believe that Ubuntu really thought that a jerky fade-to-black that leaves the display on, glowing that dull gray that is what passes for black on an LCD was sensible default behavior.

Turns out I was doing the Samsung an injustice. When the Apple display also failed to go to sleep, I realized it had to be Ubuntu's fault. A quick xset(1) later, and my display when to sleep when the computer had been idle for the time I specified. I went to bed a happy man, thinking I'd edit xorg.conf in the morning and add Option "StandbyTime" "10" (the server and xset(1) use different units; the server measures time in minutes).

In the morning, though, the display's back on. Weird. I read my mail and then, while I got ready for work, the display turned off again. So I go to work, and come back in the evening to find the display's back on. Weird.

I never did find out what turns the display on, but something sure does. Google only seemed to have advice about turning DPMS permanently off.

I decided it served me right for trying to mess around at a low level, and tried to work out how to tell the GUI what I wanted.

The configuration side of things is one of Ubuntu's weakest points. It's an utter dog's dinner. Would sir like "Preferences" or "Administration"? Sir doesn't know? Now, now, sir; are you sure you want to be touching any of these levers? You're clearly not trained for it. Yes, sir, I'm certain Windows and Mac OS don't consider the distinction between preferences and administration necessary, but what would sir expect from the likes of those two? Anyway, isn't sir forgetting the additional choices offered by the "Applications" menu, both "Add/Remove..." (no, I won't tell you what) and the "System Tools" submenu.

It's funny that Mac OS actually has nearly as many icons in its "System Preferences". You don't notice because some thought has gone into their arrangement. Only a few are gratingly arbitrary ("QuickTime" being under "Internet & Network", for example). And navigating around "System Preferences" is a lot less painful that GNOME's odd screen menu bar arrangement; it costs a lot less to choose the wrong panel because there's a handy "back" button.

But back to getting DPMS working on Ubuntu.

Some experimentation (and much cursing) later, I found that between them, "System" > "Preferences" > "Screensaver" and "System" > "Preferences" > "Power Management" both have a hand in making things work. I had to uncheck "Activate screensaver when session is idle" in the screensaver preferences, and move the "Set session as idle after" slider to the time I want the display to sleep after, and I had to set the "Put display to sleep when computer is inactive for" slider in the power management preferences to the same value.

It turned out that this made the display sleep after twice the time I expected, so it seems these values are additive. You can't "set session as idle after" less than 1 minute, so you'll have to subtract a minute from the time you actually want in the power management dialog, or share the time out in some other fashion. Bizarre and awkward.

The "raw" GNOME equivalent on my Debian box at work is clearer, with the display-related power management controls on a tab in the "screensaver" preferences. Ubuntu's quite hit and miss when it comes to their supposed simplifications. Sometimes they do a good job, and other times they make something moderately awkward even more confusing. This is a perfect example of how letting implementation details show through can ruin an interface.

While I'm on the subject of Xorg not being as bad as its friends make it look, I found out that you can disable the stupid "fail to start if there's no mouse attached at boot time" behavior. Add this to your "ServerLayout" section:

Option "AllowMouseOpenFail" "True"

Mac OS and Windows, of course, both do the right thing automatically.

And one final display-related tip: don't be mislead by Apple's claim that "Any dual- or quad-core Power Mac G5 supports two Apple Cinema Displays, including dual-link DVI for one 30-inch model." (http://www.apple.com/displays/specs.html). My dual G5 doesn't have dual-link DVI. It supports a 30" display in the sense that it can display on it, but it doesn't support the 2560x1600 resolution you want. Also, don't assume that you can take a quick glance at the Mac Pro specifications, see "7300 GT" and assume that any 7300 GT has dual-link DVI (even though they all seem to have dual DVI, which is something different entirely). If your graphics card doesn't explicitly say "dual-link DVI" (not "dual DVI"), you'll be disappointed. Apple are pretty clear about the need for dual-link DVI, and the store and box specifications seem to be correct. But that claim on the displays' "tech specs" page is misleading. (The trick, in case you didn't notice, is that they mean "dual-core G5", not "dual G5". What is it with the word "dual"? Someone needs a kick in the plums.)

If you're running Xorg with a 30" display connected and want to know why you're not getting 2560x1600, check /var/log/Xorg.0.log and ensure that it mentions "Internal Dual Link TMDS".

If it does, cull any crap from your xorg.conf and just let it use the EDID information.

If, on the other hand, it says "Single Link", it's a trip to Fry's for you, my boy.