{"id":1356,"date":"2020-12-30T12:08:20","date_gmt":"2020-12-30T11:08:20","guid":{"rendered":"https:\/\/codedoneright.eu\/?page_id=1356"},"modified":"2021-04-25T12:07:27","modified_gmt":"2021-04-25T11:07:27","slug":"auxiliary-display-not-detected-laptop","status":"publish","type":"page","link":"https:\/\/codedoneright.eu\/?page_id=1356","title":{"rendered":"Ubuntu \u2013 AMD CPU\/nVidia GPU pairing problem"},"content":{"rendered":"\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If you have an AMD Ryzen CPU paired with nVidia GPU you will run into some problems as Ubuntu does not play well with this pairing.  In order to remedy this you have to tweak configs a bit by yourself.<\/p>\n\n\n\n<p><strong>Cause of the problem: <\/strong>Ubuntu\u2019s prime-select feature still does not work for AMD\/nVidia pairing and requires manual tweaking, it works only for Intel\/nVidia pairing.<\/p>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h6 class=\"wp-block-heading\">Modify <em>\/etc\/X11\/xorg.conf<\/em> if exists, or create if it does not<\/h6>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/X11\/xorg.conf<\/code><\/pre>\n\n\n\n<p>Inside paste the following<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Section \"ServerLayout\"\n  Identifier \"layout\"\n  Option \"AllowNVIDIAGPUScreens\"\nEndSection<\/code><\/pre>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h6 class=\"wp-block-heading\">Modify <em>\/usr\/share\/X11\/xorg.conf.d\/10-amdgpu.conf<\/em> <\/h6>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/usr\/share\/X11\/xorg.conf.d\/10-amdgpu.conf <\/code><\/pre>\n\n\n\n<p>replace<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Driver \"amdgpu\"<\/code><\/pre>\n\n\n\n<p>with<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Driver \"modesetting\"<\/code><\/pre>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h6 class=\"wp-block-heading\">Modify <em>OutputClass<\/em> of <em>\/usr\/share\/X11\/xorg.conf.d\/10-nvidia.conf<\/em> <\/h6>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/usr\/share\/X11\/xorg.conf.d\/10-nvidia.conf <\/code><\/pre>\n\n\n\n<p>by adding<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Option \"PrimaryGPU\" \"Yes\"<\/code><\/pre>\n\n\n\n<p><strong>Caution!<\/strong> This step needs to be repeated after every nVidia driver update.<\/p>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h6 class=\"wp-block-heading\">Create two files named <em>optimus.desktop<\/em> in the following locations<\/h6>\n\n\n\n<ul><li>\/etc\/xdg\/autostart\/<\/li><li>\/usr\/share\/gdm\/greeter\/autostart\/<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/xdg\/autostart\/optimus.desktop\nsudo nano \/usr\/share\/gdm\/greeter\/autostart\/optimus.desktop<\/code><\/pre>\n\n\n\n<p>Inside both paste the following<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Desktop Entry]\nType=Application\nName=Optimus\nExec=sh -c \"xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto\"\nNoDisplay=true\nX-GNOME-Autostart-Phase=DisplayServer<\/code><\/pre>\n\n\n\n<p><strong>Caution!<\/strong> <em>Exec&#8230;<\/em> line is long, make sure it is actually one line<\/p>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h6 class=\"wp-block-heading\">After all files have been modified correctly \u2013 reboot<\/h6>\n\n\n\n<div style=\"height:56px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Greeter displayed on the wrong screen<\/h4>\n\n\n\n<p><strong>Caution!<\/strong> If you have the auxiliary display plugged in, greeter might be displayed only on the auxiliary monitor! Mouse movement can be restricted to that monitor as well!<\/p>\n\n\n\n<ul><li>Open Ubuntu <em>Settings<\/em><\/li><li>Navigate to <em>Displays<\/em><\/li><li>Select Single <em>Display option<\/em><\/li><li>Set <em>Primary Display<\/em> to <em>1 Built-in display<\/em><\/li><li>Click <em>Apply<\/em><ul><li>You should have only your laptop display working right now<\/li><\/ul><\/li><li>Go back to <em>Displays<\/em> settings and set them however you like now<ul><li>Displays should work correctly now<\/li><\/ul><\/li><li>To force greeter on built-in display open terminal and run the following<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ~\/.config\nsudo cp monitors.xml \/var\/lib\/gdm3\/.config\/<\/code><\/pre>\n\n\n\n<p>Now everything should be set-up correctly<\/p>\n\n\n\n<p><strong>Source:<\/strong> <a href=\"https:\/\/forums.developer.nvidia.com\/t\/nvidia-xconfig-doesnt-do-what-i-want-it-to-nor-does-nvidia-settings\/107883\/7\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/forums.developer.nvidia.com\/t\/nvidia-xconfig-doesnt-do-what-i-want-it-to-nor-does-nvidia-settings\/107883\/7<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have an AMD Ryzen CPU paired with nVidia GPU you will run into some problems as Ubuntu does not play well with this pairing. In order to remedy this you have to tweak configs a bit by yourself.&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1354,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ubuntu \u2013 AMD CPU\/nVidia GPU pairing problem &#8212; Code Done Right!<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codedoneright.eu\/?page_id=1356\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Ubuntu \u2013 AMD CPU\/nVidia GPU pairing problem &#8212; Code Done Right!\" \/>\n<meta name=\"twitter:description\" content=\"If you have an AMD Ryzen CPU paired with nVidia GPU you will run into some problems as Ubuntu does not play well with this pairing. In order to remedy this you have to tweak configs a bit by yourself.&hellip;\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codedoneright.eu\/?page_id=1356\",\"url\":\"https:\/\/codedoneright.eu\/?page_id=1356\",\"name\":\"Ubuntu \u2013 AMD CPU\/nVidia GPU pairing problem &#8212; Code Done Right!\",\"isPartOf\":{\"@id\":\"https:\/\/codedoneright.eu\/#website\"},\"datePublished\":\"2020-12-30T11:08:20+00:00\",\"dateModified\":\"2021-04-25T11:07:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/codedoneright.eu\/?page_id=1356#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codedoneright.eu\/?page_id=1356\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codedoneright.eu\/?page_id=1356#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codedoneright.eu\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Desktop OS tricks\",\"item\":\"https:\/\/codedoneright.eu\/?page_id=1354\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ubuntu \u2013 AMD CPU\/nVidia GPU pairing problem\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codedoneright.eu\/#website\",\"url\":\"https:\/\/codedoneright.eu\/\",\"name\":\"Code Done Right!\",\"description\":\"Raspberry Pi server guides\",\"publisher\":{\"@id\":\"https:\/\/codedoneright.eu\/#\/schema\/person\/50378701e349dbd5d40888bc5b532568\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codedoneright.eu\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/codedoneright.eu\/#\/schema\/person\/50378701e349dbd5d40888bc5b532568\",\"name\":\"CodeDoneRight\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codedoneright.eu\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/codedoneright.eu\/wp-content\/uploads\/www_icon.png\",\"contentUrl\":\"https:\/\/codedoneright.eu\/wp-content\/uploads\/www_icon.png\",\"width\":120,\"height\":120,\"caption\":\"CodeDoneRight\"},\"logo\":{\"@id\":\"https:\/\/codedoneright.eu\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/codedoneright.eu\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ubuntu \u2013 AMD CPU\/nVidia GPU pairing problem &#8212; Code Done Right!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codedoneright.eu\/?page_id=1356","twitter_card":"summary_large_image","twitter_title":"Ubuntu \u2013 AMD CPU\/nVidia GPU pairing problem &#8212; Code Done Right!","twitter_description":"If you have an AMD Ryzen CPU paired with nVidia GPU you will run into some problems as Ubuntu does not play well with this pairing. In order to remedy this you have to tweak configs a bit by yourself.&hellip;","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/codedoneright.eu\/?page_id=1356","url":"https:\/\/codedoneright.eu\/?page_id=1356","name":"Ubuntu \u2013 AMD CPU\/nVidia GPU pairing problem &#8212; Code Done Right!","isPartOf":{"@id":"https:\/\/codedoneright.eu\/#website"},"datePublished":"2020-12-30T11:08:20+00:00","dateModified":"2021-04-25T11:07:27+00:00","breadcrumb":{"@id":"https:\/\/codedoneright.eu\/?page_id=1356#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codedoneright.eu\/?page_id=1356"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/codedoneright.eu\/?page_id=1356#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codedoneright.eu\/"},{"@type":"ListItem","position":2,"name":"Desktop OS tricks","item":"https:\/\/codedoneright.eu\/?page_id=1354"},{"@type":"ListItem","position":3,"name":"Ubuntu \u2013 AMD CPU\/nVidia GPU pairing problem"}]},{"@type":"WebSite","@id":"https:\/\/codedoneright.eu\/#website","url":"https:\/\/codedoneright.eu\/","name":"Code Done Right!","description":"Raspberry Pi server guides","publisher":{"@id":"https:\/\/codedoneright.eu\/#\/schema\/person\/50378701e349dbd5d40888bc5b532568"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codedoneright.eu\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/codedoneright.eu\/#\/schema\/person\/50378701e349dbd5d40888bc5b532568","name":"CodeDoneRight","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codedoneright.eu\/#\/schema\/person\/image\/","url":"https:\/\/codedoneright.eu\/wp-content\/uploads\/www_icon.png","contentUrl":"https:\/\/codedoneright.eu\/wp-content\/uploads\/www_icon.png","width":120,"height":120,"caption":"CodeDoneRight"},"logo":{"@id":"https:\/\/codedoneright.eu\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/codedoneright.eu"]}]}},"_links":{"self":[{"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages\/1356"}],"collection":[{"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1356"}],"version-history":[{"count":9,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages\/1356\/revisions"}],"predecessor-version":[{"id":1688,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages\/1356\/revisions\/1688"}],"up":[{"embeddable":true,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages\/1354"}],"wp:attachment":[{"href":"https:\/\/codedoneright.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}