Trying to set up monitor rotation (nvidia) in 18.04





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















I had this working fine in 16.04 on a very similar machine.



What I want: I want to tell X to start with a particular display rotated, if it's present. I also want to use the nvidia driver, not nouveau, and have decent performance without screen-tearing.



I don't care either way about "nvidia Prime", but so far as I can tell it's why this isn't working, so my guess is I want it burned, purged with fire, destroyed, removed, and otherwise completely prevented from ever interacting with me or my laptop again. I do not care about the marginal impact on battery life.



In Ubuntu 16.04, I could set up xorg.conf, and do this:



 "MetaModes" "DFP-3: 2560x1600 +0+0 {rotation=left, ForceCompositionPipeline=On}, DFP-4: {ForceCompositionPipeline=On}"


In 18.04, there does not exist any value that works here, because when nvidia comes up, it says that all devices are disconnected; it is a few seconds later, on further study, that it starts finding things with names like "DP-1-1" which can be connected or probed. But those names don't exist yet when the xorg.conf fragments are read. So the MetaModes line is discarded because it doesn't apply to anything.



I can accept that I may be forced to manually run xrandr later, but it seems stupid. I don't care about, or want, prime. If it would go away, and the nvidia driver would just probe displays normally, I would have the intended behavior.



Is there a setting or hook somewhere needed to tell the nvidia driver to stop trying to overthink this? I can't uninstall nvidia-prime; I mean, I can, but everything breaks then. There's a thing called gpu-manager which keeps forcing everything over to using prime, but also has no documentation, and no --help, and is basically exactly the opposite of good software engineering. If I dummy it out (say, by replacing it with a script that just does nothing), it stops actively breaking things, but things don't actually get fixed. If I disable it, and nuke 11-nvidia-prime.conf, it looks like the nvidia driver ends up not being used at all.



nvidia-settings can't generate a config file anymore ("xorg-server was not found in the pkg-config search path"), and any attempt to use a working config from a basically-identical machine running 16.04 gets no valid screens found, because of the "everything probes as disconnected initially" problem.



I'm sort of guessing that the support for prime has caused it to disable all displays until prime gets a chance to tell it to enable them, but I don't know how to get around that or suppress it.



EDIT: Coming back a bit later, I checked more carefully. Other laptop is also using nvidia-prime, so prime itself is not innately the problem. Older laptop is 16.04 with nvidia-384, newer is 18.04 with nvidia-390. Slightly different generations; older is a quadro M2000, new one is a quadro M2200, I think.



Update, some months later: For reasons, reloaded laptop. During setup, noticed that there's a BIOS setting that would allow disabling the GPU-switching entirely, and with that, things are closer to working; I get semi-consistent names for the display devices, and they're recognized during startup.



Unfortunately, the MetaModes line, while it now seems to think it's being applied, isn't applying rotation:




[ 12.087] (II) NVIDIA(0): Setting mode "DP-0:nvidia-auto-select+0+0{rotation=left,ForceCompositionPipeline=On}"
...
[ 13.177] (II) NVIDIA(0): Setting mode "NULL"
[ 13.233] (II) NVIDIA(0): Setting mode "DP-0: nvidia-auto-select @2560x1600 +0+0 {ViewPortIn=2560x1600, ViewPortOut=2560x1600+0+0, ForceCompositionPipeline=On}"



So it's ignoring the "rotation=left". I also note that nvidia-settings appears to have removed the explicit specification of 1600x2560. I'll keep messing with it.










