{"id":66,"date":"2007-08-24T21:22:52","date_gmt":"2007-08-25T05:22:52","guid":{"rendered":"http:\/\/learnbyblogging.com\/?p=66"},"modified":"2007-08-24T21:22:52","modified_gmt":"2007-08-25T05:22:52","slug":"settingcentering-the-horizontal-display-position-on-ubuntu-or-linux","status":"publish","type":"post","link":"https:\/\/learnbyblogging.com\/?p=66","title":{"rendered":"Setting\/Centering the Horizontal Display Position on Ubuntu or Linux"},"content":{"rendered":"<p>Linux is notorious in positioning the horizontal position on your monitor. After installing the Ubuntu on my old Sony Vaio PCV-RX650, which has a Nvidia TNT2 display card, I found the display is shifted to the right, leaving a blank strip on the left and distorted image on the right. This was very annoying. I had to re-adjust the monitor every time. This was one the reasons I gave up on Linux a few years back. You&#8217;d never see this kind of problem on Windows. I&#8217;m determined to find the fix for this.<\/p>\n<p>So, I ventured into Google and found a few tricks to set the display correctly once and for all.<br \/>\nFirst, run the &#8220;xvidtune&#8221; to determine all the parameters needed to adjust the display. See below:<\/p>\n<p><a href='https:\/\/learnbyblogging.com\/wp-content\/uploads\/2007\/08\/xvidtune.png' title='xvidtune.png'><img src='https:\/\/learnbyblogging.com\/wp-content\/uploads\/2007\/08\/xvidtune.png' alt='xvidtune.png' \/><\/a><\/p>\n<p>This software is not really intuitive. You&#8217;d need to click &#8220;left&#8221; or &#8220;right&#8221; and then click &#8220;apply&#8221; to see the effect. Keep doing this until you get the desired screen fit and then click &#8220;show&#8221; to show the parameters on the terminal. Copy the output.<\/p>\n<p>Then gedit or vi the following file \/etc\/X11\/xorg.conf, which I append below:<br \/>\npaste the line in between the &#8220;Monitor&#8221; Section as follows:<\/p>\n<p>Section &#8220;Monitor&#8221;<br \/>\n\tIdentifier\t&#8220;Generic Monitor&#8221;<br \/>\n\tOption\t\t&#8220;DPMS&#8221;<br \/>\n\tHorizSync\t30-83<br \/>\n\tVertRefresh\t55-76<br \/>\n\tModeline &#8220;NV1280x1024&#8221;   135.00   1280 1312 1456 1688   1024 1025 1028 1066 +hsync +vsync<\/p>\n<p>You&#8217;d need to the prefix of &#8220;Modeline&#8221; in front of the line. Notice that I added &#8220;NV&#8221; (or any thing to make it unique) in front of &#8220;1280&#215;1024&#8221;. Well this is really the trick that took me over a couple hours to figure out.  This string &#8220;NV1280x1024&#8221; needs to have a same counter part in the Display Section. In my case, it is as follows:<\/p>\n<p>\tSubSection &#8220;Display&#8221;<br \/>\n\t\tDepth\t\t24<br \/>\n\t\tModes\t\t&#8220;NV1280x1024&#8221;<br \/>\n#\t\tModes\t\t&#8220;1280&#215;1024&#8221; &#8220;1024&#215;768&#8221; &#8220;800&#215;600&#8221; &#8220;640&#215;480&#8221;<br \/>\n\tEndSubSection<\/p>\n<p>Notice that I comment out the original lines and all other Display sections so I can force X display<br \/>\nto use this particular mode I just specified. You may want to have more than one mode after you become more familiar with how the file works.<\/p>\n<p>Save the file then refresh the display by doing<br \/>\nCTRL-ALT-BACKSPACE <\/p>\n<p>The display should be what you intended. If not, keep editing the \/etc\/X11\/xorg.conf file until you get what you want.<br \/>\nThere it is. A bit tedious.<\/p>\n<p>Appendix: My \/etc\/X11\/xorg.conf file contents &#8211; your file may be different.<br \/>\n#=====================================================<br \/>\n# \/etc\/X11\/xorg.conf (xorg X Window System server configuration file)<br \/>\n#<br \/>\n# This file was generated by dexconf, the Debian X Configuration tool, using<br \/>\n# values from the debconf database.<br \/>\n#<br \/>\n# Edit this file with caution, and see the xorg.conf(5) manual page.<br \/>\n# (Type &#8220;man xorg.conf&#8221; at the shell prompt.)<br \/>\n#<br \/>\n# This file is automatically updated on xserver-xorg package upgrades *only*<br \/>\n# if it has not been modified since the last upgrade of the xserver-xorg<br \/>\n# package.<br \/>\n#<br \/>\n# If you have edited this file but would like it to be automatically updated<br \/>\n# again, run the following command:<br \/>\n#   sudo dpkg-reconfigure -phigh xserver-xorg<\/p>\n<p>Section &#8220;Files&#8221;<br \/>\n\tFontPath\t&#8220;\/usr\/share\/fonts\/X11\/misc&#8221;<br \/>\n\tFontPath\t&#8220;\/usr\/share\/fonts\/X11\/cyrillic&#8221;<br \/>\n\tFontPath\t&#8220;\/usr\/share\/fonts\/X11\/100dpi\/:unscaled&#8221;<br \/>\n\tFontPath\t&#8220;\/usr\/share\/fonts\/X11\/75dpi\/:unscaled&#8221;<br \/>\n\tFontPath\t&#8220;\/usr\/share\/fonts\/X11\/Type1&#8221;<br \/>\n\tFontPath\t&#8220;\/usr\/share\/fonts\/X11\/100dpi&#8221;<br \/>\n\tFontPath\t&#8220;\/usr\/share\/fonts\/X11\/75dpi&#8221;<br \/>\n\t# path to defoma fonts<br \/>\n\tFontPath\t&#8220;\/var\/lib\/defoma\/x-ttcidfont-conf.d\/dirs\/TrueType&#8221;<br \/>\nEndSection<\/p>\n<p>Section &#8220;Module&#8221;<br \/>\n\tLoad\t&#8220;i2c&#8221;<br \/>\n\tLoad\t&#8220;bitmap&#8221;<br \/>\n\tLoad\t&#8220;ddc&#8221;<br \/>\n\tLoad\t&#8220;dri&#8221;<br \/>\n\tLoad\t&#8220;extmod&#8221;<br \/>\n\tLoad\t&#8220;freetype&#8221;<br \/>\n\tLoad\t&#8220;glx&#8221;<br \/>\n\tLoad\t&#8220;int10&#8221;<br \/>\n\tLoad\t&#8220;vbe&#8221;<br \/>\nEndSection<\/p>\n<p>Section &#8220;InputDevice&#8221;<br \/>\n\tIdentifier\t&#8220;Generic Keyboard&#8221;<br \/>\n\tDriver\t\t&#8220;kbd&#8221;<br \/>\n\tOption\t\t&#8220;CoreKeyboard&#8221;<br \/>\n\tOption\t\t&#8220;XkbRules&#8221;\t&#8220;xorg&#8221;<br \/>\n\tOption\t\t&#8220;XkbModel&#8221;\t&#8220;pc105&#8221;<br \/>\n\tOption\t\t&#8220;XkbLayout&#8221;\t&#8220;us&#8221;<br \/>\nEndSection<\/p>\n<p>Section &#8220;InputDevice&#8221;<br \/>\n\tIdentifier\t&#8220;Configured Mouse&#8221;<br \/>\n\tDriver\t\t&#8220;mouse&#8221;<br \/>\n\tOption\t\t&#8220;CorePointer&#8221;<br \/>\n\tOption\t\t&#8220;Device&#8221;\t\t&#8220;\/dev\/input\/mice&#8221;<br \/>\n\tOption\t\t&#8220;Protocol&#8221;\t\t&#8220;ImPS\/2&#8221;<br \/>\n\tOption\t\t&#8220;ZAxisMapping&#8221;\t\t&#8220;4 5&#8221;<br \/>\n\tOption\t\t&#8220;Emulate3Buttons&#8221;\t&#8220;true&#8221;<br \/>\nEndSection<\/p>\n<p>Section &#8220;InputDevice&#8221;<br \/>\n\tDriver\t\t&#8220;wacom&#8221;<br \/>\n\tIdentifier\t&#8220;stylus&#8221;<br \/>\n\tOption\t\t&#8220;Device&#8221;\t&#8220;\/dev\/input\/wacom&#8221;<br \/>\n\tOption\t\t&#8220;Type&#8221;\t\t&#8220;stylus&#8221;<br \/>\n\tOption\t\t&#8220;ForceDevice&#8221;\t&#8220;ISDV4&#8221;\t\t# Tablet PC ONLY<br \/>\nEndSection<\/p>\n<p>Section &#8220;InputDevice&#8221;<br \/>\n\tDriver\t\t&#8220;wacom&#8221;<br \/>\n\tIdentifier\t&#8220;eraser&#8221;<br \/>\n\tOption\t\t&#8220;Device&#8221;\t&#8220;\/dev\/input\/wacom&#8221;<br \/>\n\tOption\t\t&#8220;Type&#8221;\t\t&#8220;eraser&#8221;<br \/>\n\tOption\t\t&#8220;ForceDevice&#8221;\t&#8220;ISDV4&#8221;\t\t# Tablet PC ONLY<br \/>\nEndSection<\/p>\n<p>Section &#8220;InputDevice&#8221;<br \/>\n\tDriver\t\t&#8220;wacom&#8221;<br \/>\n\tIdentifier\t&#8220;cursor&#8221;<br \/>\n\tOption\t\t&#8220;Device&#8221;\t&#8220;\/dev\/input\/wacom&#8221;<br \/>\n\tOption\t\t&#8220;Type&#8221;\t\t&#8220;cursor&#8221;<br \/>\n\tOption\t\t&#8220;ForceDevice&#8221;\t&#8220;ISDV4&#8221;\t\t# Tablet PC ONLY<br \/>\nEndSection<\/p>\n<p>Section &#8220;Device&#8221;<br \/>\n\tIdentifier\t&#8220;Generic Video Card&#8221;<br \/>\n\tDriver\t\t&#8220;nv&#8221;<br \/>\n\tBusID\t\t&#8220;PCI:1:0:0&#8221;<br \/>\nEndSection<\/p>\n<p>Section &#8220;Monitor&#8221;<br \/>\n\tIdentifier\t&#8220;Generic Monitor&#8221;<br \/>\n\tOption\t\t&#8220;DPMS&#8221;<br \/>\n\tHorizSync\t30-83<br \/>\n\tVertRefresh\t55-76<br \/>\n\tModeline &#8220;NV1280x1024&#8221;   135.00   1280 1312 1456 1688   1024 1025 1028 1066 +hsync +vsync<\/p>\n<p>EndSection<\/p>\n<p>Section &#8220;Screen&#8221;<br \/>\n\tIdentifier\t&#8220;Default Screen&#8221;<br \/>\n\tDevice\t\t&#8220;Generic Video Card&#8221;<br \/>\n\tMonitor\t\t&#8220;Generic Monitor&#8221;<br \/>\n\tDefaultDepth\t24<br \/>\n#\tSubSection &#8220;Display&#8221;<br \/>\n#\t\tDepth\t\t1<br \/>\n#\t\tModes\t\t&#8220;1280&#215;1024&#8221; &#8220;1024&#215;768&#8221; &#8220;800&#215;600&#8221; &#8220;640&#215;480&#8221;<br \/>\n#\tEndSubSection<br \/>\n#\tSubSection &#8220;Display&#8221;<br \/>\n#\t\tDepth\t\t4<br \/>\n#\t\tModes\t\t&#8220;1280&#215;1024&#8221; &#8220;1024&#215;768&#8221; &#8220;800&#215;600&#8221; &#8220;640&#215;480&#8221;<br \/>\n#\tEndSubSection<br \/>\n#\tSubSection &#8220;Display&#8221;<br \/>\n#\t\tDepth\t\t8<br \/>\n#\t\tModes\t\t&#8220;1280&#215;1024&#8221; &#8220;1024&#215;768&#8221; &#8220;800&#215;600&#8221; &#8220;640&#215;480&#8221;<br \/>\n#\tEndSubSection<br \/>\n#\tSubSection &#8220;Display&#8221;<br \/>\n#\t\tDepth\t\t15<br \/>\n#\t\tModes\t\t&#8220;1280&#215;1024&#8221; &#8220;1024&#215;768&#8221; &#8220;800&#215;600&#8221; &#8220;640&#215;480&#8221;<br \/>\n#\tEndSubSection<br \/>\n#\tSubSection &#8220;Display&#8221;<br \/>\n#\t\tDepth\t\t16<br \/>\n#\t\tModes\t\t&#8220;1280&#215;1024&#8221; &#8220;1024&#215;768&#8221; &#8220;800&#215;600&#8221; &#8220;640&#215;480&#8221;<br \/>\n#\tEndSubSection<br \/>\n\tSubSection &#8220;Display&#8221;<br \/>\n\t\tDepth\t\t24<br \/>\n\t\tModes\t\t&#8220;NV1280x1024&#8221;<br \/>\n#\t\tModes\t\t&#8220;1280&#215;1024&#8221; &#8220;1024&#215;768&#8221; &#8220;800&#215;600&#8221; &#8220;640&#215;480&#8221;<br \/>\n\tEndSubSection<br \/>\nEndSection<\/p>\n<p>Section &#8220;ServerLayout&#8221;<br \/>\n\tIdentifier\t&#8220;Default Layout&#8221;<br \/>\n\tScreen\t\t&#8220;Default Screen&#8221;<br \/>\n\tInputDevice\t&#8220;Generic Keyboard&#8221;<br \/>\n\tInputDevice\t&#8220;Configured Mouse&#8221;<br \/>\n\tInputDevice     &#8220;stylus&#8221;\t&#8220;SendCoreEvents&#8221;<br \/>\n\tInputDevice     &#8220;cursor&#8221;\t&#8220;SendCoreEvents&#8221;<br \/>\n\tInputDevice     &#8220;eraser&#8221;\t&#8220;SendCoreEvents&#8221;<br \/>\nEndSection<\/p>\n<p>Section &#8220;DRI&#8221;<br \/>\n\tMode\t0666<br \/>\nEndSection<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux is notorious in positioning the horizontal position on your monitor. After installing the Ubuntu on my old Sony Vaio PCV-RX650, which has a Nvidia TNT2 display card, I found the display is shifted to the right, leaving a blank strip on the left and distorted image on the right. This was very annoying. I &hellip; <a href=\"https:\/\/learnbyblogging.com\/?p=66\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Setting\/Centering the Horizontal Display Position on Ubuntu or Linux<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-66","post","type-post","status-publish","format-standard","hentry","category-tips-for-computer"],"_links":{"self":[{"href":"https:\/\/learnbyblogging.com\/index.php?rest_route=\/wp\/v2\/posts\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/learnbyblogging.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learnbyblogging.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learnbyblogging.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnbyblogging.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=66"}],"version-history":[{"count":0,"href":"https:\/\/learnbyblogging.com\/index.php?rest_route=\/wp\/v2\/posts\/66\/revisions"}],"wp:attachment":[{"href":"https:\/\/learnbyblogging.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learnbyblogging.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learnbyblogging.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}