Page 1 of 1

Autologin not working booting to systemd option

Posted: Tue Dec 05, 2023 10:13 pm
by bpr323
I have MX23 XFCE4 and I needed to use a Dell D6000 USB-C dock (aka displaylink) to connect my laptop to 2 screens and ethernet.
However, the Linux driver only runs under systemd, therefore I choose advanced options -> systemd
Under "normal" Libretto I auto-login and logout of XFCE without any login prompts.
After booting to systemd I went to MX User Manager and made sure my user account is set to auto login.
But this doesn't work and I'm promted to enter my username and pwd to log in.
Same happens when I logout/reboot - the system drops out of XF desktop and asks me to provide credentials (after 10 sec the prompt goes away)
Question: How do I fix this and configure systemd to enable auto login/logout?

Re: Autologin not working booting to systemd option

Posted: Tue Dec 05, 2023 10:54 pm
by dolphin_oracle
please post the quick-system-info for your system, as well as the /etc/lightdm/lightdm.conf file and the output of the following:

Code: Select all

apt policy dbus-user-session
at reboot/shutdown, do you actually have to enter a password for reboot/shutdown to continue, or do you just see the login screen and reboot/shutdown continues on its own?

Re: Autologin not working booting to systemd option

Posted: Tue Dec 05, 2023 11:13 pm
by bpr323
Thank you Sir - do I need to boot into systemd before I run these outputs?

Re: Autologin not working booting to systemd option

Posted: Tue Dec 05, 2023 11:38 pm
by bpr323
dolphin_oracle wrote: Tue Dec 05, 2023 10:54 pm please post the quick-system-info for your system,
inxi.txt
as well as the /etc/lightdm/lightdm.conf file
lightdm.conf.txt
and the output of the following:

Code: Select all

apt policy dbus-user-session
dbus.txt
at reboot/shutdown, do you actually have to enter a password for reboot/shutdown to continue, or do you just see the login screen and reboot/shutdown continues on its own?
No I don't need to enter username/pwd for reboot/shutdown - the prompt goes away after 5-10 sec and reboot continues on its own. But for login it's persistant

Re: Autologin not working booting to systemd option

Posted: Wed Dec 06, 2023 8:00 pm
by dolphin_oracle
nothing is jumping out at me, as long as your user name "me" is correct in you lightdm.conf file. and that should have been the same between sysVinit and systemd anyway.

I sort of wonder about the $DISPLAY while you are running that dock.

maybe after log in under systemd:

Code: Select all

xrandr 
echo $DISPLAY

Re: Autologin not working booting to systemd option

Posted: Thu Dec 07, 2023 5:54 am
by bpr323
1) Yes, the user name is correct as I'm using "personal" snapshots to keep tweaking my "assembly" of mx23 XFCE
2) The login/out forced authentication happens regardless of wheather the dock is connected or not - under systemd I have to provide my user creds to login to XFCE session and when I log out it wants to auth me when it drops out of XFCE session under systemd.
I don't-do in-flight logouts - just use advanced option to log in under systemd when I boot up.
I suspect this is something to do how the "advanced option" works to initiate a systemd session (autologin is lost).
Nothing major, but I wish I could fix the problem
xrandr
echo $DISPLAY just reports screen resolutions and that DP1/DP2 are disconnected - no errors and nothing to require user authentcation ...

Re: Autologin not working booting to systemd option

Posted: Thu Dec 07, 2023 6:25 am
by dolphin_oracle
The display variable should not include any resolutions.

Where did the driver come from?

Re: Autologin not working booting to systemd option

Posted: Thu Dec 07, 2023 10:08 am
by dolphin_oracle
I found a driver package from dell, maybe that is is.

https://dl.dell.com/FOLDER08515978M/1/N ... ftware.zip

looking at some of the installation information, I'm wondering if the fact that the dock driver loads AFTER ligthdm, and the fact that we have an init script fro lightdm as well as a systemd service, may be causing you some grief.

you could try

Code: Select all

sudo update-rc.d lightdm remove
which should disable the sysVinit lightdm init script, but leave the systemd service file alone. maybe that will help you.

Re: Autologin not working booting to systemd option

Posted: Thu Dec 07, 2023 10:41 pm
by bpr323
Hi mate, cheers for getting back to me with this issue, greatly asppreciated!

1) The driver comes from here : https://github.com/AdnanHodzic/displayl ... g/v5.7.0.2
2) After running <sudo update-rc.d lightdm remove> the results are:
a) under "normal" login the system boots, but after the MX logo the screen goes black and nothing else happens
b) under "advanced options / systemd" login it completes the boot and displaylink driver works OK, but authentication is still required for logon and logoff (for the latter the prompt goes away and logout completes without providing user creds)

Re: Autologin not working booting to systemd option

Posted: Fri Dec 08, 2023 12:12 am
by dolphin_oracle
ok you can put lightdm back with

Code: Select all

sudo update-rc.d lightdm defaults

Re: Autologin not working booting to systemd option

