Friday, May 22, 2009

Vista Multiple Monitors Bug with Terminal Services

If you're running multiple monitors on a Vista machine, and then login to that machine remotely, your remote view will only show the contents of the primary monitor (resized appropriately).

This isn't such a big deal, but if you do this regularly you'll certainly have run across a bug in which the secondary monitor will be reset to its lowest resolution when you log on to the dual monitor Vista machine locally. I think I've blogged about this problem before, but now I have a fix:

When the secondary monitor is stuck at its lowest resolution, do the following:

1) Right click on the desktop and choose Personalize.

2) Click on Display Settings.

3) Adjust the secondary monitor to maximum resolution and click apply.

4) Curse loudly because the monitor resets again to low resolution.

5) Adjust the secondary monitor to maximum resolution and click apply.

6) Goddammit.

7) Disable the secondary monitor and click apply.

8) Adjust the secondary monitor to maximum resolution and enable it.

9) Whatthehellisgoingon?

10) Adjust the secondary monitor to some value between its lowest resolution and maximum and click apply.

11) Eh? For some reason this resolution will stick.

12) Adjust the secondary monitor to its maximum resolution and click apply.

13) Goldarnitall! It'll be back to its lowest resolution.

14) Adjust the secondary monitor to its maximum resolution and click apply.

15) Repeat step 14 until the secondary monitor finally adjusts to maximum resolution.

16) Write blog post.

As you can see, this is a relatively simply procedure. I decompiled the Vista code for setting display resolution, and think I've found the bug (I prettied it up a bit for readability):

if ((userLastLoggedInFrom() == TERMINAL_SERVICES) {
if ((attemptsToChangeResolution() < 35)
&& (rand(100) == 42)) {
setDisplayResultion(requestedValue);
} else {
setDisplayResolution(
(requestedValue < MAXIMUM_RESOLUTION)
? requestedValue : LOWEST_RESOLUTION);
}
}
As you can see, the magic value "35" should probably be something more reasonable, like "23". Perhaps there is a registry hack.

Oh well, this isn't quite as bad as keeping dual monitors working correctly on Ubuntu, for which the only proven solution consists of copying random xorg.conf files from Google searches until you find one that works.

Thursday, May 7, 2009

Server Fault Answers Your IT Questions!

The guys who gave us Stack Overflow have recently begun the private beta of their new site: Server Fault. If you've got an account on Stack Overflow with a reputation above 100 points, then you're eligible to try it out.

For those not in the know, Stack Overflow is a place for asking and answering computer programming questions. Unlike traditional web forums, the Stack Overflow community enforces a strict question and answer policy that allows very little room for back and forth discussion. Along with a very game-like reputation system and wiki-ethic, this results in fairly solid questions with very firm answers.

What makes Stack Overflow so special is that it's fun. Because it's fun, questions get answered fast. Very fast. Really, it's changed the way I think about interacting online when trying to solve a problem. In a traditional forum one might expect an answer to question in a few hours, maybe a few days, and maybe not at all. On Stack Overflow I'm typically seeing my questions answered within 15 minutes. If the question is particularly obscure, maybe an hour or two. The quality of the answers is excellent because your "thread" doesn't die out with people asking questions about your question or taking guesses at the solution.

Anyhow, the Stack Overflow people are bringing this resource to the IT community and man do we need it. The IT community is scattered all over the web with only a few horrible sites like Experts Exchange trying to serve as a catch-all. Hopefully Server Fault will become the one-stop resource that we so badly need.