share|improve this question































    1















    I had this working fine in 16.04 on a very similar machine.



    What I want: I want to tell X to start with a particular display rotated, if it's present. I also want to use the nvidia driver, not nouveau, and have decent performance without screen-tearing.



    I don't care either way about "nvidia Prime", but so far as I can tell it's why this isn't working, so my guess is I want it burned, purged with fire, destroyed, removed, and otherwise completely prevented from ever interacting with me or my laptop again. I do not care about the marginal impact on battery life.



    In Ubuntu 16.04, I could set up xorg.conf, and do this:



     "MetaModes" "DFP-3: 2560x1600 +0+0 {rotation=left, ForceCompositionPipeline=On}, DFP-4: {ForceCompositionPipeline=On}"


    In 18.04, there does not exist any value that works here, because when nvidia comes up, it says that all devices are disconnected; it is a few seconds later, on further study, that it starts finding things with names like "DP-1-1" which can be connected or probed. But those names don't exist yet when the xorg.conf fragments are read. So the MetaModes line is discarded because it doesn't apply to anything.



    I can accept that I may be forced to manually run xrandr later, but it seems stupid. I don't care about, or want, prime. If it would go away, and the nvidia driver would just probe displays normally, I would have the intended behavior.



    Is there a setting or hook somewhere needed to tell the nvidia driver to stop trying to overthink this? I can't uninstall nvidia-prime; I mean, I can, but everything breaks then. There's a thing called gpu-manager which keeps forcing everything over to using prime, but also has no documentation, and no --help, and is basically exactly the opposite of good software engineering. If I dummy it out (say, by replacing it with a script that just does nothing), it stops actively breaking things, but things don't actually get fixed. If I disable it, and nuke 11-nvidia-prime.conf, it looks like the nvidia driver ends up not being used at all.



    nvidia-settings can't generate a config file anymore ("xorg-server was not found in the pkg-config search path"), and any attempt to use a working config from a basically-identical machine running 16.04 gets no valid screens found, because of the "everything probes as disconnected initially" problem.



    I'm sort of guessing that the support for prime has caused it to disable all displays until prime gets a chance to tell it to enable them, but I don't know how to get around that or suppress it.



    EDIT: Coming back a bit later, I checked more carefully. Other laptop is also using nvidia-prime, so prime itself is not innately the problem. Older laptop is 16.04 with nvidia-384, newer is 18.04 with nvidia-390. Slightly different generations; older is a quadro M2000, new one is a quadro M2200, I think.



    Update, some months later: For reasons, reloaded laptop. During setup, noticed that there's a BIOS setting that would allow disabling the GPU-switching entirely, and with that, things are closer to working; I get semi-consistent names for the display devices, and they're recognized during startup.



    Unfortunately, the MetaModes line, while it now seems to think it's being applied, isn't applying rotation:




    [ 12.087] (II) NVIDIA(0): Setting mode "DP-0:nvidia-auto-select+0+0{rotation=left,ForceCompositionPipeline=On}"
    ...
    [ 13.177] (II) NVIDIA(0): Setting mode "NULL"
    [ 13.233] (II) NVIDIA(0): Setting mode "DP-0: nvidia-auto-select @2560x1600 +0+0 {ViewPortIn=2560x1600, ViewPortOut=2560x1600+0+0, ForceCompositionPipeline=On}"



    So it's ignoring the "rotation=left". I also note that nvidia-settings appears to have removed the explicit specification of 1600x2560. I'll keep messing with it.










    share|improve this question



























      1












      1








      1








      I had this working fine in 16.04 on a very similar machine.



      What I want: I want to tell X to start with a particular display rotated, if it's present. I also want to use the nvidia driver, not nouveau, and have decent performance without screen-tearing.



      I don't care either way about "nvidia Prime", but so far as I can tell it's why this isn't working, so my guess is I want it burned, purged with fire, destroyed, removed, and otherwise completely prevented from ever interacting with me or my laptop again. I do not care about the marginal impact on battery life.



      In Ubuntu 16.04, I could set up xorg.conf, and do this:



       "MetaModes" "DFP-3: 2560x1600 +0+0 {rotation=left, ForceCompositionPipeline=On}, DFP-4: {ForceCompositionPipeline=On}"


      In 18.04, there does not exist any value that works here, because when nvidia comes up, it says that all devices are disconnected; it is a few seconds later, on further study, that it starts finding things with names like "DP-1-1" which can be connected or probed. But those names don't exist yet when the xorg.conf fragments are read. So the MetaModes line is discarded because it doesn't apply to anything.



      I can accept that I may be forced to manually run xrandr later, but it seems stupid. I don't care about, or want, prime. If it would go away, and the nvidia driver would just probe displays normally, I would have the intended behavior.



      Is there a setting or hook somewhere needed to tell the nvidia driver to stop trying to overthink this? I can't uninstall nvidia-prime; I mean, I can, but everything breaks then. There's a thing called gpu-manager which keeps forcing everything over to using prime, but also has no documentation, and no --help, and is basically exactly the opposite of good software engineering. If I dummy it out (say, by replacing it with a script that just does nothing), it stops actively breaking things, but things don't actually get fixed. If I disable it, and nuke 11-nvidia-prime.conf, it looks like the nvidia driver ends up not being used at all.



      nvidia-settings can't generate a config file anymore ("xorg-server was not found in the pkg-config search path"), and any attempt to use a working config from a basically-identical machine running 16.04 gets no valid screens found, because of the "everything probes as disconnected initially" problem.



      I'm sort of guessing that the support for prime has caused it to disable all displays until prime gets a chance to tell it to enable them, but I don't know how to get around that or suppress it.



      EDIT: Coming back a bit later, I checked more carefully. Other laptop is also using nvidia-prime, so prime itself is not innately the problem. Older laptop is 16.04 with nvidia-384, newer is 18.04 with nvidia-390. Slightly different generations; older is a quadro M2000, new one is a quadro M2200, I think.



      Update, some months later: For reasons, reloaded laptop. During setup, noticed that there's a BIOS setting that would allow disabling the GPU-switching entirely, and with that, things are closer to working; I get semi-consistent names for the display devices, and they're recognized during startup.



      Unfortunately, the MetaModes line, while it now seems to think it's being applied, isn't applying rotation:




      [ 12.087] (II) NVIDIA(0): Setting mode "DP-0:nvidia-auto-select+0+0{rotation=left,ForceCompositionPipeline=On}"
      ...
      [ 13.177] (II) NVIDIA(0): Setting mode "NULL"
      [ 13.233] (II) NVIDIA(0): Setting mode "DP-0: nvidia-auto-select @2560x1600 +0+0 {ViewPortIn=2560x1600, ViewPortOut=2560x1600+0+0, ForceCompositionPipeline=On}"



      So it's ignoring the "rotation=left". I also note that nvidia-settings appears to have removed the explicit specification of 1600x2560. I'll keep messing with it.










      share|improve this question
















      I had this working fine in 16.04 on a very similar machine.



      What I want: I want to tell X to start with a particular display rotated, if it's present. I also want to use the nvidia driver, not nouveau, and have decent performance without screen-tearing.



      I don't care either way about "nvidia Prime", but so far as I can tell it's why this isn't working, so my guess is I want it burned, purged with fire, destroyed, removed, and otherwise completely prevented from ever interacting with me or my laptop again. I do not care about the marginal impact on battery life.



      In Ubuntu 16.04, I could set up xorg.conf, and do this:



       "MetaModes" "DFP-3: 2560x1600 +0+0 {rotation=left, ForceCompositionPipeline=On}, DFP-4: {ForceCompositionPipeline=On}"


      In 18.04, there does not exist any value that works here, because when nvidia comes up, it says that all devices are disconnected; it is a few seconds later, on further study, that it starts finding things with names like "DP-1-1" which can be connected or probed. But those names don't exist yet when the xorg.conf fragments are read. So the MetaModes line is discarded because it doesn't apply to anything.



      I can accept that I may be forced to manually run xrandr later, but it seems stupid. I don't care about, or want, prime. If it would go away, and the nvidia driver would just probe displays normally, I would have the intended behavior.



      Is there a setting or hook somewhere needed to tell the nvidia driver to stop trying to overthink this? I can't uninstall nvidia-prime; I mean, I can, but everything breaks then. There's a thing called gpu-manager which keeps forcing everything over to using prime, but also has no documentation, and no --help, and is basically exactly the opposite of good software engineering. If I dummy it out (say, by replacing it with a script that just does nothing), it stops actively breaking things, but things don't actually get fixed. If I disable it, and nuke 11-nvidia-prime.conf, it looks like the nvidia driver ends up not being used at all.



      nvidia-settings can't generate a config file anymore ("xorg-server was not found in the pkg-config search path"), and any attempt to use a working config from a basically-identical machine running 16.04 gets no valid screens found, because of the "everything probes as disconnected initially" problem.



      I'm sort of guessing that the support for prime has caused it to disable all displays until prime gets a chance to tell it to enable them, but I don't know how to get around that or suppress it.



      EDIT: Coming back a bit later, I checked more carefully. Other laptop is also using nvidia-prime, so prime itself is not innately the problem. Older laptop is 16.04 with nvidia-384, newer is 18.04 with nvidia-390. Slightly different generations; older is a quadro M2000, new one is a quadro M2200, I think.



      Update, some months later: For reasons, reloaded laptop. During setup, noticed that there's a BIOS setting that would allow disabling the GPU-switching entirely, and with that, things are closer to working; I get semi-consistent names for the display devices, and they're recognized during startup.



      Unfortunately, the MetaModes line, while it now seems to think it's being applied, isn't applying rotation:




      [ 12.087] (II) NVIDIA(0): Setting mode "DP-0:nvidia-auto-select+0+0{rotation=left,ForceCompositionPipeline=On}"
      ...
      [ 13.177] (II) NVIDIA(0): Setting mode "NULL"
      [ 13.233] (II) NVIDIA(0): Setting mode "DP-0: nvidia-auto-select @2560x1600 +0+0 {ViewPortIn=2560x1600, ViewPortOut=2560x1600+0+0, ForceCompositionPipeline=On}"



      So it's ignoring the "rotation=left". I also note that nvidia-settings appears to have removed the explicit specification of 1600x2560. I'll keep messing with it.







      nvidia xorg 18.04






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 4 '18 at 19:00







      Seebs

















      asked May 24 '18 at 18:29









      SeebsSeebs

      62




      62






















          1 Answer
          1






          active

          oldest

          votes


















          1














          It looks like ~/.config/monitors.xml overrides the position and orientation settings Nvidia puts in its MetaMode in xorg.conf, so edit ~/.config/monitors.xml and add:



          <transform>
          <rotation>left</rotation>
          <flipped>no</flipped>
          </transform>


          between the <scale> and <monitor> tags under the <logicalmonitor> block for the monitor you want to rotate, and adjusting the rotation and flippedness for your monitor as well.






          share|improve this answer


























          • Welcome to Ask Ubuntu! ;-) Could you please review my edits to improve the readability of your questions in the future... ;-) Also: 1 upvote = +10 reputation! 0:-)

            – Fabby
            Feb 10 at 22:19













          • huh, interesting. i don't have a monitors.xml, so i don't have those blocks. i wonder what created it, or whether it would get used if i just created one?

            – Seebs
            Feb 11 at 21:05












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1039932%2ftrying-to-set-up-monitor-rotation-nvidia-in-18-04%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          It looks like ~/.config/monitors.xml overrides the position and orientation settings Nvidia puts in its MetaMode in xorg.conf, so edit ~/.config/monitors.xml and add:



          <transform>
          <rotation>left</rotation>
          <flipped>no</flipped>
          </transform>


          between the <scale> and <monitor> tags under the <logicalmonitor> block for the monitor you want to rotate, and adjusting the rotation and flippedness for your monitor as well.






          share|improve this answer


























          • Welcome to Ask Ubuntu! ;-) Could you please review my edits to improve the readability of your questions in the future... ;-) Also: 1 upvote = +10 reputation! 0:-)

            – Fabby
            Feb 10 at 22:19













          • huh, interesting. i don't have a monitors.xml, so i don't have those blocks. i wonder what created it, or whether it would get used if i just created one?

            – Seebs
            Feb 11 at 21:05
















          1














          It looks like ~/.config/monitors.xml overrides the position and orientation settings Nvidia puts in its MetaMode in xorg.conf, so edit ~/.config/monitors.xml and add:



          <transform>
          <rotation>left</rotation>
          <flipped>no</flipped>
          </transform>


          between the <scale> and <monitor> tags under the <logicalmonitor> block for the monitor you want to rotate, and adjusting the rotation and flippedness for your monitor as well.






          share|improve this answer


























          • Welcome to Ask Ubuntu! ;-) Could you please review my edits to improve the readability of your questions in the future... ;-) Also: 1 upvote = +10 reputation! 0:-)

            – Fabby
            Feb 10 at 22:19













          • huh, interesting. i don't have a monitors.xml, so i don't have those blocks. i wonder what created it, or whether it would get used if i just created one?

            – Seebs
            Feb 11 at 21:05














          1












          1








          1







          It looks like ~/.config/monitors.xml overrides the position and orientation settings Nvidia puts in its MetaMode in xorg.conf, so edit ~/.config/monitors.xml and add:



          <transform>
          <rotation>left</rotation>
          <flipped>no</flipped>
          </transform>


          between the <scale> and <monitor> tags under the <logicalmonitor> block for the monitor you want to rotate, and adjusting the rotation and flippedness for your monitor as well.






          share|improve this answer















          It looks like ~/.config/monitors.xml overrides the position and orientation settings Nvidia puts in its MetaMode in xorg.conf, so edit ~/.config/monitors.xml and add:



          <transform>
          <rotation>left</rotation>
          <flipped>no</flipped>
          </transform>


          between the <scale> and <monitor> tags under the <logicalmonitor> block for the monitor you want to rotate, and adjusting the rotation and flippedness for your monitor as well.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 10 at 22:18









          Fabby

          27.1k1360161




          27.1k1360161










          answered Feb 10 at 21:46









          AcidAcid

          111




          111













          • Welcome to Ask Ubuntu! ;-) Could you please review my edits to improve the readability of your questions in the future... ;-) Also: 1 upvote = +10 reputation! 0:-)

            – Fabby
            Feb 10 at 22:19













          • huh, interesting. i don't have a monitors.xml, so i don't have those blocks. i wonder what created it, or whether it would get used if i just created one?

            – Seebs
            Feb 11 at 21:05



















          • Welcome to Ask Ubuntu! ;-) Could you please review my edits to improve the readability of your questions in the future... ;-) Also: 1 upvote = +10 reputation! 0:-)

            – Fabby
            Feb 10 at 22:19













          • huh, interesting. i don't have a monitors.xml, so i don't have those blocks. i wonder what created it, or whether it would get used if i just created one?

            – Seebs
            Feb 11 at 21:05

















          Welcome to Ask Ubuntu! ;-) Could you please review my edits to improve the readability of your questions in the future... ;-) Also: 1 upvote = +10 reputation! 0:-)

          – Fabby
          Feb 10 at 22:19







          Welcome to Ask Ubuntu! ;-) Could you please review my edits to improve the readability of your questions in the future... ;-) Also: 1 upvote = +10 reputation! 0:-)

          – Fabby
          Feb 10 at 22:19















          huh, interesting. i don't have a monitors.xml, so i don't have those blocks. i wonder what created it, or whether it would get used if i just created one?

          – Seebs
          Feb 11 at 21:05





          huh, interesting. i don't have a monitors.xml, so i don't have those blocks. i wonder what created it, or whether it would get used if i just created one?

          – Seebs
          Feb 11 at 21:05


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1039932%2ftrying-to-set-up-monitor-rotation-nvidia-in-18-04%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Human spaceflight

          Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

          張江高科駅