Display on second monitor misbehaves in portrait mode with Nvidia GTX GPU on Ubuntu 20.04

Solution 1:

I was able to work around this by using sudo apt install arandr

running arandr in terminal and then changing the monitor orientation there.

Solution 2:

I can't enable portrait mode at all for any of my monitors in the display settings. (arandr kind of works, but limits me to 60 Hz.)

However, turns out I can do it in the Nvidia Control Panel or with xrandr. Maybe, as a workaround, you could put something like this in a startup script:

xrandr --output DP-0 --rotate left

You would have to replace DP-0 with whatever output your secondary monitor is connected to, of course.

Specs for reference:

  • OS: Ubuntu 20.04 Beta
  • GPU: RTX 2060 Super
  • Driver: Nvidia 440.64
  • Monitor 1: Acer XV273K
  • Monitor 2: Asus PG278Q

Solution 3:

Simon Alling's answer worked for me but this is the way I persisted configuration across reboots and user sessions. I saved the xrandr command to a file '~/.config/autostart/setup_monitor_display.desktop', made it executable with chmod +x.

# Wait until GUI is ready
X-GNOME-Autostart-Delay=1
xrandr --output DP-0 --rotate left

Then I added the execution of the script to the startup application list.

  1. Open Startup Application Preferences
  2. Click Add
  3. Fill in the name and comment
  4. For command do something like sh -c '~/.config/autostart/setup_monitor_display.desktop'

Based off the answer here: https://askubuntu.com/a/1230863/1152625