Dear Xinerama: Goodbye, and Good Riddance
Having used many distros of Linux with a variety of graphics cards during the past five or so years, I’ve had plenty of opportunities to get my hands dirty with xorg.conf. When I eventually got an Nvidia card and discovered nvidia-settings, it was great to not have to mess with xorg.conf any moreā¦or not. I still had to read up on xorg.conf options whenever I wanted to do something fancy, but I found nvidia-settings to be a useful tool for generating xorg.confs that I could later modify.
A few years ago I started using two monitors with my desktop computer. In nvidia-settings I had two options for configuring the monitors: either with TwinView or Separate X servers. Separate X servers is hugely annoying, so that was out. TwinView made my window manager (Fluxbox, at the time) think that I basically had one screen. This meant that maximizing applications caused them to fill both screens. It also meant that no edge snapping occurred at the border between the monitors. I have seen experienced the same behavior with TwinView in Xfce. This means that for at least two years I’ve associated TwinView with pure suck.
The solution I found was Xinerama. This is an X extension that allows for more logical multi-screen behavior. Unfortunately, it has some downsides. It is slow (although having a fairly fast video card I never noticed this), and it does not work with compositing. So, no shadows, transparency, or other fanciness. I decided that having two monitors (without retarded edge behavior) was more important than super-shiny glowing translucent windows with drop shadows, so I’ve lived without compositing as long as I’ve used two monitors.
About an hour ago, while setting up Ubuntu on my dad’s computer (which also has two monitors), I ran into the same exact issue. TwinView made Gnome think that I only had one big monitor, and turning on Xinerama disabled compositing. This was more noticeable in Gnome, though, because without compositing you don’t have fancy alt-tabbing and dragging a window to the edge of the screen doesn’t move it to the next workspace, among several other annoyances. When I checked the Ubuntu forums, the consistent advice I saw was to disable Xinerama and use TwinView. This made no sense to me, but I kept fiddling with it. After at least an hour of disabling and enabling Xinerama, playing with the xorg.conf, restarting X, and reading the Xorg log, everything suddenly started working. With Xinerama disabled, Gnome suddenly started understanding that there were two separate screens. Windows were maximizing. Compositing was working. Birds were singing.
But what had changed? After poking around on Google for a while, I figured out that TwinView, which I’d written off as basically a pile of shit a long time ago, can send the WM Xinerama info (e.g., where the break between the screens is). When this works properly, there’s really no reason (that I can discern) to use Xinerama at all. Apparently it’s aimed more at people with cards that don’t support a solution like TwinView or MergedFB. Also, there’s a little option you can set in the Device section of xorg.conf:
Option "NoTwinViewXineramaInfo"
to turn this feature of TwinView off. As best I can figure, one of two things was occurring:
- For reasons unknown, nvidia-settings likes to set this option and in all my mangling of xorg.conf I’d managed to get one that didn’t include it.
- That option had not been set but Gnome had temporarily been ignoring the Xinerama info before getting its shit together.
If the first one is the case, then that was also my problem in the past on my own computer and I’ll be fixing it first thing when I get my hands on it (I don’t have access to it at the moment). If the second is the case, then maybe Xfce doesn’t use the Xinerama info properly with TwinView. This would probably be a deal-breaker that would cause me to switch to Gnome. I kind of doubt this is the case though, considering how perfectly Xfce does work with Xinerama enabled. Regardless, it’s great to no longer have to use Xinerama.
Before I got this working, this was going to be a rant about the state of dual screens in Linux and nvidia-settings in particular. I’m going to go ahead and mention two that still annoy me about nvidia-settings:
- It doesn’t require root access. Now, with XRandR or whatever you can make some changes without being root, so that may be the reasoning there. However, I just use the command xrandr to do this, and every time I use nvidia-settings I’m trying to make a new xorg.conf. I usually forget to run it as root, so when I’m done making my changes I have to save the file to my home directory and move it manually. This isn’t a huge deal, but it happens just about every time.
- If you are going to use Xinerama, you have enable separate X screens before it reveals the Xinerama checkbox. Why not make Xinerama a separate option in addition to TwinView and separate X servers?
Additionally, Gnome doesn’t let you set separate wallpapers, so the best option is basically to make one image from two separate wallpapers. I’m hoping that this functionality can be added; Xfce already does it properly.
On the whole, though, the dual monitor situation is pretty good. After the initial annoyance of getting it set up it pretty much works. This is much better than the Nvidia situation on Windows, where it likes to forget half of my settings periodically and makes me reboot after making trivial changes.
No comments yet.