You are not logged in.

#1 2022-11-25 02:30:10

deborgen
Member
Registered: 2022-11-25
Posts: 11

[SOLVED] systemd-homed login takes very long.

Recently I migrated from a non systemd-homed account.

Everything works well but the login takes a lot longer (2min) than before.

upon checking journalctl I noticed the message:

 11月 25 11:22:42 newryzen systemd-homed[679]: Authentication failed: Required key not available 

I am not sure if it is related. The same message is repeated even after the login so maybe it is not the cause of taking too long.

Edit: I've tested the issue with a dummy newly created account. With this account the login is instantaneous. So I guess it should be related to how much space a user home is occupying. My home user is taking 1TB.

Thanks for the attention.

Last edited by deborgen (2022-11-30 13:37:12)

Offline

#2 2022-11-25 07:01:19

cloverskull
Member
Registered: 2018-09-30
Posts: 172

Re: [SOLVED] systemd-homed login takes very long.

This, coupled with slow shutdown/reboot and some inconsistent "free space" reporting led me to ditch systemd-homed and revert back to traditional user management.

Offline

#3 2022-11-25 08:23:55

seth
Member
Registered: 2012-09-03
Posts: 49,972

Re: [SOLVED] systemd-homed login takes very long.

homed will run chown on all your files when you login, what, along cloverskull's findings leads to the question

Recently I migrated from no from a non systemd-homed account

What motivated that itfp?

Offline

#4 2022-11-27 13:18:44

deborgen
Member
Registered: 2022-11-25
Posts: 11

Re: [SOLVED] systemd-homed login takes very long.

seth wrote:

homed will run chown on all your files when you login, what, along cloverskull's findings leads to the question

Recently I migrated from no from a non systemd-homed account

What motivated that itfp?

Tbh nothing special. I discovered about the existence of systemd-homed and wanted to use it.


cloverskull wrote:

This, coupled with slow shutdown/reboot and some inconsistent "free space" reporting led me to ditch systemd-homed and revert back to traditional user management.

Is reverting back to traditional user management as hard as the migration to systemd-homed? I followed this guide https://systemd.io/CONVERTING_TO_HOMED/

Last edited by deborgen (2022-11-27 13:24:17)

Offline

#5 2022-11-27 16:48:03

3beb6e7c46a615a
Member
Registered: 2021-03-27
Posts: 165

Re: [SOLVED] systemd-homed login takes very long.

seth wrote:

homed will run chown on all your files when you login, what, along cloverskull's findings leads to the question

On a recent kernel a recent systemd (I don't remember the exact version numbers) will use idmapped mounts, so this shouldn't be an issue anymore.

Given the size of your home area I guess the issue is auto-resizing and balancing, in particular if most of that space is not occupied.  What does "homectl inspect" show?  If it lists "Auto Resize" and/or "Rebalance" as "on", try turning both of with "homectl update --auto-resize-mode=off --rebalance-weight=off" for your user account and see if this makes a difference.

Last edited by 3beb6e7c46a615a (2022-11-27 16:51:01)

Offline

#6 2022-11-27 18:38:26

deborgen
Member
Registered: 2022-11-25
Posts: 11

Re: [SOLVED] systemd-homed login takes very long.

This is the output from

 homectl inspect 
 
  User name: deborgen
       State: active
 Disposition: regular
 Last Change: Wed 2022-07-20 21:06:48
    Login OK: yes
 Password OK: yes
         UID: 1000
         GID: 1000 (deborgen)
 Aux. Groups: wheel
              lp
              video
              plugdev
              docker
   Directory: /home/deborgen
     Storage: luks (strong encryption)
  Image Path: /home/deborgen.home
   Removable: no
       Shell: /bin/zsh
 Access Mode: 0700
LUKS Discard: online=no offline=yes
  
 File System: btrfs
 LUKS Cipher: aes
 Cipher Mode: xts-plain64
  Volume Key: 256bit
 Mount Flags: nosuid nodev exec
   Disk Size: 2.2T
  Disk Usage: 1.2T (= 54.3%)
   Disk Free: 1.0T (= 45.7%)
  Disk Floor: 1.2T
Disk Ceiling: 2.4T
  Good Auth.: 829
   Last Good: Sun 2022-11-27 23:25:11
   Bad Auth.: 1010
    Last Bad: Sun 2022-11-27 23:23:47
    Next Try: anytime
 Auth. Limit: 30 attempts per 1min
   Passwords: 1
  Local Sig.: yes
     Service: io.systemd.Home

There is no Auto-resize or rebalance.

Last edited by deborgen (2022-11-27 18:39:31)

Offline

#7 2022-11-27 18:46:11

3beb6e7c46a615a
Member
Registered: 2021-03-27
Posts: 165

Re: [SOLVED] systemd-homed login takes very long.

I presume then it's on, because it's the default behaviour as far as I remember.  Did you try turning it off?  Also, see "man homectl" smile

Offline

#8 2022-11-30 13:35:44

deborgen
Member
Registered: 2022-11-25
Posts: 11

Re: [SOLVED] systemd-homed login takes very long.

lunaryorn wrote:
seth wrote:

homed will run chown on all your files when you login, what, along cloverskull's findings leads to the question

On a recent kernel a recent systemd (I don't remember the exact version numbers) will use idmapped mounts, so this shouldn't be an issue anymore.

Given the size of your home area I guess the issue is auto-resizing and balancing, in particular if most of that space is not occupied.  What does "homectl inspect" show?  If it lists "Auto Resize" and/or "Rebalance" as "on", try turning both of with "homectl update --auto-resize-mode=off --rebalance-weight=off" for your user account and see if this makes a difference.

Sorry for the delay.

It worked. Much faster now.

Thank you so much!

Offline

#9 2022-11-30 19:44:47

3beb6e7c46a615a
Member
Registered: 2021-03-27
Posts: 165

Re: [SOLVED] systemd-homed login takes very long.

You're welcome smile

Last edited by 3beb6e7c46a615a (2022-11-30 19:45:13)

Offline

#10 2022-11-30 20:24:04

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [SOLVED] systemd-homed login takes very long.

seth wrote:

homed will run chown on all your files when you login, what, along cloverskull's findings leads to the question

Why does it do that? It seems ... ych a fi.

Last edited by cfr (2022-11-30 20:24:23)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#11 2022-11-30 20:39:13

seth
Member
Registered: 2012-09-03
Posts: 49,972

Re: [SOLVED] systemd-homed login takes very long.

The concept requires abstraction from the specific ID table of the system - it's good to hear that this is recently no longer the case (quick google cooks up https://lwn.net/Articles/896255/ which suggests 5.12 and up can provide this and apparently homed is making use of that)

But before that, the only way was to chown the $HOME to the generated UID (something lennart commented w/ "as sucks" at the FOSDEM 20… which - yeah)

Offline

#12 2022-11-30 20:45:47

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [SOLVED] systemd-homed login takes very long.

seth wrote:

But before that, the only way was to chown the $HOME to the generated UID (something lennart commented w/ "as sucks" at the FOSDEM 20… which - yeah)

I see. I would have thought 'so much for that plan' would have been a more appropriate response, but ... hmm. Is it just me or does systemd sometimes seem the antithesis of unix philosophy? yikes


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB