{"id":179,"date":"2015-04-27T13:52:47","date_gmt":"2015-04-27T13:52:47","guid":{"rendered":"http:\/\/www.nerdlingen.de\/?p=179"},"modified":"2018-10-12T09:47:06","modified_gmt":"2018-10-12T08:47:06","slug":"hd-tft-vs-vga-kvm-switch-and-linux","status":"publish","type":"post","link":"https:\/\/www.nerdlingen.de\/?p=179","title":{"rendered":"HD TFT vs. VGA-KVM Switch &#8211; and Linux"},"content":{"rendered":"<p>Multiple Computers at the same Keyboard, Video and Mouse &#8211; no problem when using a KVM Switch. Unfortunately, mine (<a href=\"http:\/\/www.dlink.com\/de\/de\/home-solutions\/connect\/kvm-switches\/dkvm-2ku-2-port-kvm-switch-with-usb-port-and-built-in-cables\">DLink DKVM-2KU<\/a>) does not seem to route the IDx-Pins of the VGA connector correctly, my system was not able to get the required <a href=\"http:\/\/en.wikipedia.org\/wiki\/Extended_Display_Identification_Data\">EDID<\/a> data to know which timings and resolutions are supported by the monitor.<\/p>\n<p>This resulted in a max. resolution of 1360&#215;768 pixels &#8211; way below the native 1920&#215;1080 (which I could easily set when connecting the display directly via DVI or VGA). Most guides to add additional resolutions suggest asking <a href=\"http:\/\/linux.die.net\/man\/1\/gtf\">gtf<\/a> or <a href=\"http:\/\/linux.die.net\/man\/1\/cvt\">cvt<\/a> to calculate the respective timings (where for TFT-Displays CVT-based timings should be used, see e.g. <a href=\"http:\/\/www.uruk.org\/~erich\/projects\/cvt\/\">http:\/\/www.uruk.org\/~erich\/projects\/cvt\/<\/a>) and pasting these to xrandr to set the required mode. However, this does not work if xrandr thinks the monitor cannot take the requested frequencies.<\/p>\n<p>A call to cvt may produce this:<\/p>\n<pre class=\"brush: bash; gutter: true\">X@Y ~ $ cvt 1920 1080\r\n# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz\r\nModeline \"1920x1080_60.00\"\u00a0 173.00\u00a0 1920 2048 2248 2576\u00a0 1080 1083 1088 1120 -hsync +vsync\r\n<\/pre>\n<p>The printed &#8220;modeline&#8221; contains all the timings needed for the card to drive the monitor at the requested resolution, however &#8211; in my case &#8211; adding the requested resolution resulted in an error, basically telling me that one of the parameters was not in a range supported by some device in the chain (DAC or Monitor for example):<\/p>\n<pre class=\"brush: bash; gutter: true\">X@Y ~ $ xrandr --newmode \"1920x1080_60.00\"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync\r\nX@Y ~ $ xrandr --addmode VGA-0 \"1920x1080_60.00\"\r\nX Error of failed request:  BadMatch (invalid parameter attributes)\r\n  Major opcode of failed request:  140 (RANDR)\r\n  Minor opcode of failed request:  18 (RRAddOutputMode)\r\n  Serial number of failed request:  29\r\n  Current serial number in output stream:  30\r\n<\/pre>\n<p>Most forum-threads, guides and Wiki-entires break at this point and say &#8220;Well, your monitor simply cannot do this&#8221;. Mine does, however the system doesn&#8217;t know. The source of the problem was in the X-Org config-file <span style=\"font-face: mono;\">\/usr\/share\/X11\/xorg.conf.d\/90-monitor.conf<\/span> (in this case of <a href=\"https:\/\/www.linuxmint.com\">Linux Mint 17.1<\/a>, although I don&#8217;t know where this file came from &#8211; it doesn&#8217;t seem to be part of the standard system packages), which contained:<\/p>\n<pre class=\"brush: bash; gutter: true\">Section \"Monitor\"\r\n    Identifier     \"Monitor0\"\r\n    VendorName     \"Unknown\"\r\n    ModelName      \"Unknown\"\r\n    HorizSync       30.0 - 63.0\r\n    VertRefresh     55.0 - 75.0\r\n    Option         \"DPMS\"\r\nEndSection\r\n<\/pre>\n<p>When I2C and therefore EDID is working correctly, the file seems to get overruled by the information provided by the monitor &#8211; in my case, EDID didn&#8217;t get past the KVM switch. The modeline calculated by cvt stated a pixel-clock of 172.80\u00a0MHz, together with a total virtual display width of 2576 points. This results in a horizontal refresh-rate of 67\u00a0kHz &#8211; which is higher than the maximum of 63\u00a0kHz given in the file.<\/p>\n<p>Once I fixed this (I set it to 200, which is way to high, but doesn&#8217;t matter here&#8230;), xrandr accepted the mode. If you want this to be permanent, you might configure your X-Server according to <a href=\"http:\/\/community.linuxmint.com\/tutorial\/view\/877\">this guide<\/a> &#8211; but don&#8217;t forget to add the <span style=\"font-face: mono;\">HorizSync<\/span> and <span style=\"font-face: mono;\">VertRefresh<\/span> parameters!<\/p>\n<p><b>But, for haven&#8217;s sake, be careful!<\/b> Setting <b>really<\/b> wrong values will at least leave you without a picture (or an &#8220;Out of Range&#8221; message) for TFT screens, CRTs might get damaged!<\/p>\n<p><strong>Update:<\/strong> There&#8217;s annother error that I came accross when reinstalling the machine recently:<\/p>\n<pre class=\"brush: bash; gutter: false\">X Error of failed request:\u00a0 BadName (named color or font does not exist)<\/pre>\n<p>This time, I simply had to change the name of the mode from &#8220;1920x1080_60.00&#8221; to &#8220;1080p&#8221; &#8211; problem solved. Possibly my Xsession-script did not fail completely and blocked the name for future use&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Multiple Computers at the same Keyboard, Video and Mouse &#8211; no problem when using a KVM Switch. Unfortunately, mine (DLink DKVM-2KU) does not seem to route the IDx-Pins of the VGA connector correctly, my system was not able to get &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.nerdlingen.de\/?p=179\"> <span class=\"screen-reader-text\">HD TFT vs. VGA-KVM Switch &#8211; and Linux<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-179","post","type-post","status-publish","format-standard","hentry","category-english","category-software"],"_links":{"self":[{"href":"https:\/\/www.nerdlingen.de\/index.php?rest_route=\/wp\/v2\/posts\/179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nerdlingen.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nerdlingen.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nerdlingen.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nerdlingen.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=179"}],"version-history":[{"count":8,"href":"https:\/\/www.nerdlingen.de\/index.php?rest_route=\/wp\/v2\/posts\/179\/revisions"}],"predecessor-version":[{"id":276,"href":"https:\/\/www.nerdlingen.de\/index.php?rest_route=\/wp\/v2\/posts\/179\/revisions\/276"}],"wp:attachment":[{"href":"https:\/\/www.nerdlingen.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nerdlingen.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nerdlingen.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}