]> git.sur5r.net Git - i3/i3/blob - docs/multi-monitor
Add document about the current multi-monitor situation with RandR
[i3/i3] / docs / multi-monitor
1 The multi-monitor situation
2 ===========================
3 Michael Stapelberg <michael+i3@stapelberg.de>
4 March 2010
5
6 …or: oh no, I have an nvidia graphics card!
7
8 == The quick fix
9
10 If you are using the nvidia binary graphics driver, you need to use the
11 +--force-xinerama+ flag when starting i3, like so (in your xsession):
12
13 .Example:
14 ----------------------------------------------
15 exec i3 --force-xinerama -V >>~/.i3/i3log 2>&1 
16 ----------------------------------------------
17
18 == The explanation
19
20 Starting with version 3.ε, i3 uses the RandR (Rotate and Resize) API instead
21 of Xinerama. This is due to the reason that RandR provides more information
22 about your outputs and connected screens than Xinerama does. To be specific,
23 the code which handled on-the-fly screen reconfiguration (meaning without
24 restarting the X server) was a very messy heuristic and most of the time did
25 not work correctly -- that is just not possible with the little information
26 Xinerama offers (just a list of screen resolutions, no identifiers for the
27 screens or any additional information). Xinerama simply was not designed
28 for dynamic configuration.
29
30 So, RandR came up as a more powerful alternative (RandR 1.2 to be specific).
31 It offers all of Xinerama’s possibilities and lots more. Using the RandR API
32 made our code much more robust and clean. Also, you can now reliably assign
33 workspaces to output names instead of some rather unreliable screen identifier
34 (position inside the list of screens, which could change, and so on…).
35
36 As RandR is around for about three years, it seemed like a very good idea to
37 us and it still is a very good one. What we did not expect, however, was the
38 nVidia binary driver. It still does not support RandR (as of March 2010), even
39 though nVidia announced that it will support RandR eventually. What does this
40 mean for you, if you are stuck with the binary driver for some reason (say
41 the free drivers don’t work with your card)? First of all, you are stuck with
42 TwinView and cannot use +xrandr+. While this ruins the user experience, the
43 more grave problem is that the nVidia driver not only does not support dynamic
44 configuration using RandR, it also does not even expose correct multi-monitor
45 information via the RandR API. So, in some setups, i3 will not find any
46 screens, in others it will find one large screen which actually contains both
47 of your physical screens (but it will not know that these are two screens).
48
49 For this very reason, we decided to implement the following workaround: As
50 long as the nVidia driver does not support RandR, an option called
51 +--force-xinerama+ is available in i3. This option gets the list of screens
52 *once* when starting and never updates it. As the nVidia driver cannot do
53 dynamic configuration anyways, this is not a big deal.
54
55 == See also
56
57 For more information on how to use multi-monitor setups, see the i3 User’s
58 Guide.