I connected Soundbar system to HDMI port (1), and I connected my monitor to Display Port (2). On windows I can mirror two outputs 3840x1600 and thanks to that have normal display on a monitor via display port and 5.1 audio on a sounbar (ignoring video). Ubuntu does not allow to mirror outputs at such high resolutions, and forces me to use side by side displays. But Yamaha soundbar is always detected as a first display, and my monitor is always detected as a 2nd display. I'm changing display settings to make 2nd monitor as a primary monitor, but it only works after login. While login the HDMI display is always treated as primary, and invisible because it is sound device :). How to force HDMI port to be always 2nd / 2ndary display? Or how to mirror 3840x1600 outputs in Ubuntu (Windows allows for it, both cables Display Port and HDMI port are capable of 8K output).
Asked
Active
Viewed 4,321 times
2 Answers
13
For at least Ubuntu 22.04:
- Log in and set the monitor layout
- Check inside the configuration file
~/.config/monitors.xmlif the tag<primary>yes</primary>is set in the right monitor. - Copy the configuration file from your user to gdm3 folder:
sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config/ - Correct the owner of
monitors.xmlfile:sudo chown gdm:gdm /var/lib/gdm3/.config/monitors.xml - Reboot
gdm3 config folder is here -> /var/lib/gdm3/.config.
user .config folder is here-> /home/user/.config.
This worked for me.
Bhupathi KC
- 303
André M. Faria
- 7,204
2
After you've set your monitors, copy the configuration file ~/.config/monitors.xml into the folder of your display manager.
For gnome display manager, it would be: /etc/gdm3/
For lightdm, it would be: /etc/ldm/
This should allow you to set your main monitor to display the login part, not the background.
Emre Talha
- 497
-
1This didn't worked for me in Ubuntu 22.04, have you tested it? in which version? Just for curiosity. – André M. Faria May 07 '23 at 19:15
-
Didn't work for me. I'd downvote if I had the points. – labyrinth Aug 07 '23 at 16:16