Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
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.
I am using lightdm with dual monitors on Ubuntu 21.10 and it's very annoying that grub appears on monitor 1 but login appears on monitor 2 which is invariably turned off when I start up.
I know I could just move the mouse and login on monitor 1 but gdm3 display manager gets it right so there must be a way to persuade lightdm to do the same. I prefer lightdm over gdm3.
I have configured nvidia-settings and made sure ubuntu Display settings match and searched some of lightdm settings for a clue but I cannot find one.
Right path anybody?
Edit: I have also found that RealVNC Viewer also starts up on monitor 2. This means I have to turn on that monitor to move the viewer to monitor 1 for further use. A real pain
If possible, the simplest fix could be swapping the cables between the two displays on one end or the other but not both. LightDM is hardly the only greeter I've seen get this wrong. It's no doubt annoying.
DE settings (probably NVidia settings too) come into play after a session type is selected in the greeter. Try putting an xrandr --output NAME --primary script in /etc/X11/Xsession.d/.
If possible, the simplest fix could be swapping the cables between the two displays on one end or the other but not both. LightDM is hardly the only greeter I've seen get this wrong. It's no doubt annoying.
DE settings (probably NVidia settings too) come into play after a session type is selected in the greeter. Try putting an xrandr --output NAME --primary script in /etc/X11/Xsession.d/.
Thank you, can you suggest how to do that?
The secondary monitor only has HDMI connection and the primary one has display port which I prefer to use.
you can remove the second monitor to see if that works (for example).
I removed the second monitor without making any changes and as would be expected, both grub and login appeared on the primary monitor. Even if I had made changes I think it would be the same result. However, I do need 2 monitors.
Naturally you'll need the subsitute the appropriate device Option names for mine. I have no NVidia cards with both DP and HDMI ports to test with. Substitute right-of for above. I used above to verify it actually works, as right-of for secondary display is the default. Then I tried another PC without any location option, resulting in the secondary to the right of the primary:
Each of these three installations by default put the login greeter on the default secondary display, but using /etc/X11/xorg.conf, moved it to the configured primary display. The DE also used the /etc/X11/xorg.conf configured primary display as primary. In none did I have anything in the DE's configuration specifying the primary, nor the relative display positions.
Naturally you'll need the subsitute the appropriate device Option names for mine. I have no NVidia cards with both DP and HDMI ports to test with. Substitute right-of for above. I used above to verify it actually works, as right-of for secondary display is the default. Then I tried another PC without any location option, resulting in the secondary to the right of the primary:
Each of these three installations by default put the login greeter on the default secondary display, but using /etc/X11/xorg.conf, moved it to the configured primary display. The DE also used the /etc/X11/xorg.conf configured primary display as primary. In none did I have anything in the DE's configuration specifying the primary, nor the relative display positions.
Possible output names are found as xrandr --listproviders output, so in your case probably DP-1 and HDMI-1.
Sometimes 0 means "off" or "no", sometimes it means a starting location, while other times it really means the first something or other, which often means the only something or other. Seeing 0 as a component of an identifier is a personal annoyance. Identifiers don't have any intrinsic meaning, just like one's parents can name a child anything, because it's no more than a moniker.
I never use NVidia's drivers, so can't know exactly what to expect in one of its xorg.conf files. Normally for a two display configuration, one expects two 'Section "Monitor"'s and two 'Section "Screen"'s. Was your file generated while only one display was connected?
Mentions of input devices in xorg.conf are wholly unnecessary, as Xorg manages those automagically.
I'd try running without any xorg.conf file if you haven't already. If that doesn't work any better, I'd try commenting out the Xinerama line and trying, but instead of any more alteration of the existing file, I'd try having NVidia's setup tool generate a new file to see if it contains pairs of Monitor & Screen sections, and if it works any better.
Beyond the above, the only recommendations I have left to make are:
Possible output names are found as xrandr --listproviders output, so in your case probably DP-1 and HDMI-1.
Sometimes 0 means "off" or "no", sometimes it means a starting location, while other times it really means the first something or other, which often means the only something or other. Seeing 0 as a component of an identifier is a personal annoyance. Identifiers don't have any intrinsic meaning, just like one's parents can name a child anything, because it's no more than a moniker.
I never use NVidia's drivers, so can't know exactly what to expect in one of its xorg.conf files. Normally for a two display configuration, one expects two 'Section "Monitor"'s and two 'Section "Screen"'s. Was your file generated while only one display was connected?
Mentions of input devices in xorg.conf are wholly unnecessary, as Xorg manages those automagically.
I'd try running without any xorg.conf file if you haven't already. If that doesn't work any better, I'd try commenting out the Xinerama line and trying, but instead of any more alteration of the existing file, I'd try having NVidia's setup tool generate a new file to see if it contains pairs of Monitor & Screen sections, and if it works any better.
Beyond the above, the only recommendations I have left to make are:
trying without NVidia's drivers installed
contacting NVidia support
building your own xorg.conf based on one of mine
I thank you for your time and help, however I have tried all your suggestions except making my own xorg.conf. Two reasons for that, 1. I don't need an xorg.conf - it does nothing to change the circumstances. 2. I am not confident enough have been shut out without a display twice in other attempts.
Yes, I have always had both monitors powered up at every attempt. Like you, I expected two entries for each subject. I even tried adding my own based on what was already there but on boot, after grub a red warning error popped up and disappeared. I was without a display but know how to fix that.
Nvidia's tool only repeats what is/was in xorg.conf from the beginning - no dual entries.
I used Nouveau drivers and they only found the primary screen so I gave up on them.
I have not tried your "commenting out the Xinerama line" but will have one last try and if it fails I will not be back to this thread.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.