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.

1 Answer 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:


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.

  • 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, 2019 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, 2019 at 21:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .