Hello. I am using Tumbleweed KDE. When I did last command I saw that tty2 crashes every time I shutdown my pc. Why is that happening?
tty2 :0 Mon May 19 03:48 - crash
reboot system boot 6.14.6-1-default Mon May 19 03:46 - 10:20 (06:33)
tty2 :0 Sat May 3 17:59 - crash
reboot system boot 6.14.4-1-default Sat May 3 17:57 - 19:06 (01:08)
tty2 :0 Sat May 3 02:07 - crash
reboot system boot 6.14.4-1-default Sat May 3 02:07 - 02:48 (00:41)
I do not see this line on the Tumbleweed with KDE/Wayland. Find out what process creates it (it looks rather strange anyway, the first field is supposed to be a user name).
$ last
marel tty2 :0 Sun May 25 10:29 - still logged in
reboot system boot 6.14.6-1-default Sun May 25 09:28 - still running
marel tty2 :0 Sat May 24 08:49 - crash
reboot system boot 6.14.6-1-default Sat May 24 08:48 - 23:50 (17:01)
marel tty2 :0 Fri May 23 19:34 - crash
reboot system boot 6.14.6-1-default Fri May 23 19:33 - 23:52 (04:19)
marel Fri May 23 09:05 - crash
marel Fri May 23 09:01 - crash
marel tty2 :0 Fri May 23 08:38 - crash
reboot system boot 6.14.6-1-default Fri May 23 08:37 - 08:55 (01:17)
So what I see:
When the computer is switched on I see saying reboot system boot
One minute later I see tty2 :0 <timestamp> - crash, that is likely some process (grud/sddm) being terminated after boot.
A shutdown is not getting logged
man last gives:
wtmpdb last goes through the /var/lib/wtmpdb/wtmp.db database (or the database designated by the -f option) and displays a list of of all users logged in and logged out.
So it looks like that with a shutdown there is no formal log out.
$ sqlite3 /var/lib/wtmpdb/wtmp.db
sqlite> .tables
wtmp
sqlite> .headers on
sqlite> .width auto
sqlite> .mode column
sqlite> SELECT * FROM wtmp ORDER BY ID DESC LIMIT 9;
ID Type User Login Logout TTY RemoteHost Service
---- ---- ------ ---------------- ---------------- ---- ---------------- --------------
1660 3 marel 1748150954291067 tty2 :0 sddm-autologin
1659 1 reboot 1748150935747118 ~ 6.14.6-1-default
1658 3 marel 1748062180691719 tty2 :0 sddm-autologin
1657 1 reboot 1748062121747382 1748123420223578 ~ 6.14.6-1-default
1656 3 marel 1748021646649882 tty2 :0 sddm-autologin
1655 1 reboot 1748021625747204 1748037173386667 ~ 6.14.6-1-default
1654 3 marel 1747980345474920 login
1653 3 marel 1747980063721283 login
1652 3 marel 1747978695477502 tty2 :0 sddm-autologin
So yes, it is sddm-autologin that “crashes”, could it be:
sudo journalctl -b -g SIGRTMIN
May 25 09:28:57 systemd[1]: Received SIGRTMIN+20 from PID 421 (plymouthd).
May 25 09:29:11 systemd[1]: Received SIGRTMIN+20 from PID 421 (plymouthd).
May 25 09:29:12 systemd[1]: Received SIGRTMIN+21 from PID 421 (plymouthd).
May 25 09:29:12 systemd[1]: Received SIGRTMIN+21 from PID 421 (plymouthd).
Once more - it does not crash. Stop confusing everyone. It did not write logout record. It could be because it crashed, but most likely - because on shutdown there is no logout, user session is just terminated. Just try to actually log out and shutdown from the SDDM greeter.
No, it could not. Read man systemd what SIGRTMIN+20 means.
What makes you think this ticket is related to this topic?
What makes you think it is SDDM problem to start with?
GNOME+gdm:
bor@tw:~> last
bor tty2 Mon May 26 07:11 - still logged in
reboot system boot 6.14.6-9.gce99fa Mon May 26 07:09 - still running
bor Sun May 18 08:30 - crash
bor Sun May 18 08:30 - crash
bor pts/0 UNKNOWN Sun May 18 07:38 - 08:42 (01:03)
bor pts/0 UNKNOWN Sun May 18 07:29 - 07:36 (00:06)
root tty1 Sat May 17 10:22 - 10:22 (00:00)
bor tty2 Sat May 17 10:12 - crash
reboot system boot 6.14.6-9.gce99fa Sat May 17 10:11 - 10:20 (00:08)
bor tty2 Sat May 17 07:12 - crash
reboot system boot 6.14.6-8.gce99fa Sat May 17 07:11 - 10:11 (03:00)
Once more - there is no desktop logout sequence when system is going to shutdown. Period. Sometimes you may be lucky and your session has chance to terminate (like SSH sessions, UNKNOWN is due to VSOCK, or terminal session).
How the ticket is related is that I think that if sddm-helper was properly terminated after log out the session would be properly ended. But to be honest I do not know the details here likely sddm-helper is not responsible for updating the wtmpdb at log out.
Indeed it looks like for every computer session two “user sessions” are started, one that is properly ended on shutdown and one, the sddm-helper session not. If I issue w I see (only) the sddm-helper session:
$ w
21:37:22 up 43 min, 1 user, load average: 0.47, 0.62, 0.61
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
marel tty2 - 20:54 43:02 1:45 0.01s /usr/libexec/sddm/sddm-helper --socket /tmp/sddm-auth-<snip> --id 1 --start /usr/bin/startplasma-x11 --user marel --autologin
Another “throw this out there” for examination.
Here’s what I did. Powered up the machine. At the login screen, I did a CTRL-ALT-F1, then logged in as the root user, then executed the “ps axjf”. Then I logged out of that F1 Console session …
Then (at GUI login screen) logged in as my regular user account.
Next, I logged out of my regular user account (the KDE Plasma environment)
Then, back at the login screen, I repeated the CTRL-ALT-F1, logged in as the root user, then executed the “ps axjf” again … here’s the cat’ed output: