1

After I close the lid of the laptop and come back the next day, then when I open the lid then I have to press the power key of the computer to turn it on. When it comes up then everything that was open in the background, before I closed the lid, is no longer open. When entering Google Chrome, it shows me that the application has crashed.

I get a message:

Sorry, Ubuntu 24.04 has experienced an internal error

1

I don't know if this message is related to the fact that the computer just shuts down after a few hours. The computer is not connected to the charger. The next day when I turn on the computer, the battery is about 2% less than when I closed the lid.

I did a test yesterday. I closed the lid when there are programs open at the moment, like Google Chrome. I opened the lid after fifteen minutes, and it showed me the login screen, I logged in and all the apps were open. The same thing happened after half an hour, one hour and two hours.

I already tried to check this: sudoedit /etc/systemd/logind.conf

I changed to this:

HandleLidSwitch=lock
HandleLidSwitchExternalPower=lock

Still, when I opened the lid today after about 18 hours, then the computer was off. After login, the message I mentioned in the picture appeared again. I also tried ...=ignore, still the same what can we do?

Thanks.

Edit1: Adding the output of running this commands (@david Open1 answer):

sudo cat /var/log/auth.log | grep -e systemd | grep -e 'session closed for user gdm*' -e 'session opened for user gdm*'

sudo cat /var/log/auth.log | grep -e systemd | grep -e 'System is powering down' -e 'New session c1'

Gives:

2024-07-14T08:55:06.481694+00:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-14T08:55:32.799155+00:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-14T12:07:15.750016+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-14T12:09:22.331274+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-15T23:56:13.856880+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-15T23:56:37.419300+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-16T16:33:53.202376+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-18T00:10:35.759526+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-18T13:18:18.007927+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-18T13:18:40.216150+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-18T13:25:03.855147+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-18T13:25:46.507359+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-18T16:43:39.108564+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-18T16:44:13.048698+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-22T12:39:15.136224+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-22T12:39:41.236405+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-23T10:57:31.367468+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-23T10:58:12.302548+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-23T15:09:53.832091+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-23T15:10:14.775069+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-23T15:25:52.147295+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-23T15:26:23.806236+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-23T15:27:06.478638+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-23T15:27:37.367076+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-23T15:30:19.192122+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-23T15:30:48.615782+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-23T15:31:53.062492+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-23T15:32:15.471893+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-23T15:39:40.069002+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-23T15:40:17.835007+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-23T18:03:48.648894+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-23T18:04:21.792115+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-24T19:45:12.150186+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-24T19:45:43.796644+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-25T00:39:35.965185+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-25T00:39:57.065729+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-25T17:56:32.872524+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-25T17:56:53.068383+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-25T20:51:00.054269+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-25T20:51:21.351274+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-25T23:23:22.062771+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-25T23:23:45.970179+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-26T10:54:29.769306+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-26T10:54:58.993811+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-26T17:19:14.341073+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-27T11:24:09.968286+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-27T11:24:31.168919+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-27T17:08:06.203257+03:00 asafyus-Vostro-3520 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=120) by gdm(uid=0)
2024-07-27T17:08:27.588087+03:00 asafyus-Vostro-3520 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
2024-07-14T08:55:06.453122+00:00 asafyus-Vostro-3520 systemd-logind[979]: New session c1 of user gdm.
2024-07-14T12:07:15.718738+03:00 asafyus-Vostro-3520 systemd-logind[844]: New session c1 of user gdm.
2024-07-15T23:56:13.821859+03:00 asafyus-Vostro-3520 systemd-logind[901]: New session c1 of user gdm.
2024-07-16T16:33:53.154660+03:00 asafyus-Vostro-3520 systemd-logind[887]: New session c1 of user gdm.
2024-07-18T00:10:35.736439+03:00 asafyus-Vostro-3520 systemd-logind[895]: New session c1 of user gdm.
2024-07-18T13:18:17.971677+03:00 asafyus-Vostro-3520 systemd-logind[899]: New session c1 of user gdm.
2024-07-18T13:25:03.817953+03:00 asafyus-Vostro-3520 systemd-logind[960]: New session c1 of user gdm.
2024-07-18T16:43:39.068636+03:00 asafyus-Vostro-3520 systemd-logind[892]: New session c1 of user gdm.
2024-07-22T12:39:15.097728+03:00 asafyus-Vostro-3520 systemd-logind[908]: New session c1 of user gdm.
2024-07-23T10:57:31.332317+03:00 asafyus-Vostro-3520 systemd-logind[912]: New session c1 of user gdm.
2024-07-23T10:57:44.361510+03:00 asafyus-Vostro-3520 systemd-logind[912]: New session c2 of user gdm.
2024-07-23T15:09:53.773349+03:00 asafyus-Vostro-3520 systemd-logind[895]: New session c1 of user gdm.
2024-07-23T15:25:52.114324+03:00 asafyus-Vostro-3520 systemd-logind[4828]: New session c1 of user gdm.
2024-07-23T15:27:06.456234+03:00 asafyus-Vostro-3520 systemd-logind[891]: New session c1 of user gdm.
2024-07-23T15:30:19.149075+03:00 asafyus-Vostro-3520 systemd-logind[3629]: New session c1 of user gdm.
2024-07-23T15:31:53.031158+03:00 asafyus-Vostro-3520 systemd-logind[892]: New session c1 of user gdm.
2024-07-23T15:39:40.043062+03:00 asafyus-Vostro-3520 systemd-logind[889]: New session c1 of user gdm.
2024-07-23T18:03:48.610819+03:00 asafyus-Vostro-3520 systemd-logind[891]: New session c1 of user gdm.
2024-07-24T19:45:12.131294+03:00 asafyus-Vostro-3520 systemd-logind[893]: New session c1 of user gdm.
2024-07-25T00:39:35.935217+03:00 asafyus-Vostro-3520 systemd-logind[901]: New session c1 of user gdm.
2024-07-25T17:56:32.850091+03:00 asafyus-Vostro-3520 systemd-logind[898]: New session c1 of user gdm.
2024-07-25T20:51:00.042151+03:00 asafyus-Vostro-3520 systemd-logind[888]: New session c1 of user gdm.
2024-07-25T23:23:22.052190+03:00 asafyus-Vostro-3520 systemd-logind[896]: New session c1 of user gdm.
2024-07-26T10:54:29.746853+03:00 asafyus-Vostro-3520 systemd-logind[891]: New session c1 of user gdm.
2024-07-26T17:19:14.324549+03:00 asafyus-Vostro-3520 systemd-logind[893]: New session c1 of user gdm.
2024-07-27T11:24:09.942291+03:00 asafyus-Vostro-3520 systemd-logind[903]: New session c1 of user gdm.
2024-07-27T17:08:06.179395+03:00 asafyus-Vostro-3520 systemd-logind[894]: New session c1 of user gdm.

Edit2: Adding the output of sudo cat /proc/sys/kernel/panic (@david Open2 answer)

sudo cat /proc/sys/kernel/panic
0

Edit2.1: Adding the output of last reboot | less

reboot   system boot  6.8.0-38-generic Sun Jul 28 00:31   still running
reboot   system boot  6.8.0-38-generic Sat Jul 27 17:08   still running
reboot   system boot  6.8.0-38-generic Sat Jul 27 11:24   still running
reboot   system boot  6.8.0-38-generic Fri Jul 26 17:19   still running
reboot   system boot  6.8.0-38-generic Fri Jul 26 10:54   still running
reboot   system boot  6.8.0-38-generic Thu Jul 25 23:23   still running
reboot   system boot  6.8.0-38-generic Thu Jul 25 20:50   still running
reboot   system boot  6.8.0-38-generic Thu Jul 25 17:56   still running
reboot   system boot  6.8.0-38-generic Thu Jul 25 00:39   still running
reboot   system boot  6.8.0-38-generic Wed Jul 24 19:45   still running
reboot   system boot  6.8.0-38-generic Tue Jul 23 18:03   still running
reboot   system boot  6.8.0-38-generic Tue Jul 23 15:39   still running
reboot   system boot  6.8.0-38-generic Tue Jul 23 15:31 - 15:39  (00:07)
reboot   system boot  6.8.0-38-generic Tue Jul 23 15:27 - 15:39  (00:12)
reboot   system boot  6.8.0-38-generic Tue Jul 23 15:09 - 15:39  (00:29)
reboot   system boot  6.8.0-38-generic Tue Jul 23 10:57 - 15:39  (04:41)
reboot   system boot  6.8.0-38-generic Mon Jul 22 12:39 - 15:39 (1+03:00)
reboot   system boot  6.8.0-38-generic Thu Jul 18 16:43 - 15:39 (4+22:55)
reboot   system boot  6.8.0-38-generic Thu Jul 18 13:24 - 15:39 (5+02:14)
reboot   system boot  6.8.0-38-generic Thu Jul 18 13:18 - 13:24  (00:06)
reboot   system boot  6.8.0-38-generic Thu Jul 18 00:10 - 13:24  (13:14)
reboot   system boot  6.8.0-38-generic Tue Jul 16 16:33 - 13:24 (1+20:50)
reboot   system boot  6.8.0-38-generic Mon Jul 15 23:56 - 13:24 (2+13:28)
reboot   system boot  6.8.0-38-generic Sun Jul 14 12:07 - 13:24 (4+01:17)
reboot   system boot  6.8.0-38-generic Sun Jul 14 11:54 - 12:06  (00:11)

wtmp begins Sun Jul 14 11:54:47 2024

Edit3: Adding the last -x shutdown | less output and UPower.conf file to show critical-battery-action percentage-low

# Only the system vendor should modify this file, ordinary users
# should not have to change anything.

[UPower]

Enable the Watts Up Pro device.

The Watts Up Pro contains a generic FTDI USB device without a specific

vendor and product ID. When we probe for WUP devices, we can cause

the user to get a perplexing "Device or resource busy" error when

attempting to use their non-WUP device.

The generic FTDI device is known to also be used on:

- Sparkfun FT232 breakout board

- Parallax Propeller

default=false

EnableWattsUpPro=false

Don't poll the kernel for battery level changes.

Some hardware will send us battery level changes through

events, rather than us having to poll for it. This option

allows disabling polling for hardware that sends out events.

default=false

NoPollBatteries=false

Do we ignore the lid state

Some laptops are broken. The lid state is either inverted, or stuck

on or off. We can't do much to fix these problems, but this is a way

for users to make the laptop panel vanish, a state that might be used

by a couple of user-space daemons. On Linux systems, see also

logind.conf(5).

default=false

IgnoreLid=false

Policy for warnings and action based on battery levels

Whether battery percentage based policy should be used. The default

is to use the time left, change to true to use the percentage, which

should work around broken firmwares. It is also more reliable than

the time left (frantically saving all your files is going to use more

battery than letting it rest for example).

default=true

UsePercentageForPolicy=true

When UsePercentageForPolicy is true, the levels at which UPower will

consider the battery low, critical, or take action for the critical

battery level.

This will also be used for batteries which don't have time information

such as that of peripherals.

If any value is invalid, or not in descending order, the defaults

will be used.

Defaults:

PercentageLow=20

PercentageCritical=5

PercentageAction=2

PercentageLow=20 PercentageCritical=5 PercentageAction=2

When UsePercentageForPolicy is false, the time remaining in seconds at

which UPower will consider the battery low, critical, or take action for

the critical battery level.

If any value is invalid, or not in descending order, the defaults

will be used.

Defaults:

TimeLow=1200

TimeCritical=300

TimeAction=120

TimeLow=1200 TimeCritical=300 TimeAction=120

The action to take when "TimeAction" or "PercentageAction" above has been

reached for the batteries (UPS or laptop batteries) supplying the computer

Possible values are:

PowerOff

Hibernate

HybridSleep

If HybridSleep isn't available, Hibernate will be used

If Hibernate isn't available, PowerOff will be used

CriticalPowerAction=HybridSleep

Running: last -x shutdown | less

shutdown system down  6.8.0-38-generic Tue Jul 23 15:39 - 15:39  (00:00)
shutdown system down  6.8.0-38-generic Thu Jul 18 13:24 - 13:24  (00:00)
shutdown system down  6.8.0-38-generic Sun Jul 14 12:06 - 12:07  (00:00)

wtmp begins Sun Jul 14 11:54:47 2024

Edit4:

The last lines from the batoutfile.txt

Tue Jul 30 12:17:11 AM IDT 2024
cat: /sys/class/power_supply/BAT1/capacity: No such file or directory
Tue Jul 30 12:18:51 AM IDT 2024
cat: /sys/class/power_supply/BAT1/capacity: No such file or directory
Tue Jul 30 12:20:31 AM IDT 2024
cat: /sys/class/power_supply/BAT1/capacity: No such file or directory
Tue Jul 30 12:22:11 AM IDT 2024
cat: /sys/class/power_supply/BAT1/capacity: No such file or directory

The last lines from the memoutfile.txt

Tue Jul 30 12:16:08 AM IDT 2024
               total        used        free      shared  buff/cache   available
Mem:            15Gi       9.1Gi       4.5Gi       854Mi       2.9Gi       6.2Gi
Swap:          4.0Gi          0B       4.0Gi
Tue Jul 30 12:17:48 AM IDT 2024
               total        used        free      shared  buff/cache   available
Mem:            15Gi       9.1Gi       4.5Gi       843Mi       2.9Gi       6.2Gi
Swap:          4.0Gi          0B       4.0Gi
Tue Jul 30 12:19:28 AM IDT 2024
               total        used        free      shared  buff/cache   available
Mem:            15Gi       9.1Gi       4.5Gi       828Mi       2.8Gi       6.2Gi
Swap:          4.0Gi          0B       4.0Gi
Tue Jul 30 12:21:08 AM IDT 2024
               total        used        free      shared  buff/cache   available
Mem:            15Gi       9.1Gi       4.5Gi       757Mi       2.8Gi       6.2Gi
Swap:          4.0Gi          0B       4.0Gi
Tue Jul 30 12:22:48 AM IDT 2024
               total        used        free      shared  buff/cache   available
Mem:            15Gi       9.3Gi       4.3Gi       842Mi       2.9Gi       6.0Gi
Swap:          4.0Gi          0B       4.0Gi

Edit5:

Running this for the kernel journalctl --since "2024-07-30 00:00" --until "2024-07-30 00:30" -k

Gives:

-- No entries --

Running this for the certain errors journalctl --since "2024-07-30 00:00" --until "2024-07-30 00:30" -p emerg..err # by priority like (emerg|alert|crit|err|warning|info|debug)

Gives:

Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: timeout waiting for FW reset ACK (inta_hw=0x0)
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: Start IWL Error Log Dump:
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: Transport status: 0x0000004A, valid: 6
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: Loaded firmware version: 77.f92b5fed.0 so-a0-jf-b0-77.ucode
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000084 | NMI_INTERRUPT_UNKNOWN       
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x000002F0 | trm_hw_status0
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | trm_hw_status1
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x004D2A06 | branchlink2
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x004C92BE | interruptlink1
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x004C92BE | interruptlink2
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00011F5A | data1
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x01000000 | data2
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | data3
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | beacon time
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x44A12D37 | tsf low
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000002 | tsf hi
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | time gp1
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x44A1B445 | time gp2
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000001 | uCode revision type
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x0000004D | uCode version major
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0xF92B5FED | uCode version minor
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000370 | hw version
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00480002 | board version
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x8046FF00 | hcmd
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00020000 | isr0
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | isr1
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x48F00002 | isr2
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00C3400C | isr3
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | isr4
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00310148 | last cmd Id
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00011F5A | wait_event
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | l2p_control
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | l2p_duration
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | l2p_mhvalid
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | l2p_addr_match
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000018 | lmpm_pmg_sel
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | timestamp
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x000018D0 | flow_handler
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | ADVANCED_SYSASSERT
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | umac branchlink1
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | umac branchlink2
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | umac interruptlink1
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | umac interruptlink2
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | umac data1
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | umac data2
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | umac data3
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | umac major
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | umac minor
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | frame pointer
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | stack pointer
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | last host cmd
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000000 | isr status reg
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: IML/ROM dump:
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000B03 | IML/ROM error/state
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00004F70 | IML/ROM data1
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000090 | IML/ROM WFPM_AUTH_KEY_0
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: Fseq Registers:
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x60000000 | FSEQ_ERROR_CODE
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x80330000 | FSEQ_TOP_INIT_VERSION
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00010009 | FSEQ_CNVIO_INIT_VERSION
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x0000A384 | FSEQ_OTP_VERSION
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x3D6D51D2 | FSEQ_TOP_CONTENT_VERSION
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x4552414E | FSEQ_ALIVE_TOKEN
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00080400 | FSEQ_CNVI_ID
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000201 | FSEQ_CNVR_ID
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00080400 | CNVI_AUX_MISC_CHIP
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000201 | CNVR_AUX_MISC_CHIP
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x0000485B | CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x0BADCAFE | CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00010009 | FSEQ_PREV_CNVIO_INIT_VERSION
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00330000 | FSEQ_WIFI_FSEQ_VERSION
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00330000 | FSEQ_BT_FSEQ_VERSION
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: 0x00000104 | FSEQ_CLASS_TP_VERSION
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: UMAC CURRENT PC: 0x8047e450
Jul 30 00:22:54 asafyus-Vostro-3520 kernel: iwlwifi 0000:00:14.3: LMAC1 CURRENT PC: 0xd0

