I upgraded from Ubuntu 20.04 to 22.04 and two days later (without any new installations since then, but possibly also without any rebooting) my laptop keeps shutting down after 2 minutes, independent of what i did in those 2 minutes.
As a brief "warning" the normal popup window with the message "Power Off - The system will power off automatically in 60 seconds" appears, but the system shuts down 5 seconds later.
Trying to start in recovery mode, the laptop starts beeping continously, and the terminal freezes after ~15 seconds.
What I tried so far: Upon starting, there were error messages related to sssd, but disabeling sssd didn't help. (The messages disappeared, but the systrm keeps shutting down.)
/var/log/kern.log showed a lot of messages related to snapd-desktop-integration, but removing it also didn't help with the problem.
I don't know if the fans are still working, they don't seem to turn on. Installing fancontrol and using pwmcontrol didnt work, as there are no sensors found. But i am not sure how to even test, if this is the cause of my problems. Cpu temperature seems to be low enough (<40° according to a check with lm-sensors).
Comparing the outputs of the queries with this thread:
Laptop randomly shutting down / suspending after a few minutes. 20.04.2 LTS
I find a few differences:
journalctl is completely filled with xxx: Failed to write 'change' to '/sys/devices/virtual/xxx/uevent': Permission denied
,
With various xxx.
The kern.log file shows different messages:
Even tough the system only shuts down after > 60 seconds, the last entry is made before between 12 and 100 seconds:
rfkill: input handler enabled
Edit: Reading up on it more, the issue of power supply comes up sometimes. For me the problem appears running only on battery, running with cable and battery, and when using only the cable with a detached battery
Edit 2:
Journalctl does not contain the messages above, i don't remebember where i found them. journalctl indeed shows the line systemd-logind[790]: Power key pressed
,
If therre a way to disable this from shutting down the laptop?