Posted: Fri Dec 08, 2023 5:45 am
by bpr323
Thanks, lightdm restored.
On a side note - which files (or sim links?) do I need to copy from /home/me/ to /etc/skel/ for MX Snapshot - to create a distribution-quality ISO clone of my build?
If I copy everything, it bloats up skel but the result works, albeit with sudo minstall only (no install icons)

Re: Autologin not working booting to systemd option

Posted: Fri Dec 08, 2023 6:42 am
by dolphin_oracle
Any settings files

But don’t copy .config/MX-Linux/xdg-check or put a desktop folder under /etc/skel.

Re: Autologin not working booting to systemd option

Posted: Fri Dec 08, 2023 3:42 pm
by bpr323
My /home/me/.config/MX-Linux/xdg_check file is empty i.e. 0 bytes
/Desktop folder is also completely empty inside

Re: Autologin not working booting to systemd option

Posted: Fri Dec 08, 2023 4:01 pm
by dolphin_oracle
bpr323 wrote: Fri Dec 08, 2023 3:42 pm My /home/me/.config/MX-Linux/xdg_check file is empty i.e. 0 bytes
/Desktop folder is also completely empty inside
yes, they will be empty, but they should not go into /etc/skel if you want an installer icon to show up in your snapshot.

Re: Autologin not working booting to systemd option

Posted: Sat Dec 09, 2023 4:34 am
by bpr323
Awesome!
Thank you so much mate, I would have never guesssed :)
You're a Lagend!

Re: Autologin not working booting to systemd option

Posted: Sat Dec 09, 2023 9:21 am
by bpr323
The MX Snapshot and Live USB Maker worked well, except for a couple of minor glitches:
1) My default system locale is set to en_AU.UTF-8 (Australian English) so when I boot the new live USB I'm greeted with the message: "You've logged in in a new language. You can automatically update the names of the standard folders in your home folder to match this new language". When I click Yes it creates a bunch of std folders right on the desktop. After the install completes it pops the same question again and if I agree to rename, it creates these folders on the desktop again. If I don't agree, - no standard folders are created in the /home/user directory.
Does this mean I have to tweak the skel to somehow indicate the US locale is the default?"
2) It creates a "Live USB" folder on the desktop which points to the /home/demo/live usb storage folder, which is empty.

Needless to say, none of the above happens when I use the "personal" snapshot. So I'm guessing that using a "distribution" type snapshot when the user's default locale is set to anything but "en_US" is not supported?

Re: Autologin not working booting to systemd option

Posted: Sat Dec 09, 2023 9:56 am
by fehlix
bpr323 wrote: Sat Dec 09, 2023 9:21 am The MX Snapshot and Live USB Maker worked well, except for a couple of minor glitches:
1) My default system locale is set to en_AU.UTF-8 (Australian English) so when I boot the new live USB I'm greeted with the message: "You've logged in in a new language. You can automatically update the names of the standard folders in your home folder to match this new language". When I click Yes it creates a bunch of std folders right on the desktop. After the install completes it pops the same question again and if I agree to rename, it creates these folders on the desktop again. If I don't agree, - no standard folders are created in the /home/user directory.
Does this mean I have to tweak the skel to somehow indicate the US locale is the default?"
2) It creates a "Live USB" folder on the desktop which points to the /home/demo/live usb storage folder, which is empty.

Needless to say, none of the above happens when I use the "personal" snapshot. So I'm guessing that using a "distribution" type snapshot when the user's default locale is set to anything but "en_US" is not supported?
Please post those questions/issues into a new tread, b/c locale settings seems not the be related to the topic title
"Re: Autologin not working booting to systemd option" of this thread.
Also include some more information, b/c non-personal "snapshot" would have the locale set based on the boot parameter lang/tz- respectivey. And also mentioned whether this is a skel-tweaked modified snapshot,
which may create such locale confusions. Also post QSI when booted from Live-snapshot.

at MOD's: can we get this posts moved into a new thread "locale issues with tweaked snapshot" or something like this.

Autologin not working booting to systemd option

Posted: Sun Dec 24, 2023 7:35 am
by bpr323
dolphin_oracle wrote: Thu Dec 07, 2023 10:08 am looking at some of the installation information, I'm wondering if the fact that the dock driver loads AFTER ligthdm, and the fact that we have an init script fro lightdm as well as a systemd service, may be causing you some grief.
Yes - editing lightdm.conf and moving the autologin commands to the top of the file (plus uncommenting the top two lines) seems to have solved the problem:

[SeatDefaults]
type=xlocal
user-session=default
autologin-user=me
autologin-user-timeout=3
greeter-session=lightdm-greeter
xserver-allow-tcp=false
session-wrapper=/etc/X11/Xsession
display-setup-script=/usr/local/bin/early-bg
xserver-command=X -dpi $DPI

Thanks mate, your comment prompted me to fix this from the "race condition" perspective - there's something else happening in the background - hence 3 sec delay timeout to let that "other" process kick off the secure login, then autologin applies and reloads the screen.

I would like to get to the bottom of this and fix it properly - but I don't know, which log file(s) to check for clues