Running this for all the stuff before the last event.stuff before the last event. journalctl --since "2024-07-30 00:00" --until "2024-07-30 00:30" -p emerg..err

Gives too much characters for this post, so I uploaded it: https://justpaste.it/c5lwe

The interesting lines are the last ones:

Jul 30 00:22:54 asafyus-Vostro-3520 gnome-shell[2221]: Cursor update failed: drmModeAtomicCommit: Invalid argument
Jul 30 00:22:54 asafyus-Vostro-3520 wpa_supplicant[960]: wlp0s20f3: CTRL-EVENT-DSCP-POLICY clear_all
Jul 30 00:22:54 asafyus-Vostro-3520 wpa_supplicant[960]: wlp0s20f3: CTRL-EVENT-DSCP-POLICY clear_all
Jul 30 00:22:54 asafyus-Vostro-3520 wpa_supplicant[960]: nl80211: deinit ifname=wlp0s20f3 disabled_11b_rates=0
Jul 30 00:22:55 asafyus-Vostro-3520 systemd[1]: Reached target sleep.target - Sleep.
Jul 30 00:22:55 asafyus-Vostro-3520 systemd[1]: Starting systemd-suspend.service - System Suspend...
Jul 30 00:22:55 asafyus-Vostro-3520 systemd-sleep[27546]: Performing sleep operation 'suspend'...
Jul 30 00:22:55 asafyus-Vostro-3520 kernel: PM: suspend entry (s2idle)

Edit7:

I have a lot of lines as output. These are the first lines:

Jul 30 00:22:55 asafyus-Vostro-3520 kernel: PM: suspend entry (s2idle)
    -- Boot 83a71f3902bc4612ba2c5b8593391d93 --
    Jul 30 08:34:08 asafyus-Vostro-3520 kernel: Linux version 6.8.0-38-generic (bui>
    Jul 30 08:34:08 asafyus-Vostro-3520 kernel: Command line: BOOT_IMAGE=/boot/vmli>
    Jul 30 08:34:08 asafyus-Vostro-3520 kernel: KERNEL supported cpus:
    Jul 30 08:34:08 asafyus-Vostro-3520 kernel:   Intel GenuineIntel
    Jul 30 08:34:08 asafyus-Vostro-3520 kernel:   AMD AuthenticAMD
    Jul 30 08:34:08 asafyus-Vostro-3520 kernel:   Hygon HygonGenuine
    Jul 30 08:34:08 asafyus-Vostro-3520 kernel:   Centaur CentaurHauls
    Jul 30 08:34:08 asafyus-Vostro-3520 kernel:   zhaoxin   Shanghai  
    Jul 30 08:34:08 asafyus-Vostro-3520 kernel: x86/split lock detection: #AC: cras>
    Jul 30 08:34:08 asafyus-Vostro-3520 kernel: BIOS-provided physical RAM map:

My disk is not encrypted. My system is not secure-boot.

Edit: Response to John Mee: On the line: GRUB_CMDLINE_LINUX_DEFAULT There is:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Running: sudo systemctl hibernate gives: Call to Hibernate failed: Sleep verb 'hibernate' is not configured or configuration is not supported by kernel

Running: swapon --show gives:

NAME      TYPE SIZE USED PRIO
/swap.img file   4G   0B   -2 

So I have automatic swap file. Can I add resume=/swap.img on the line: GRUB_CMDLINE_LINUX_DEFAULT?

Asaf
  • 29

2 Answers2

0

Your problem, that when entering hybrid-sleep and possibly suspend that it will only recover (from suspend) if left for times up-to 2 hours (from test - possibly longer) but will not recover for times greater than 8 hours (from test - possibly less).

I have had a look at what might possibly cause this such as controls from the BIOS or other set times set from the OS such as a watchdog of some kind and couldn't find anything. However you should try anything that might cause an interrupt to the main processor. With everything set to low power or off this list will be limited but try the following:-

  1. Any keyboard key that controls hardware such as printers etc.
  2. Try plugging in a USB device in all inputs. A keyboard or mouse might be a good thing to try.

The fact that there appears to be no log details of anything happening suggests to me at this stage you should consider suspend to be broken and to attempt to disable or bypass it altogether: -

Disable:

Turn off hybrid-sleep & suspend so that it never engages. That will mean when you shut the lid it will stay running. Beware there is a potential to damage the screen if it stays on and you need to insure the system is in a light sleep - to just turn off the screen etc. Of course, it will be using a lot more power.

if you haven't got it then install

sudo apt update
sudo apt upgrade 
sudo apt install dconf-editor

It must be run with elevated privileges for this use.

sudo dconf-editor

Read (and heed the warning message.)

navigate to org gnome setting-daemon plugins power

Change power-saver-profile-on-low-battery set this to false

Bypass:

As you have a unencrypted disk & running non-secure-boot you have the option of completing the installation of Hibernation and use that instead of suspend. (secure-boot requires an encrypted swap space that the kernel will understand (see link at end) and I don't currently know if this is even possible.) This might work along side hybrid-sleep but if not you can change the lid-action in the /etc/UPower/UPower.conf file (last line?). Hybrid-sleep sets the same resume details as suspend for hibernation but the former is in memory and the latter in swap space. To resume from hibernation you just boot the system, (turn on the power)

To complete the hibernation installation follow the description in the following link. It is quite complicated and involves changing some of the boot parameters so there is a risk of making your system unbootable so don't do this if you are not confident in boot system recovery.

https://ubuntuhandbook.org/index.php/2021/08/enable-hibernate-ubuntu-21-10/

https://linuxgenie.net/add-swap-space-ubuntu-24-04/

https://manpages.ubuntu.com/manpages/noble/en/man7/kernel_lockdown.7.html

david
  • 937
0

Your laptop does suspend but does not hibernate. The kernel panic is a distraction to be ignored, for now.

When you close the lid it goes into "suspend" mode. When you open the lid, whilst there is still power in the battery, suspend will resume where you left off relatively quickly. But suspend consumes enough battery to drain a full battery within a day.

You are expecting the system to automatically transition from "suspend" to "hibernate" when the battery gets too low, and resume from either when you open the lid. Ubuntu does not do that by default.

So, what you are experiencing is a system which does go into suspend, but does not transition into hibernate, then resume from that.

What you need to do is enable hibernation:

  • sudo edit /etc/default/grub
  • on the line GRUB_CMDLINE_LINUX_DEFAULT
  • add the resume parameter with the UUID to your disk
  • add the resume_offset parameter with the offset to your swap file
  • sudo update-grub

The best (only?) place to find detailed instructions for that is at https://ubuntuhandbook.org/index.php/2021/08/enable-hibernate-ubuntu-21-10/

John Mee
  • 1,053