Multimonitor support in gnome shell

I recently switched to using gnome-shell in my day to day work, and so far I like it a lot. However, I use a dual monitor setup, and the gnome-shell support for multihead was very rudimentary.

Here is an example desktop with a 1920×1080 primary monitor and a 1280×1024 monitor on the left:

And the corresponding overview:

There are a number of issues here:

  • All previews are on a single monitor. So, while we have a lot of space for normal windows with two monitors we need to cram them all into part of a single monitor in overview mode. This makes the windows way to small to be usable.
  • Due to internal issues the part of the overview that shows the windows is always the same aspect ratio as the screen (i.e. the total size of all monitors). This is fine in the case of one monitor, but with two monitors it doesn’t match the monitor aspect ratio making windows even smaller.
  • During the overview switch the windows on the extra monitor fly a long way, making the animation not work really well, as well as breaking the natural grouping of related windows being on the same monitor.
  • The extra monitor space is unused
  • The thumbnails that normally slide in from the side in a slick way instead overlap the other monitor and its hard to make slide in since the mouse enters the other monitor instead.
  • The thumbnails include the “dead” area due to the different sized monitors and generally look weird.

Additionally, but not visible here:

  • Its hard to hit the hot corner on the primary monitor if there is a monitor to the left. (And to hit the menu in the right corner if there is a monitor to the right.)
  • If the top-left monitor is not the primary there is no hot corner in the easy to reach corner, instead you have to mouse into the primary and then try to hit the corner.
  • If another monitor is taller than the primary, its very hard to hit the message tray on the bottom of the primary monitor, as the pointer passed over to the dead area.
  • In most typical cases the external monitor is used to show something static, like always visible information, a presentation on a projector, or a movie on a TV. However, the extra monitors are connected to the same virtual workspaces as the primary, so when you switch workspace the apps on the extra monitors switch around too.

The last few weeks I’ve been working on this, and these changes have now landed in git.

Here is how it looks now:

And the overview:

We can see here:

  • There is a window overview on each monitor, showing the windows on that monitor.
  • The window overview area is not artificially constrained by aspect ratios but as large as it can be, so the windows are larger in the overview.
  • The thumbnails are always slided in if there is a monitor to the right of the primary monitor.
  • The thumbnails only show the primary monitor. This is because the whole workspace feature only affects the primary monitor. Windows on extra monitors stay in place when switching workspaces, only the primary monitor changes.

Additionally some things we can’t see:

  • Every monitor with a natural top-left corner (i.e. the top left monitor, or a monitor to the right that is taller but aligned at the bottom) gets a hot corner that activates the overview.
  • The ever-rocking ajax has added pointer barrier support to the Xserver for us. If this is available (he backported it to Fedora 15, yay!) we add one-sided barriers in the panel and the message tray so that its easier to hit these, even if there are monitors on the sides.
  • Additionally, as part of the pointer barrier support the Xserver now automatically blocks the mouse from entering the dead areas that are not shown on any monitor. This is great if monitors have different resolutions.

These are not enormous changes, but the difference in day to day use in a multimonitor setup is like day and night. These should be in the next release which is out soon, so if you’re a multimonitor user, do try it out!

38 thoughts on “Multimonitor support in gnome shell”

  1. Thank you so much! This was one of my main gripes with Gnome-shell and a killer for me (I use a similar dual monitor setup at home) but now it’s getting at least usable, thank you! 😀

    Now there’s just the issues with the missing maximize/restore buttons, shutdown option and a way to disable the damned hot corners (sorry but I still think hot corners are a usability nightmare).

  2. this work makes the shell over 9000 times better to use for my office dual-monitor set up. OVER 9000!

    kudos, Alex

  3. Thanks for the multi-monitor love.

    Spreading the windows previews over two monitors is better than before…but here are some alternative layout ideas for dual monitor:

    1. One monitor for window previews and the other for workspace management.

    2. One monitor for window previews and the other for “Applications” launcher grid.

  4. The “mouse in dead space” problem is years old (even decades old), thanks to ajax & you for fixing that.

  5. Hey

    Great, as a multi-monitor user of gnome-shell thanks for your efforts!

    Do you think there’ll be an way to have all monitors switch when changing workspace? I know for a lot of the workflows at my workplace (all desktops running GNOME) as much screen real estate as possible is needed on every workspace for data visualisation.

  6. Wow! Looks awesome. I’m on the same boat as Gnomeshell (well, largely Gnome3) was unusable due to oddities with asymmetric dual monitor support.

    Thanks a lot!

  7. o Should the windows from the second monitor be shown in the preview?
    o Should the second monitor have the dark overlay beneath the windows?
    o Would it be better to have a popup on both windows to manage them – such that, when in overlay, the first monitor gets half of the preview on the left, the second monitor gets a second preview on the right. Both should possibly pivot around the left/right divided of the two monitors.

  8. I have commented on this on the mailing list. I really dislike this change.
    I like to use my dual monitors as one big workspace.
    This change meets someone else’s idea of a good configuration at the expense of a long standing configuration.
    I’m told I can dig around in gconf to alter this but really I shouldn’t have to.
    Sorry to be so negative. I was really beginning to get used to g-s but this is a real turn off.

  9. Thanks! That’s going to greatly improve my experience with gnome-shell.

    One question – would it make sense to be able to do this selectively with each monitor.
    for example

    Imagine a laptop connected to an external screen.
    I’m projecting a presentation on the external screen (evince, libre office, etc)
    On the laptop screen I want to open a menu to launch a program while I’m presenting.
    Right now that’d cause both screens to go into the preview mode.
    Ideally I’d like to open apps, on screen 1 while screen 2 remains unchanged.

  10. Just to add my two cents – I have a four monitor setup at home (agree that this is an exception), and a two monitor (laptop + external) at work. At work I really like the default you put in, but my home setup could use all sorts of configurations, I’m still playing with it – so the idea of making the fixed bit configurable per monitor sounds sane to me. I think you picked the correct default (as seen by the yay/nay ratio here).

  11. As Daveh already pointed out, this change breaks things for all the people who have for example two times the same monitor and like to use both as one big workspace.

    It may be the best thing for a Laptop + secondary monitor setup but not for desktops where the monitors are used equally.

    Changing the key “/schemas/desktop/gnome/shell/windows/workspaces_only_on_primary” to false makes workspaces possible for the second display. But it shows all windows on all workspaces in the overview on the second display. Also dragging does not work in all cases.

    In earlier versions of the shell I was able to get the overview working with two monitors nicely. But since the javascript code has grown more complex I am unable to make changes to the UI on my own.

  12. This is a great improvement!

    “This is because the whole workspace feature only affects the primary monitor. Windows on extra monitors stay in place when switching workspaces, only the primary monitor changes.”

    Is this a temporary limitation or a design decision?

  13. This is a really bad move.

    I have two monitors and one TV connected to my computer. I want my both monitors to be as one big workspace that I can switch like I’ve always been able to until you regressed this.
    However, I’d like my TV output to be fixed whatever workspace my two monitors are on.

    This should be pretty trivial to have configurable and it should also be pretty simple to come up with good defaults:

    First of all, you have the connector type available through randr. I have DVI-0, DVI-1 and HDMI-0. Of course the default should be to merge the DVI’s into one big workspace, and the HDMI into a fixed screen.

    Secondly, there are EDID information that provides what display device it really is. A “TV” or “Projector” should by default be fixed, while “Monitors” should be merged into one workspace.

    How could *any* other approach be reasonable, ever?

  14. I’ve tested these changes in Fedora 15. The mouse pointer barrier is just awesome!

    But, the whole “second display is only for fixed information” is debatable. For example, I use a laptop with a small screen and external monitor that is only available at work. But, I do use the larger secondary as an extended desktop, and need to switch between many workspaces.

    Even, If the fixed display is considered to be the common use case, configuration here should be easier.

  15. Hello,
    I agree with Gustaf: It’s an horribly thing that the 2nd screen is fixed. You know, generally, if someone want a 2nd screen, it’s because he need more space on the screen, so if you forbid to have as space as we want with dual screen, it’s nearly as if we had the space divided by all the workspaces we potentially can have with a normal screen config like others window managers have.

    So a option should be very welcomed.
    Thank you for reading me,

  16. Thanks for the work you’ve done, but the second monitor being fixed is a horrible regression. This makes my second monitor completely useless. I can’t think of a single use case where it would be practical to keep a second monitor fixed. Even the projector example you gave isn’t actually practical unless you’re actually FACING your presentation… which is NEVER.

    I’ve been incredibly satisfied with GNOME 3, but I can see this frustrating me away from it permanently if it stays this way.

  17. I usually had multiple workspaces for different projects, left side code / right side documentation, the new way doesn’t allow that organization of one activity per workspace.

    I see the appeal of having a fixed workspace in some cases but it definitively is not for me.

  18. Unless we have the choice to configure this behavior i consider this as a big regression.

    I completely agree with ‘Gustaf’ and ‘aol’. I have 2 identical monitors that i use to organize different projects across multiple workspaces. The fixed screen is really a good thing for the projectors or TVs and in some rare cases.

    I think the Gustaf’s idea is very smart to use randr and EDID information to figure out automatically the default configuration. In all cases users must have the possibility to configure it as they need it.

    In actual situation Gnome 3 is useless for me 🙁
    But i want thank you for mouse pointer barrier which is awesome.

  19. Another “big workspace” user here. I recognize, and respect, that you felt there were problems with multi-monitor support, and did something about it.

    Unfortunately, this is a recurring trend with Gnome 3– Design decisions appear to be based largely on how a particular dev works: “in most typical cases, the extra monitor is designed to show something static”. This may be true for the developer, but it’s not true for me, or a number of other users.

    There s a “displays” control panel. Why isn’t this configured there?

    Finally, while typing this, I’ve had “software updates” for Fedora 15 running in the “fixed” window. The two pop-up messages wouldn’t display until I moved the mouse into the second monitor. Then, I make a typo, and instead of being prompted to try again, authentication fails and I have to start the updates over again.

    There are some REALLY good ideas in Gnome3, and I hope they reach their potential. I just wish there was a bit more focus on making Gnome 3 user-friendly to most of the userbase (“user-friendly” and “gconf” are mutually exclusive).

  20. great! while I knew how to fix calender and date issues in the shell through “gsettings set show-weekdate true” and “ show-date true” I spent days searching for ways to keep my dual head usable!
    Finally ready to switch from ubuntu to fedora…
    thx man

  21. Thanks for your work and for sharing these words, Alex.

    However, this thing about keeping a second monitor contents “pinned” renders my second monitor useless, basically.

    This feature should be configurable via the displays control panel and, IMHO, not the default. It has never been; people have been using multiple monitors for a while; and the number of people giving speeches using a projector (i.e, those who would appreciate this feature, since they don’t actually interact with this second monitor) surely are a low number compared to people actually interacting with the monitor.

    Moreover, it would be nice if you could pick the monitors you want to “pin” via the displays control panel (instead of the more radical “workspaces only on primary monitor”). But again, I believe no monitors should be “pinned” by default.

    Thanks Again, Gnome is beautiful =)

  22. This sounds really great. Me setup seems to be like yours (1920×1200 as main display and a 1280×1024 on the left) and it’s still somewhat sub-optimal.
    Is there any estimate when your changes will make it into Ubuntu packages?

  23. Hi,

    Great change!
    I’m coming form trying gnome shell as is in ubuntu 11.04, so I missed the previous functionality, but form what I can tell of how it worked previously, your patches rock.

    However, I do have a problem with the current workspace functionality.
    My laptop has a small screen, but I have it connected to a monitor with a larger screen, which is where I do most of my work.
    Since I used both of them together, when I change to a different workspace I expect both of them to change, not just one!
    The easy workaround would be to change the physical location of the laptop (left) and the monitor (right), but for desk layout reasons, this is not desirable.

    Would it be possible to provide a configuration flag to adjust the worskpace + dual monitor behaviour? or even better, do some auto config magic to detect what is connected on the other side, and adjust behaviour accordingly (ie, TVS and projectors means static workspace, other monitors mean dynamic workspaces)

  24. I’m afraid I’ve used this for a few days now, and it’s actually worse than it was before. My primary issue is the ‘stickyness’ of the right hand monitor.

    It’s an interesting idea, but I’d rather have the ability to turn it off. It’s a strange move for anyone who has used dual screens for many years suddenly to have one of the screen crippled.

    Can you link to the git commits so it’s easy to work out how to fix this.

  25. Ok guys, here a hint to deactivate the stickyness of the secondary monitor (works for me on natty):

    * start gconf-editor
    * open /desktop/gnome/shell/windows
    * deactivate workspaces_only_on_primary

    Should work fine now. I think this setting should be deactivated by default.
    Would be cool if we could get an overview of this window in the desktop-switcher too.

    Nice work folks!

  26. I followed Carsten’s tips, but it seems for me the workspaces_only_on_primary key has no effect; neither in /desktop/gnome/shell/windows nor in [path to metacity options]. The latter makes sense, though.

    I’m also running Ubuntu Natty.

    Any tips are appreciated.

  27. It’s good to know that multi-monitor support is being worked on, but there are still major problems with it. I have a small monitor (on my laptop) under a large monitor, and for some reason, maximize and window snapping doesn’t work. Maximize makes the window fill about a third of the upper screen, while window side snapping is totally gone. I know this is a rarely used configuration, but it would be nice if everything worked.

  28. You’re not talking about multimonitor here, but only dual head. Is there any chance gnome3 will enter the 21st century and actually support multi-monitor (i.e. 3 or more)??? gnome2 was working far much better

Comments are closed.