Kubuntu 21.04 - How to swap the login screens on a dual monitor system?
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Kubuntu 21.04 - How to swap the login screens on a dual monitor system?
I'm running Kubuntu 21.04 as a dual monitor system, where the right monitor is the main one.
This means, when I move the mouse beyond the left edge of the right monitor, the mouse pointer appears on the right edge of the left monitor.
The problem is, this doesn't work for the login screen, where it's vice versa, unfortunately.
Is there any way to swap the monitors for the login screen, too?
IIRC, configure X in /etc/X11/xorg.con* to make the desired display the primary display. I haven't bothered in a long time, just letting the login screen appear wherever it wants. If you can get xrandr to fire in a script to designate the primary before the greeter launches it should work too. I've never in any Debian derivative found the right place to get xrandr to fire soon enough.
What can for sure work is cable swapping, if not including a laptop or notebook screen among outputs.
Sorry, swapping the cables is no option because of different connectors in use, and the problem is only affecting the login screen.
Could you or anybody else please give me more details as for how to swap the login screens using software methods?
Here's my xrandr output:
Code:
xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
DP-0 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 598mm x 336mm
1920x1080 60.00*+
1600x900 60.00
1280x1024 75.02 60.02
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 287mm
1920x1080 60.00*+ 59.94 50.00 60.00 50.04 50.04
1680x1050 59.95
1600x1200 60.00
1440x900 74.98 59.89
1400x1050 59.98
1360x768 60.02
1280x1024 75.02 60.02
1280x960 60.00
1280x720 59.94 50.00
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
720x576 50.00
720x480 59.94
640x480 75.00 72.81 59.94 59.93
DVI-D-0 disconnected (normal left inverted right x axis y axis)
xrandr
...
DP-0 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 598mm x 336mm
...
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 287mm...
Given the above:
Code:
xrandr --output HDMI-0 --primary
should move the primary from DP-0 to HDMI-0.
Using /etc/X11/xorg.con* is more complicated, and vexing, to make work. What follows worked for me on Debian Testing (soon to be released as Debian 11/Stable/Bullseye) using an AMD GPU, so, with the modifications below listed, should work in *buntu 21.04 if you are using an AMD GPU:
You're output names are different from mine, so you would need to, or may want to:
Because I have different output names to work with (DVI-I-0 is actually an HDMI connection at the display), in Section "Device", you need to remove or comment the two xorg.conf lines below the commented "Option" lines, and remove the comment marks (#) from the other two option lines
Need to either adjust to your own displays' resolutions, or remove, the two "PreferredMode" lines that I needed to get my own normally primary larger display to not fall back to a lesser supported mode than the now configured primary display. If both your displays use the same resolution (mode), most likely you will not need any "PreferredMode" lines.
You may safely discard the commented lines preceding each Section line.
You may instead of using xorg.conf as I did, break my file into 3 files using the names that are comments above each section line, placed into /etc/X11/xorg.conf.d/
If you are not using an AMD GPU, please provide input/output from either or both of the following:
There's no /etc/X11/xorg.con* on my Kubuntu, only this empty folder: /etc/X11/xorg.conf.d
My GPU is an Nvidia.
DP-0 is my main monitor (27''), right at front of me and HDMI-0 (23'') is the 2nd one, located on the left side.
If I make HDMI-0 primary, everything is on the left monitor, which isn't what I'm looking for.
I'm afraid, moving the 27'' (currently DP-0) to the left side and the 23'' (currently HDMI-0) in front of me is no option because of the prevailing spatial conditions and because I would prefer keeping the 27'' to be the main one.
There's no /etc/X11/xorg.con* on my Kubuntu, only this empty folder:
/etc/X11/xorg.conf.d
/etc/X11/xorg.conf is an optional configuration file. /etc/X11/xorg.conf.d/ is an optional directory. You may place a single configuration file as /etc/X11/xorg.conf, or any files of the form *.conf in /etc/X11/xorg.conf.d/, and if valid for the available GPU and drivers, they will be utilized. Getting desired results generally takes trial and error.
Quote:
My GPU is an Nvidia.
This need not stop you from trying my xorg.conf file with it modified as I instructed. You may or may not need to add a 'Section "ServerLayout"' to have it work right.
I'm not in position to install NVidia's own drivers in order to try to perfect an xorg.conf file fully expected to work as you desire. They tend to have unique characteristics in some cases from FOSS drivers. I'm guessing what you wish is achievable, either through experimentation and reading the xorg.conf man page and/or other documentation, or by finding someone with expertise in the use of NVidia's own drivers. The latter may require visiting NVidia's own help forum.
What you're after is not *buntu- or version-specific. You might find better help here by asking a mod to move this to the Desktop forum.
Now, it became even worse. The entire system seems to be ruined, even before trying anything with your xorg.conf file.
The whole taskbar has moved to the top edge of the desktop, without any chance to move it back to the lower edge again, because the settings open at the top of that bar where they off screen and therefore unreachable and when I tray to open the start menu it is partly shifted off screen, so I cannot reach almost nothing of that menu. I don't know what (or why it) happened.
Just suddenly, everything was ruined.
I've got no idea how to restore this mess into something usable again.
EDIT:
Guess it is something about KDE, because I also tried an MX 19.4 KDE, where almost the same happened.
Not sure if it is about the kernel (I used a 5.12.x for Kubuntu and 5.8.x for MX) or the graphics driver (I tried an Nvidia 465.27 on Kubuntu and MX, but on MX it even happened with the Nouveau driver).
Seems like I can forget about KDE, because my computer doesn't like it at all.
In kubuntu 21.04 and using the default wayland xwayland etc. this can be done from system setting display.
if it does not show both displays then something is wrong.
If using the NVidia driver full install. Open the nvidia-setings program select your primary Display. and save it.
it creates a ~/.nvidia-settings-rc and when you reboot it will will work.
You need to Handel that with nvidia.
if you have a laptop that runs the APU and the Nvidia.
Make sure Nvidia is capturing both displays in nvidia-settings.
Also look at System-settings display.
Guess it is something about KDE, because I also tried an MX 19.4 KDE, where almost the same happened.
Not sure if it is about the kernel (I used a 5.12.x for Kubuntu and 5.8.x for MX) or the graphics driver (I tried an Nvidia 465.27 on Kubuntu and MX, but on MX it even happened with the Nouveau driver).
Seems like I can forget about KDE, because my computer doesn't like it at all.
When things get crazy in KDE, log out of it, log in on a vtty, and delete ~/.cache/*, then try KDE again.
Did you ever give the default X driver[1] a chance. It's the only driver I use with my NVidia GPUs. To use it, uninstall NVidia's drivers and xserver-xorg-video-nouveau, and see what happens (without any /etc/X11/xorg*.conf files).
One other thing, besides cache corruption, likely to cause "entire system seems to be ruined" is Kscreen2 might be fighting against your attempts to influence the display through config files or xrandr or arandr. You can disable it in background services in systemsettings.
[1] named modesetting, provided by the xserver package, so you can't get rid of it. More info here.
I reinstalled everything from scratch and tried version 460 of the Nvidia drivers. It's the tested one according to the driver manager of Kubuntu. I also saved the settings from within the Nvidia X Server Settings as you told me (@ mrmazda). This seems to have been the crucial step, because even after two days with this installation, everything is still working fine, without any shifted windows, workspaces and the start menu is still where it's supposed to be, too.
I guess, I can now begin to install all of my apps and tools, which I used to have in previous installations (i.e. Mint, Bodhi, MX,... ).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.