{"id":7950,"date":"2018-07-16T15:19:47","date_gmt":"2018-07-16T15:19:47","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=7950"},"modified":"2018-07-16T15:19:47","modified_gmt":"2018-07-16T15:19:47","slug":"fix-screen-tearing-ubuntu-18-04-optimus-laptops","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2018\/07\/fix-screen-tearing-ubuntu-18-04-optimus-laptops\/","title":{"rendered":"Fix Screen Tearing in Ubuntu 18.04 Optimus Laptops"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/07\/nvidia-logo245.png\" alt=\"Nvidia Linux driver\" width=\"245\" height=\"250\" class=\"aligncenter size-full wp-image-6050\" \/><\/p>\n<p>For Ubuntu 18.04 users plagued by screen tearing issue while using NVIDIA proprietary drivers, this quick tutorial may help you via enable PRIME Synchronization on Optimus.<\/p>\n<p>Screen tearing usually happens on Ubuntu Linux laptop that uses Prime to switch between NVIDIA and Intel drivers.<\/p>\n<p><b>1.<\/b> Open terminal (either via <b>Ctrl+Alt+T<\/b> or by searching for &#8216;terminal&#8217; from software launcher) and run command to create a new config file:<\/p>\n<pre style=\"border:none;\">sudo gedit \/etc\/modprobe.d\/nvidia-drm-nomodeset.conf<\/pre>\n<p>Type your password (no asterisks feedback) when it prompts and hit Enter. <\/p>\n<p><b>2.<\/b> When the file opens after running the previous command, add following line and save the file.<\/p>\n<pre style=\"background:none;\">options nvidia-drm modeset=1<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/nvidia-drm-600x243.jpg\" alt=\"\" width=\"600\" height=\"243\" class=\"aligncenter size-large wp-image-7951\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/nvidia-drm-600x243.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/nvidia-drm-450x182.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/nvidia-drm-768x311.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/nvidia-drm.jpg 821w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><b>3.<\/b> Finally update intramfs and <b>reboot<\/b> your machine.<\/p>\n<pre style=\"border:none;\">sudo update-initramfs -u<\/pre>\n<p>To check if previous changes work after reboot, run command:<\/p>\n<pre style=\"border:none;\">sudo cat \/sys\/module\/nvidia_drm\/parameters\/modeset<\/pre>\n<p>It should output &#8216;Y&#8217;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/check-nvidia-drm-600x127.jpg\" alt=\"\" width=\"600\" height=\"127\" class=\"aligncenter size-large wp-image-7952\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/check-nvidia-drm-600x127.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/check-nvidia-drm-450x95.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/check-nvidia-drm.jpg 764w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><b>In addition, to get much SMOOTHER Nvidia window dragging experience<\/b>, you can also do:<\/p>\n<p>1. Set maximum performance in Nvidia X Server Settings -> PowerMizer.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/nvidia-max-perfor-600x363.jpg\" alt=\"\" width=\"600\" height=\"363\" class=\"aligncenter size-large wp-image-7953\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/nvidia-max-perfor-600x363.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/nvidia-max-perfor-450x272.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/nvidia-max-perfor-768x465.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/nvidia-max-perfor.jpg 973w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>2. If you have MORE than enough RAM, set swap tendency to a MUCH lower value by running command to edit sysctl.conf:<\/p>\n<pre style=\"border:none;\">sudo gedit \/etc\/sysctl.conf<\/pre>\n<p>and add following 2 lines when the file opens:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/reduce-swap-incli-600x383.jpg\" alt=\"\" width=\"600\" height=\"383\" class=\"aligncenter size-large wp-image-7954\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/reduce-swap-incli-600x383.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/reduce-swap-incli-450x288.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/reduce-swap-incli-768x491.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2018\/07\/reduce-swap-incli.jpg 770w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p style=\"text-align:right;\">via: <a href=\"https:\/\/ubuntuforums.org\/showthread.php?t=2374405\" target=\"_blank\">ubuntuforums<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>For Ubuntu 18.04 users plagued by screen tearing issue while using NVIDIA proprietary drivers, this quick tutorial may help you via enable PRIME Synchronization on Optimus. Screen tearing usually happens on Ubuntu Linux laptop that uses Prime to switch between NVIDIA and Intel drivers. 1. Open terminal (either via Ctrl+Alt+T or by searching for &#8216;terminal&#8217; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[656,1556,1555,1527],"class_list":["post-7950","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-nvidia","tag-nvidia-prime","tag-screen-tearing","tag-ubuntu-18-04"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/7950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=7950"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/7950\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=7950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=7950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=7950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}