{"id":338,"date":"2010-04-10T22:26:12","date_gmt":"2010-04-10T22:26:12","guid":{"rendered":"http:\/\/blog.cyberwizzard.nl\/?p=338"},"modified":"2016-03-19T17:48:27","modified_gmt":"2016-03-19T16:48:27","slug":"multi-monitor-with-kde-4-and-xrandr","status":"publish","type":"post","link":"https:\/\/blog.cyberwizzard.nl\/?p=338","title":{"rendered":"Multi-monitor with KDE 4 and XRandR"},"content":{"rendered":"<p>One of the annoyances I&#8217;ve had with *nix so far was the apparent lack of multi-monitor control from the GUI. I&#8217;ve have experience with TwinView using <code class=\"not-hl\">xorg.conf<\/code>, which worked fine but was quite a hassle to set up.<\/p>\n<p>A side effect of this is the fact that once set up, I never touched the configuration again. For a computer with 2 screens hooked up permanently, this is fine. For a laptop which is dragged along and connected to beamers, TVs and monitors &#8211; not so much.<\/p>\n<p>The good news is that I run a modern linux distro which led me to believe that the multi-monitor stuff should be enabled by default. However, I am not using Kubuntu (which would probably auto-enable all new toys for me) but rather I am using Gentoo. So it took some digging to figure out what is going on these days and how to use it. On a side note: you could use <code class=\"not-hl\">nvidia-settings<\/code> instead after plugging something in but I&#8217;d rather use the automatic method.<\/p>\n<p>First a word of warning: <strong>the binary NVidia drivers do not support RandR 1.2<\/strong>. I have the 195.xx drivers installed and NVidia expressed back in 2007 that RandR 1.2 support was a &#8216;priority&#8217; feature. One that apparently needed more than <em>3 years<\/em> to be released. This means that using the binary &#8216;nvidia&#8217; driver will give you RandR 1.1 which does not support the on-the-fly hotplug for displays. Instead you are forced to use TwinView, define meta-modes for every possible configuration and switch to those using &#8216;xrandr&#8217; (or use the nvidia-settings tool each time).<\/p>\n<p>Since this sort of defies having RandR 1.2 support altogether in Xorg, I decided to ditch the binary nvidia driver in favor of &#8216;nouveau&#8217;: the open-source replacement for &#8216;nv&#8217; with decent 2D acceleration support (although I couldn&#8217;t resist and enabled the highly experimental Gallium3D support as well).<\/p>\n<p>To start off: trim down your Xorg configuration to a minimum, note that a recent Xorg is needed (I have 7.4 at the time of writing). This is needed to enable the auto-detection of many things or rather: manually specifying properties will override auto-detected settings and cripple Xorg&#8217;s ability to handle everything on its own. As an example, I have included my own <code class=\"not-hl\">xorg.conf<\/code> below.<\/p>\n<pre class=\"code not-hl\">Section &quot;ServerLayout&quot;\n  Identifier &quot;Default Layout&quot;\n  Screen 0 &quot;Screen0&quot;\nEndSection\n\nSection &quot;ServerFlags&quot;\n  Option &quot;AutoAddDevices&quot; &quot;true&quot;\n  Option &quot;AutoEnableDevices&quot; &quot;true&quot;\nEndSection\n\nSection &quot;Device&quot;\n  Identifier &quot;nVidia_8600M_GS_nouveau&quot;\n  Driver &quot;nouveau&quot;\n  Boardname &quot;GeForce 8600M GS&quot;\nEndSection\n\nSection &quot;Screen&quot;\n  Identifier &quot;Screen 0&quot;\n  Device &quot;nVidia_8600M_GS_nouveau&quot;\n  Monitor &quot;Monitor 0&quot;\n  SubSection &quot;Display&quot;\n    Modes &quot;1680x1050&quot;\n  EndSubSection\nEndSection\n\nSection &quot;Monitor&quot;\n  Identifier &quot;Monitor 0&quot;\n  VendorName &quot;Primary Monitor&quot;\n  Option &quot;DPMS&quot;\nEndSection\n\nSection &quot;Extensions&quot;\n  Option &quot;Composite&quot; &quot;Enable&quot;\nEndSection<\/pre>\n<p>The &#8216;ServerFlags&#8217; section is pretty simple: use every auto-detection known in Xorg to hotplug devices. This means both monitors and input devices like mouses and keyboards.<\/p>\n<p>Next up are the 2 sections for my NVidia display card. Since I am using &#8216;nouveau&#8217; instead of &#8216;nvidia&#8217;, make sure you are not loading &#8216;glx&#8217; somewhere (if you were using &#8216;nvidia&#8217; in the past like me, you most likely have that somewhere).<\/p>\n<p>The last 2 sections are fairly simple as well but note that I do specify the native resolution of my LCD screen as the preferred resolution.<\/p>\n<p>Thats it! Restart your X server and run <code class=\"not-hl\">xrandr<\/code> so see the result. I plugged a VGA monitor in my notebook and this is the result:<\/p>\n<pre class=\"code hl hl-bash\">cyberwizzard<span class=\"sy0\">@<\/span>cyberxps ~ $ xrandr\nScreen <span class=\"nu0\">0<\/span>: minimum <span class=\"nu0\">320<\/span> x <span class=\"nu0\">200<\/span>, current <span class=\"nu0\">2960<\/span> x <span class=\"nu0\">1050<\/span>, maximum <span class=\"nu0\">8192<\/span> x <span class=\"nu0\">8192<\/span>\nLVDS-<span class=\"nu0\">1<\/span> connected 1680x1050+<span class=\"nu0\">0<\/span>+<span class=\"nu0\">0<\/span> <span class=\"br0\">&#40;<\/span>normal left inverted right x axis y axis<span class=\"br0\">&#41;<\/span> 331mm x 207mm\n1680x1050\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.0<\/span><span class=\"sy0\">*<\/span>+\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\n1400x1050\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\n1280x1024\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">59.9<\/span>\n1280x960\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">59.9<\/span>\n1152x864\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\n1024x768\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">59.9<\/span>\n800x600\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">59.9<\/span>\n640x480\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">59.4<\/span>\n720x400\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">59.6<\/span>\n640x400\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\n640x350\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">59.8<\/span>\nHDMI-<span class=\"nu0\">1<\/span> disconnected <span class=\"br0\">&#40;<\/span>normal left inverted right x axis y axis<span class=\"br0\">&#41;<\/span>\nVGA-<span class=\"nu0\">1<\/span> connected 1280x1024+<span class=\"nu0\">1680<\/span>+<span class=\"nu0\">0<\/span> <span class=\"br0\">&#40;<\/span>normal left inverted right x axis y axis<span class=\"br0\">&#41;<\/span> 312mm x 234mm\n1680x1050\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">74.9<\/span> +\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\n1280x1024\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">85.0<\/span><span class=\"sy0\">*<\/span>+\u00a0\u00a0 <span class=\"nu0\">75.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\n1792x1344\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\n1920x1200\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">59.9<\/span>\n1600x1200\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">75.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">70.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">65.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\n1400x1050\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">85.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">74.9<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\n1440x900\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">84.8<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">75.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">59.9<\/span>\n1280x960\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">85.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\n1360x768\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\n1280x800\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">84.9<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">74.9<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">59.8<\/span>\n1152x864\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">75.0<\/span>\n1280x768\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">84.8<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">74.9<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">59.9<\/span>\n1024x768\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">100.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">85.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">75.1<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">75.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">70.1<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">43.5<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">43.5<\/span>\n832x624\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">74.6<\/span>\n800x600\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">85.1<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">72.2<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">75.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.3<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">56.2<\/span>\n848x480\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\n640x480\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">85.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">75.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">72.8<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">72.8<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">66.7<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">60.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">59.9<\/span>\n720x400\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">85.0<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">87.8<\/span>\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">70.1<\/span>\n640x400\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">85.1<\/span>\n640x350\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"nu0\">85.1<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>One of the annoyances I&#8217;ve had with *nix so far was the apparent lack of multi-monitor control from the GUI. I&#8217;ve have experience with TwinView using xorg.conf, which worked fine but was quite a hassle to set up. A side effect of this is the fact that once set up, I never touched the configuration [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[300,327,253,440,397,441],"class_list":["post-338","post","type-post","status-publish","format-standard","hentry","category-how-tos","tag-kde","tag-kde4","tag-linux","tag-nouveau","tag-nvidia","tag-xorg"],"views":2980,"_links":{"self":[{"href":"https:\/\/blog.cyberwizzard.nl\/index.php?rest_route=\/wp\/v2\/posts\/338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.cyberwizzard.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.cyberwizzard.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.cyberwizzard.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.cyberwizzard.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=338"}],"version-history":[{"count":3,"href":"https:\/\/blog.cyberwizzard.nl\/index.php?rest_route=\/wp\/v2\/posts\/338\/revisions"}],"predecessor-version":[{"id":550,"href":"https:\/\/blog.cyberwizzard.nl\/index.php?rest_route=\/wp\/v2\/posts\/338\/revisions\/550"}],"wp:attachment":[{"href":"https:\/\/blog.cyberwizzard.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.cyberwizzard.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.cyberwizzard.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}