Results 1 to 5 of 5

Thread: Ubuntu 22.04. How to change primary login monitor away from external HDMI monitor.

  1. #1
    Join Date
    Feb 2010
    Location
    Kerala, India
    Beans
    466

    Question Ubuntu 22.04. How to change primary login monitor away from external HDMI monitor.

    AMD laptop with Ubuntu 22.04 Gnome Wayland.

    A few days ago I executed this command to change my primary login monitor to my external HDMI monitor:
    sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config/
    (This command sets the external monitor as the boot login monitor.)

    How do I reverse this command? I want to change my primary monitor back to the laptop monitor.

    See this page for more details: https://ubuntuhandbook.org/index.php...onitor-ubuntu/
    MSI Bravo 15 AMD Ryzen 7 4800H 15.6" 40GB A4DDR-212IN, 2TB nvme (Ubuntu 22.04 LTS Gnome) and 500GB nvme (also Ubuntu 22.04 LTS Gnome as a backup)

    Here, There and Everywhere.

  2. #2
    Join Date
    Apr 2008
    Beans
    111

    Re: Ubuntu 22.04. How to change primary login monitor away from external HDMI monitor

    Just delete the file and restart:

    Code:
    sudo rm /var/lib/gdm3/.config/monitors.xml
    Last edited by philhughes; November 9th, 2022 at 07:07 PM.

  3. #3
    Join Date
    Sep 2011
    Location
    Pennsylvania, U.S.A.
    Beans
    3,068
    Distro
    Ubuntu Development Release

    Re: Ubuntu 22.04. How to change primary login monitor away from external HDMI monitor

    I'm using dual desktop monitors but I assume the procedure would be the same. No need to edit or create any files. This is using the default Ubuntu desktop

    - Click the top right corner
    - Settings
    - Displays
    You'll see a window with several choices. On top will be 3 choices - Joint Displays, Mirror or Single display. I have Join Displays selected. The rest you
    figure out. The Primary Display will be the one with the top bar and controls. The only glitch I've run into is the mouse cursor not moving from one display to another; I've had to run the cursor off the right edge of the right monitor then it appears on the left monitor. What fixes that for me is to switch the position of the two monitors on the Displays page. They're labelled 1 & 2, drag 2 to the left of 1. You may want to switch the Primary Display designation so the top bar is where you want it. Hope this helps.
    Last edited by kurt18947; November 10th, 2022 at 12:04 AM.

  4. #4
    Join Date
    Apr 2008
    Beans
    111

    Re: Ubuntu 22.04. How to change primary login monitor away from external HDMI monitor

    What you are describing is the procedure to change the monitor arrangement once you have logged in. However, when you have done this, sometimes the arrangement of the monitors at the login screen (which is what Advait is asking about) will not be the same, and will not be affected by the changes you make from Settings > Screen Display. In this case the solution is to copy the monitors.xml file (which is created when you make changes from Settings) to /var/lib/gdm3/.config/, as shown in the original post.

  5. #5
    Join Date
    Feb 2010
    Location
    Kerala, India
    Beans
    466

    Re: Ubuntu 22.04. How to change primary login monitor away from external HDMI monitor

    Quote Originally Posted by philhughes View Post
    Just delete the file and restart:

    Code:
    sudo rm /var/lib/gdm3/.config/monitors.xml
    A simple solution. Nice! My favorite kind. Thanks.
    MSI Bravo 15 AMD Ryzen 7 4800H 15.6" 40GB A4DDR-212IN, 2TB nvme (Ubuntu 22.04 LTS Gnome) and 500GB nvme (also Ubuntu 22.04 LTS Gnome as a backup)

    Here, There and Everywhere.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •