Why dual screens are still fail in Linux

Dual screen support is made of fail on Linux. In this post, you will learn why. I reference Ubuntu 9.04, but it applies to other distributions also. It is my hope that by documenting some of the problems, I will add intangible weight to the issue and make whoever fixes it feel good about their work.

Let’s walk through setup, shall we? First, you are required to log out after initially adding a second monitor to the system. I understand why this is, but it’s lame. I hoped that Ubuntu 9.04 would have had some magic way of fixing this. Apparently not.

Now, suppose the user is actually using the secondary monitor which has a smaller vertical resolution . One very nice feature of many window managers is edge resistance — when a window is close to the edge of the screen, it will sort of cling to the edge a little. This is usually what the user wants. As it currently stands, this is broken. The screen is treated as a big rectangle with smaller rectangular views overlayed on top of it — the monitors. The edges windows resist are on the big rectangle, not the smaller ones. This means that an edge on the smaller secondary monitor will not have resistance. This is inconsistent with the larger monitor, which is bad.

Finally, let us think about laptops. A large number of dual screen users are also laptop users, because laptops don’t usually have very big screens, and because pretty much all laptops (even low end ones) support dual screens. Laptops, being as portable as they are, have a tendency to be used in multiple locations. Some of these locations might have dual screens; some might not. When you leave a location which has dual screens, your first inclination is to unplug the second screen. Unfortunately, any windows which were visible on the second screen are now not visible at all. They now exist in a magic imaginary space off to the side of your primary screen. If you put the laptop into a power-saving mode like sleep or hibernate before pulling the second monitor out, you will have the same problem. The only solution is to end your session by shutting down the computer or restarting X11.

Advanced users will overcome this quirk by either moving all their windows off the secondary screen before unplugging it, or holding down a meta key and making blind grabs into the void in hopes of fishing out a desired window. Meanwhile, Microsoft Windows handles this issue easily. It simply moves all the windows that were on the secondary screen onto the primary screen. Why can’t X, xrandr, or the window manager do that?

About these ads

6 Responses to “Why dual screens are still fail in Linux”

  1. 1 phanboy_iv May 6, 2009 at 11:52 am

    Easy. Nobody’s coded it yet.

    As you know a lot of this kind of thing has to do with the somewhat outdated design of the X server stack, fortunately that seems to be getting better. It’ll happen if enough people want it.

  2. 2 James May 6, 2009 at 2:10 pm

    Everyone who uses dual screens on a laptop wants these features. The third one is a pretty large pain.

    At least part of it is also dependent on the window manager. Openbox handles edge resistance scenario described in the post just fine.

    I ran across this thing today which says gnome-settings-daemon actually watches for changes on Xrandr. http://www.gnome.org/~federico/news-2009-03.html

    This makes me happy. A Gnome-centric fix will likely be in the next release. ^_^ Of course, an Xorg-level fix would be ideal. But on the other hand, it’s also a pretty big issue and they haven’t fixed it for years and years. So I suppose and gnome-settings-daemon hack is the next best thing. :-)

  3. 3 jose September 5, 2009 at 6:07 pm

    > It simply moves all the windows that were on the secondary screen onto the primary screen.

    no more unaccessible windows with current version (1.3.1) of xrandr. tested with

    xrandr –output VGA-0 –right-of LVDS –mode 1280x1024_60.00
    xrandr –output VGA-0 –off

    windows correctly moved to primary desktop after disabling output:

    firefox, google chromium, vlc, roxterm

    wm used:
    openbox 3.4.7

    in order to have the windows moved automatically when unplugging monitor a udev rule would need to be added though

  4. 4 James October 21, 2009 at 2:22 am

    Indeed! I realised this evening that simply running the command “xrandr” after plugging in (or unplugging) my external monitor would automatically set up my monitors properly. It probably works because of pre-existing configuration from doing things manually for the past several months, but still. Win!

  5. 5 James October 21, 2009 at 2:23 am

    Now I just need to figure out how to make the command run automatically when I jack in. :-P

  6. 6 Paul-Sebastian Manole March 17, 2010 at 12:21 pm

    Well, a lot of extensions (functionality) that would make things a little bit more natural (more automatic, ie. not quite a desktop-linux word) are there but they just aren’t used yet.

    What would it mean to move windows from one desktop to the other when unplugging a second monitor? It would mean video card driver support for sending the required notification (the notification bus is already there) and a window manager that would actually adapt to the change and move the windows accordingly. Pretty simple. I mean there’s no need of a separate daemon for example, or something like that. There just isn’t any pressure to implement this.

    With AMD opensourcing the ATI drivers and the new ATI Eyefinity technology, I suppose that if ATI cards become better supported and faster than NVIDIA cards on Linux, 6 monitor output will come first to Linux then the neat tricks you were talking about.

    There just needs to be some interest in this and some user-base. But this will only happen if the drivers would allow it.

Comments are currently closed.

RSS Status

  • An error has occurred; the feed is probably down. Try again later.


Creative Commons License
This stuff is licensed under a Creative Commons License.


Get every new post delivered to your Inbox.

Join 39 other followers

%d bloggers like this: