Freeze at second boot fixed
This has been quite a drama!
In an earlier blog post, freeze was occurring on the second boot, and I blamed a kernel configuration -- strangely enough, the kernel change seemed to fix it. But then james2 posted, see discussion from here:
https://forum.puppylinux.com/viewtopic.php?p=152363#p152363
Strange, for me it was OK on some USB drives, not on others, then good ones started to freeze also. Incredibly frustrating.
But, today just happened to stare at the frozen black screen for sometime, over two minutes, and suddenly it sprung to life and got to the desktop.
So, something was timing out. I examined the kernel log, and saw these lines:
[ 194.590149] udevd[561]: timeout '/bin/sh -c 'echo add_0000:00:02.0_pci_0x8086_0x7d45_pci:v00008086d00007D45sv00001043sd00001C33bc03sc00i00 >> /tmp/udevtrace.log'' [ 194.590190] udevd[561]: slow: '/bin/sh -c 'echo add_0000:00:02.0_pci_0x8086_0x7d45_pci:v00008086d00007D45sv00001043sd00001C33bc03sc00i00 >> /tmp/udevtrace.log'' [4356] [ 195.027063] udevd[568]: timeout '/usr/local/pup_event/bluetooth-add' [ 195.027103] udevd[568]: slow: '/usr/local/pup_event/bluetooth-add' [4353] [ 195.039529] udevd[516]: timeout '/bin/sh -c 'echo add_dw-apb-uart.2_platform___platform:dw-apb-uart >> /tmp/udevtrace.log'' [ 195.039569] udevd[516]: slow: '/bin/sh -c 'echo add_dw-apb-uart.2_platform___platform:dw-apb-uart >> /tmp/udevtrace.log'' [4362] [ 195.413001] udevd[490]: timeout 'libinput-device-group /sys/devices/pci0000:00/0000:00:1f.3/sound/card0/input9/event9' [ 195.413001] udevd[566]: timeout '/bin/sh -c 'echo add_pcmC0D7p_sound___ >> /tmp/udevtrace.log'' [ 195.413028] udevd[490]: slow: 'libinput-device-group /sys/devices/pci0000:00/0000:00:1f.3/sound/card0/input9/event9' [4347] [ 195.413028] udevd[558]: slow: '/bin/sh -c 'echo add_pcmC0D8p_sound___ >> /tmp/udevtrace.log'' [4351]
Now, this is very interesting. When a udev rule calls a program, it allows very little time, then attempts to kill the program, and I think, times out if the kill unsuccessful.
Mindful of that, /usr/local/pup_event/bluetooth-add is very
short, launches another script as a detached process and returns
quickly. Did that 5 years ago, and it has worked fine, until now.
The rule is in /etc/udev/rules.d/91-pup_event.rules
What has changed is that now, even very very short scripts get killed, or attempted to be killed. This one:
/bin/sh -c 'echo add_pcmC0D8p_sound___ >> /tmp/udevtrace.log'
is in /etc/udev/rules.d/026_ti_usb_3410_5052.rules -- even that one line shell script is tagged as "slow".
There is a method of detaching a script directly in the udev rule, if using systemd. If not, there is a method using the 'at' command. For example, now have this in /etc/udev/rules.d/91-pup_event.rules:
ACTION=="remove", SUBSYSTEM=="bluetooth", RUN+="/usr/bin/at -M -f
/usr/local/pup_event/bluetooth-remove now"
Man page for the 'at' command:
https://linux.die.net/man/1/at
I have put in "-M", because saw that given in an example how to use 'at' in a udev rule, but have no idea what it does.
I have taken out '026_ti_usb_3410_5052.rules", because don't know
how to pass a parameter to a script when using the 'at' command.
Now, reboot and get the desktop immediately. I would like to acknowledge where I got the idea to use 'at' from:
https://stackoverflow.com/questions/49349712/udev-detach-script-to-wait-for-mounting
Almost ready to upload the next release of Easy Excalibur, but something weird has happened; the network tray icon has a big "X" on it. That was fixed!!! See earlier posts:https://bkhome.org/news/202507/proper-fix-for-network-tray-applet.html
...how could that problem have come back? Will probably look at
that next.
Tags: easy