Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-04-13 09:55:15

doodloo
Member
From: London
Registered: 2015-09-11
Posts: 59

Freeze at Login

Hi there,

First, I would like to apologize because I feel like this problem isn't really "XFCE" related. I tried posting on a more general forum a few months back, and still havn't received any replies sad

I use Xubuntu (19.10 I think), but this problem has been around for at least two past versions. I use LightDM as my manager (this has importance in the following description).

After I input my credentials in LightDM and login, the computer just doesn't do anything. The CPU remains idle, and nothing happens. The mouse pointer is responsive.
If I switch to tty and `sudo htop`, something odd is happening. There basically is an extra "LightDM" child process hanging around, and as soon as I kill this process the computer resumes logging me in.

I would really appreciate guidance on how I could trace what is spawning this extra locking process or hear about others who might have encountered the same issue.

I attached an image of what I see in my process list, once filtered by name "lightdm" and I highlighted the one that would allow the computer to resume when killed: https://ibb.co/4V7cqn2

Thanks a lot,
Doodloo.

Offline

#2 2020-04-13 10:16:20

Jerry3904
Member
Registered: 2013-11-09
Posts: 850

Re: Freeze at Login

It might be useful to see these two files (assuming that they exist in the same place on Ubu-based distros):

-- /etc/lightdm/lightdm.conf
-- /etc/lightdm/users.conf


MX-23 (based on Debian Stable) with our flagship Xfce 4.18.

Offline

#3 2020-06-10 17:06:43

doodloo
Member
From: London
Registered: 2015-09-11
Posts: 59

Re: Freeze at Login

Hi there! Sorry for the (very) long time answering... Lots of thing happened.
Amongst other things, I have a new computer, and it exhibits the same problem as the other two. Even on Xubuntu 20.
I'm pretty sure something in my configuration is triggering this issue, because it started appearing once I synchronized my files (including `~/.config` and other stuff) to the new computer too...

Here is the content of the requested files though:

- I don't have a /etc/lightdm/lightdm.conf file. There's a /etc/lightdm/lightdm.conf.d folder but it's empty. There's also a /etc/lightdm/lightdm-greeter.conf file but every single line is commented out (it's vanilla from my distro).
- /etc/lightdm/users.conf has the default values from my distro too:

```
[UserList]
minimum-uid=500
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/sbin/nologin /sbin/nologin
```

It really feels like lightdm is spawning one too many processes, because like I said in my original post, I can get the login to resume by killing the lightdm child process 2nd in order (both named `lightdm --session-child ...` and it doesn't respawn even once the login gets unstuck.
I guess what would be very helpful is a way to debug what is being awaited on - when the problem happens there's no CPU lock or anything - so I'm thinking race condition on a lock file maybe? Something like that.

Any help appreciated, the problem is getting more and more consistent (on my new computer, it's around 5 out of 6 logins).

Thanks!
P.

Last edited by doodloo (2020-06-10 17:10:01)

Offline

#4 2020-06-10 17:26:18

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 395

Re: Freeze at Login

I'm pretty sure something in my configuration is triggering this issue, because it started appearing once I synchronized my files (including `~/.config` and other stuff) to the new computer too...

I think this may be your answer. You've likely duplicated a configuration file or replaced it with a bad one from a saved /home directory.

I have mentioned this in the past. I never worry about the OS. My data is kept on a separate partition. I don't back up config files from /home just for this reason. If it ever comes to it all I have to do is reinstall and mount my data partition and I'm back where I started.

Check you .xsessions file.


Siduction
Debian Sid
Xfce 4.18

Offline

#5 2020-06-10 17:51:08

doodloo
Member
From: London
Registered: 2015-09-11
Posts: 59

Re: Freeze at Login

@eriefisher Thanks for answering... but not so fast. I wish it was so simple.

I don't worry about my OS. It's disposable, and I too am storing my data on separate disks or partitions when available. But I'm happy that you never worry either, even though I don't see the relevancy of that here smile

- No .xsession files.
- Session startup file is clean, too.

Maybe a bit more depth in my setup:

- I have several partitions for my personal data. One of them is a block-level encrypted volume (LUKS I think 4). Using some pam configuration (libpam-mount if my memory is correct), this disk is mounted into `/home/my_user` upon logging-in or upon SSH access (I use libpam-mount for this purpose).
- The sync between computer happens based on a carefully curated whitelist system (no folders slapped between computers, because it messes up git repositories, for example). We use a combination of Unison and RSync for that.

Is there anyone around who would know how to help on finding out why *sometimes* lightdm spawns this extra `lightdm --session-child 17 20` process? What do the `17 20` signify? It's pretty consistent across computers...

Last edited by doodloo (2020-06-11 13:04:55)

Offline

#6 2020-06-11 13:04:08

doodloo
Member
From: London
Registered: 2015-09-11
Posts: 59

Re: Freeze at Login

Confirmed - I just performed a clean install on the new computer, and the problem occurred even before I restored my personal data. I think it's because of a combination of the packages I use.
Anyone with ideas on how to debug this please?

Last edited by doodloo (2020-06-11 13:05:53)

Offline

#7 2020-06-11 14:16:56

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 395

Re: Freeze at Login

After you installed the OS did you install any other packages?

Edit: Just a thought, if you think it is lightdm maybe install gdm to test the theory. Any login manager would work for testing. Gdm, SDDM etc. Just to rule out some items. I used Lightdm for a long time but on a recent install of Siduction the default is SDDM. I not too fond of it and installed Lightdm but I couldn't get it to work properly. I didn't spend too much time on it though and ended back with SDDM. It wasn't worth the effort.

Last edited by eriefisher (2020-06-11 14:26:26)


Siduction
Debian Sid
Xfce 4.18

Offline

#8 2020-06-19 18:00:22

doodloo
Member
From: London
Registered: 2015-09-11
Posts: 59

Re: Freeze at Login

@eriefisher I tried your suggestion. It looks terrible, but I haven't experienced the problem any-more by using SDDM. How can I diagnose why LightDM is acting like this? I'm pretty sure it's because of the encrypted home being mounted by pam...

Sorry - forgot to answer your other question - yes, after the clean install I installed lots of packages. I have an Ansible playbook doing this on all the computers so I can show the list if needed?
Apart from installing packages, the only system configuration that I could think of is this encrypted home and `pam-mount`.

Last edited by doodloo (2020-06-19 18:02:17)

Offline

#9 2020-06-19 20:48:19

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 395

Re: Freeze at Login

I have never used encrypted partitions and don't have a clue how they work but if you login with lightdm and the partition  doesn't get "released" for use that would account for a freeze for sure. No /home directory so nothing to log into. This may help:

https://wiki.archlinux.org/index.php/Dm … g_at_login


Siduction
Debian Sid
Xfce 4.18

Offline

#10 2020-06-27 22:43:10

doodloo
Member
From: London
Registered: 2015-09-11
Posts: 59

Re: Freeze at Login

Hi @eriefisher,

I've used SDDM for a while and there was no occurrence of the problem. Tonight, I switched back to LightDM and the problem showed immediately.
A few things here:

- It's not a locking issue - the problem occurs at first login, after a cold boot.
- The directions that you pointed to don't work on my system - the `pam` configuration is different on Xubuntu.
- Also, if my setup works with SDDM, it means it's probably not related to it - I'd rather not fiddle around pam as it might in the end also work with SDDM but not LightDM?

Here is the configuration I use - it simply consists of a unit in `/etc/security/pam_mount.conf.xml`. It works great with SDDM and *sometimes* with LightDM:

```
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
  <pam_mount>
    <debug enable="0" />
    <mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
    <mntoptions require="nosuid,nodev" />
    <logout wait="15" hup="yes" term="yes" kill="yes" />
    <mkmountpoint enable="1" remove="true" />
    <volume user="doodloo" fstype="auto" path="/dev/disk/by-uuid/da565c55-2942-442e-9864-f318b3b2852f" mountpoint="/home/doodloo" options="fsck,noatime" />
  </pam_mount>
```

It basically just mounts a disk by uuid and uses the same password as my login password to unlock the data (home) partition.
I'm thinking, there might be a race condition with LightDM... Like I was trying to explain in my first post, LightDM seems to sometime spawn an extra process - I'm not sure if it's starting an extra one, only when the problem occurs - or if it's spawning it all the time but it gets stuck when the problem occurs.

I don't particularly like SDDM - I find it a bit too far from the visual consistency from my desktop experience. I would like to explore solutions for LightDM, or maybe switch to another display manager - do you know of any which would be:
- Configurable easily (GTK3 themes, background etc)
- Lightweight (No effects).

Thank you, I think at least having SDDM as a fallback solution is great for now!

P.

Offline

#11 2020-12-05 13:43:37

LightningW
Member
Registered: 2020-12-05
Posts: 4

Re: Freeze at Login

I just changed to a new pc with xubuntu 20.10 and encountered a similar issue. Previously using the same config on 16.04 without a problem.

In the logs I can see the login hangs for 1 minute then systemd kills the lightdm process and it logs in. It is intermittent so definitely some race condition with lightdm and the pam config for it.

I have fixed it I think, for some reason the lightdm pam config files are different between debian to ubuntu. I switched to the debian lightdm pam config which appears to have fixed it for me.

Download from Debian:
lightdm_1.26.0-7_amd64

Replace only these files:
/etc/pam.d/lightdm
/etc/pam.d/lightdm-autologin
/etc/pam.d/lightdm-greeter

I have been running this for a week without issue, would be interested to know if it really fixes it.

Offline

#12 2020-12-05 15:09:44

doodloo
Member
From: London
Registered: 2015-09-11
Posts: 59

Re: Freeze at Login

@LightningW this is amazing that you took the time to dig my old post, thanks a lot. I will give it a go. Amazing! I knew it was a race condition, just not knowledgeable enough on start order to pinpoint it. Kudos!

Do you happen to have a diff of the files though? I think I have too many changes in mines.

Just in case it comes back, you can try using SDDM.

Last edited by doodloo (2020-12-05 15:10:25)

Offline

#13 2020-12-06 16:39:06

LightningW
Member
Registered: 2020-12-05
Posts: 4

Re: Freeze at Login

It seems to be a rare issue as I couldn't find anyone else posting.

I don't have a diff but there are quite a few differences at a glance and I believe the load order in the file can also have an effect, but I don't fully understand how it all works. Not sure why the ubuntu and debian configs have diverged so much but there are some comments in the changelogs about fixes for ecryptfs, however I am using luks.

In theory you only need to add your mounts to pam_mount.conf.xml so switching the lightdm pam config should be ok.

Offline

#14 2020-12-07 08:33:35

doodloo
Member
From: London
Registered: 2015-09-11
Posts: 59

Re: Freeze at Login

@LightningW thanks a lot for taking the time. You are correct saying that my pam config is in `pam_mount.conf.xml`:

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
  <pam_mount>
    <debug enable="0" />
    <mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
    <mntoptions require="nosuid,nodev" />
    <logout wait="15" hup="yes" term="yes" kill="yes" />
    <mkmountpoint enable="1" remove="true" />
    <volume user="doodloo" fstype="auto" path="/dev/disk/by-uuid/da565c55-2942-442e-9864-f318b3b2852f" mountpoint="/home/doodloo" options="fsck,noatime" />
  </pam_mount>

I'll have a look at the files when I have a moment this week.

Have a great week ahead.

Offline

#15 2021-02-12 13:45:57

antisa
Member
Registered: 2012-02-12
Posts: 4

Re: Freeze at Login

Hi,

I had the same problem on Xubuntu 20.04.2. The issue seems to be resolved by deactivating the "Lock Screen with Screensaver" in Settings > Screensaver.

EDIT:
I had a lock up again :-(
This time I went into Power Manager settings and under Security > "Automatically lock the session" selected Never. Hopefully this will resolve it. Will update the post later.

EDIT 2:
Looks like disabling "Automatically lock the session" resolved the issue for me.

Last edited by antisa (2021-03-01 07:46:58)

Offline

Board footer

Powered by FluxBB