Twinview and gaming

2006-11-12 11:27:36 PST

Tags:

My desktop uses an NVidia 5900 and Twinview to split my desktop across two monitors. It's super cool. Except when I need to play a game and the game view is also split across two windows. Then it's just unusable. The previous solution I'd been using was a simple shell script 'gamerun' which spawned a second X session with a single monitor configuration. No problem. Except that each time X had a major upgrade it broke (xfree -> xorg, xorg 6.8 -> xorg 6.9, xorg 6.9 -> xorg 7.1). I repaired it before, but this time it was giving me some error about font locking (?) and so I temporarily abandoned that plan and did some googling. And I found a much more elegant solution. The reason a game is spread a across two monitors is that the closest fitting resolution it can find is one that is double wide, so it picks that one and centers itself. To fix this, find your twin view meta modes in xorg.conf that should look like this:

Option "MetaModes" "1280x1024,1280x1024; 1024x768,1024x768; 800x600,800x600; 640x480,640x480"

and replace it with this:

Option "MetaModes" "1280x1024,1280x1024; 1280x1024,NULL; 1024x768,1024x768; 1024x768,NULL; 800x600,800x600; 800x600,NULL; 640x480,640x480, 640x480,NULL"

The X server can now supply the exact resolutions a game is asking for. We've now moved the decision on where to place the game to the X server and by declaring the second monitor as NULL we've told the X server to only use the first monitor.

Problem solved.

Leave a Reply

Valid XHTML 1.0!
Valid CSS!
Mindstab.net is proudly powered by WordPress
Entries (RSS) and Comments (RSS).
20 queries. 0.294 seconds.