You are not logged in.

#1 2023-09-18 05:22:53

Trvzn
Member
Registered: 2023-07-19
Posts: 17

[SOLVED] Shutdown/Reboot hangs due to udev-worker

Shutting down/Rebooting my 4 days-old arch install on my Thinkpad Z16 leaves the system hanging because of a udev-worker process. I've had the 'watchdog didn't stop' error before, but this one hangs for hours before I push the power button.

ps aux | grep udev

shows here I have almost 50 udev-worker processes running (I don't remember seeing so many in 10 years using arch, but maybe I never paid attention to it)

sudo dmesg

shows some errors in the output, but I'm not sure they matter.

journalctl -b-1

produces this output didn't help me much (but perhaps I don't know where to look)

Any help would be much appreciated.

Last edited by Trvzn (2023-09-20 15:28:45)

Offline

#2 2023-09-18 07:35:41

seth
Member
Registered: 2012-09-03
Posts: 54,271

Re: [SOLVED] Shutdown/Reboot hangs due to udev-worker

You've pipewire and PA installed => https://archlinux.org/packages/extra/x8 … ire-pulse/

Sep 17 12:37:51 soti kernel: Unstable clock detected, switching default tracing clock to "global"
                             If you want to keep using the local clock, then add:
                               "trace_clock=local"
                             on the kernel command line

maybe issue.

Sep 17 12:37:53 soti kernel:  ? __list_add_valid+0x6a/0xa0
Sep 17 12:37:53 soti kernel:  ? __warn+0x81/0x130
Sep 17 12:37:53 soti kernel:  ? __list_add_valid+0x6a/0xa0
Sep 17 12:37:53 soti kernel:  ? report_bug+0x171/0x1a0
Sep 17 12:37:53 soti kernel:  ? prb_read_valid+0x1b/0x30
Sep 17 12:37:53 soti kernel:  ? srso_alias_return_thunk+0x5/0x7f
Sep 17 12:37:53 soti kernel:  ? handle_bug+0x3c/0x80
Sep 17 12:37:53 soti kernel:  ? exc_invalid_op+0x17/0x70
Sep 17 12:37:53 soti kernel:  ? asm_exc_invalid_op+0x1a/0x20
Sep 17 12:37:53 soti kernel:  ? __list_add_valid+0x6a/0xa0
Sep 17 12:37:53 soti kernel:  amd_sfh_get_report+0xba/0x110 [amd_sfh dfe5f9b3b41d024534cca241cc93bc6f6d499180]
Sep 17 12:37:53 soti kernel:  amdtp_hid_request+0x36/0x50 [amd_sfh dfe5f9b3b41d024534cca241cc93bc6f6d499180]

====>>> Pretty much certainly your problem: https://bbs.archlinux.org/viewtopic.php … 9#p2118399

Sep 17 12:39:29 soti dunst[1004]: X connection to :0 broken (explicit kill or server shutdown).

You're crashing out of the session, but I don't think that's the problem.
It also doesn't address that, but as a general heads-up see the last link below and make sure you're importing  the session environment.

Offline

#3 2023-09-19 05:06:29

Trvzn
Member
Registered: 2023-07-19
Posts: 17

Re: [SOLVED] Shutdown/Reboot hangs due to udev-worker

Thank you for your help, Seth!

Seth wrote:

====>>> Pretty much certainly your problem: https://bbs.archlinux.org/viewtopic.php … 9#p2118399

I think you're onto something. I blacklisted it

sudo echo blacklist amd_sfh_pcie > /etc/modprobe.d/blacklist.conf

and the udev processes went away and shutting down worked several times, until it didn't anymore. The udev-worker processes are back (all 48 of them) and the reboot/shutdown now hangs again. I think you isolated the problem but what do you think I can do to solve it permanently?

As to the other minor issues:

Seth wrote:

You've pipewire and PA installed

They're both installed by applications as dependencies, but maybe there's a way to use just one of them. Never had problem with that before, but I'll look into it once I'm done with the main issue.

Seth wrote:

You're crashing out of the session

Thank you for noticing that. I think this might be linked to how I initialize my system: it automatically logs in and startx, so logging out of openbox reinitializes it immediately. When I shutdown, it crashes out of the session. Here's my xinitrc anyways.

#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

if [ -f $sysresources ]; then
    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi
xsetroot -cursor_name left_ptr &
setxkbmap us -variant intl &
synclient TapButton1=1&
xmodmap -e "keycode 94 = "
export QT_QPA_PLATFORMTHEME=qt5ct
setterm -blank 0 -powersave off -powerdown 0
xset s off
exec openbox-session

Offline

#4 2023-09-19 06:29:21

seth
Member
Registered: 2012-09-03
Posts: 54,271

Re: [SOLVED] Shutdown/Reboot hangs due to udev-worker

Don't fork xsetroot nor setxkbmap (not sure about synclient, probably neither fork that), but that only causes race conditions and is not linked to the problem, your xinitrc is otherwise fine though I'm unsure whether setterm does anything meaningful at this point.

Replace pulseaudio w/ pipewire-pulse.

Does amd_sfh still show up in the recent journals?

Offline

#5 2023-09-19 16:35:46

Trvzn
Member
Registered: 2023-07-19
Posts: 17

Re: [SOLVED] Shutdown/Reboot hangs due to udev-worker

I blacklisted amd_sfh last night and that seems to have done the job.

sudo echo amd_sfh >>/etc/modprobe.d/blacklist.conf

I'm gonna wait a bit more to mark this as solved for voodoo reasons.
Thanks for all the other tips and for looking into this issue, Seth. I'm always impressed by this community.

Offline

#6 2023-09-20 15:29:39

Trvzn
Member
Registered: 2023-07-19
Posts: 17

Re: [SOLVED] Shutdown/Reboot hangs due to udev-worker

Indeed, it seems to have been solved. Thanks for the help, marking as solved.

Offline

Board footer

Powered by FluxBB