[RESPONDED] Laptop crashes and reboot sometimes after resuming from suspend

Dear all,

I have a Framework Laptop 13 (AMD Ryzen™ 7040 Series) installed with Ubuntu 22.04LTS (updated).

Not always, but sometimes, a few second after logged in into the laptop following a suspend, the computer suddenly crashes and reboot from scratch (black screen, then BIOS, etc.).

It is not systematic and I am not sure how to better diagnose the issue.
I was wondering if any of you experienced the same issue.

Thanks in advance for your support,
Pierre

Try to check the last log after the reboot.
With journalctl --list-boot list the existing boots.
Then, take the one that has crashed (actually, should be the one before your session), and use the -? in front to look at that log with:
journalctl -b -1 -r where the -1 corresponds to the entry of the boot session you went into suspend.
The -r will show the log in reverse time, means what happened just before the crash, if it was written down, should show up at the beginning.

That’s how I go about that.

1 Like

Thanks Jord for the tips.

Hereunder are the last lines of log (in the chronological order), but not sure there is anything related to this crash. I will try again after the next one.

Best regards,
Pierre

jan 19 14:46:16 framework NetworkManager[1191]: [1705671976.4406] manager: NetworkManager state is now CONNECTED_GLOBAL
jan 19 14:46:16 framework systemd-resolved[1109]: wlp1s0: Bus client set search domain list to: home
jan 19 14:46:16 framework systemd-resolved[1109]: wlp1s0: Bus client set default route setting: yes
jan 19 14:46:16 framework systemd-resolved[1109]: wlp1s0: Bus client set DNS server list to: 192.168.1.1
jan 19 14:46:16 framework tincd[1230]: Got ALRM signal
jan 19 14:46:16 framework tincd[1230]: Flushing event queue
jan 19 14:46:16 framework gdm-fingerprint][300468]: gkr-pam: no password is available for user
jan 19 14:46:16 framework tincd[1230]: Metadata socket read error for ncsrv (85.57.195.9 port 655): Connection reset by peer
jan 19 14:46:16 framework tincd[1230]: Got ALRM signal
jan 19 14:46:16 framework tincd[1230]: Flushing event queue
jan 19 14:46:16 framework NetworkManager[1191]: [1705671976.9761] agent-manager: agent[6d959809613f8784,:1.97/org.gnome.Shell.NetworkAgent/1000]: agent registered
jan 19 14:46:16 framework ubuntu-appindicators@ubuntu.com[3498]: unable to update icon for software-update-available
jan 19 14:46:16 framework ubuntu-appindicators@ubuntu.com[3498]: unable to update icon for livepatch
jan 19 14:46:17 framework audit[1188]: USER_AVC pid=1188 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg=‘apparmor=“DENIED” operation=“dbus_signal” bus=“system” path=“/org/freedesktop/login1” interface=“org.freedesktop.DBus.Properties” member=“PropertiesChanged” name=“:1.20” mask=“receive” pid=106896 label=“firefox” peer_pid=1228 peer_label=“unconfined”
exe=“/usr/bin/dbus-daemon” sauid=102 hostname=? addr=? terminal=?’
jan 19 14:46:17 framework kernel: audit: type=1107 audit(1705671977.051:6926): pid=1188 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg=‘apparmor=“DENIED” operation=“dbus_signal” bus=“system” path=“/org/freedesktop/login1” interface=“org.freedesktop.DBus.Properties” member=“PropertiesChanged” name=“:1.20” mask=“receive” pid=106896 label=“firefox” peer_pid=1228 peer_label=“unconfined”
exe=“/usr/bin/dbus-daemon” sauid=102 hostname=? addr=? terminal=?’
jan 19 14:46:17 framework gnome-shell[3498]: g_signal_handler_disconnect: assertion ‘handler_id > 0’ failed
jan 19 14:46:17 framework gnome-shell[3498]: g_signal_handler_disconnect: assertion ‘handler_id > 0’ failed
jan 19 14:46:17 framework gnome-shell[3498]: g_signal_handler_disconnect: assertion ‘handler_id > 0’ failed
jan 19 14:46:17 framework gnome-shell[3498]: g_signal_handler_disconnect: assertion ‘handler_id > 0’ failed
jan 19 14:46:17 framework gnome-shell[3498]: g_signal_handler_disconnect: assertion ‘handler_id > 0’ failed
jan 19 14:46:17 framework gnome-shell[3498]: g_signal_handler_disconnect: assertion ‘handler_id > 0’ failed
jan 19 14:46:17 framework gnome-shell[3498]: g_signal_handler_disconnect: assertion ‘handler_id > 0’ failed
jan 19 14:46:17 framework gnome-shell[3498]: Window manager warning: Overwriting existing binding of keysym 31 with keysym 31 (keycode a).
jan 19 14:46:17 framework gnome-shell[3498]: Window manager warning: Overwriting existing binding of keysym 32 with keysym 32 (keycode b).
jan 19 14:46:17 framework gnome-shell[3498]: Window manager warning: Overwriting existing binding of keysym 33 with keysym 33 (keycode c).
jan 19 14:46:17 framework gnome-shell[3498]: Window manager warning: Overwriting existing binding of keysym 34 with keysym 34 (keycode d).
jan 19 14:46:17 framework gnome-shell[3498]: Window manager warning: Overwriting existing binding of keysym 35 with keysym 35 (keycode e).
jan 19 14:46:17 framework gnome-shell[3498]: Window manager warning: Overwriting existing binding of keysym 36 with keysym 36 (keycode f).
jan 19 14:46:17 framework gnome-shell[3498]: Window manager warning: Overwriting existing binding of keysym 37 with keysym 37 (keycode 10).
jan 19 14:46:17 framework gnome-shell[3498]: Window manager warning: Overwriting existing binding of keysym 38 with keysym 38 (keycode 11).
jan 19 14:46:17 framework gnome-shell[3498]: Window manager warning: Overwriting existing binding of keysym 39 with keysym 39 (keycode 12).
jan 19 14:46:17 framework dbus-daemon[3218]: apparmor=“DENIED” operation=“dbus_method_call” bus=“session” path=“/” interface=“org.freedesktop.DBus.Introspectable” member=“Introspect” name=“:1.39” mask=“receive” pid=106896 label=“firefox” peer_pid=3498 peer_label=“unconfined”
jan 19 14:46:17 framework dbus-daemon[3218]: apparmor=“DENIED” operation=“dbus_method_call” bus=“session” path=“/” interface=“org.freedesktop.DBus.Introspectable” member=“Introspect” name=“:1.39” mask=“receive” pid=106896 label=“firefox” peer_pid=3498 peer_label=“unconfined”
jan 19 14:46:20 framework audit[1188]: USER_AVC pid=1188 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg=‘apparmor=“DENIED” operation=“dbus_signal” bus=“system” path=“/org/freedesktop/login1” interface=“org.freedesktop.DBus.Properties” member=“PropertiesChanged” name=“:1.20” mask=“receive” pid=106896 label=“firefox” peer_pid=1228 peer_label=“unconfined”
exe=“/usr/bin/dbus-daemon” sauid=102 hostname=? addr=? terminal=?’
jan 19 14:46:20 framework kernel: audit: type=1107 audit(1705671980.387:6927): pid=1188 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg=‘apparmor=“DENIED” operation=“dbus_signal” bus=“system” path=“/org/freedesktop/login1” interface=“org.freedesktop.DBus.Properties” member=“PropertiesChanged” name=“:1.20” mask=“receive” pid=106896 label=“firefox” peer_pid=1228 peer_label=“unconfined”
exe=“/usr/bin/dbus-daemon” sauid=102 hostname=? addr=? terminal=?’

Nothing relevant in there, you’re right. Probably crashed before anything could have been written to log.
You’d need to prevent the kernel from rebooting the system so you can still check the kernel ring-buffer displayed on the screen.
If it is a panic, you could try to check out this: linux - Automatic Reboot after Kernel Panic - Server Fault

then use the sysreq keys Magic SysRq key - Wikipedia to get as much as possible out of the kernel (if it still responds).

I’s what I would do :}

The problem is that the laptop doesn’t freeze. It just completely crash and reboot straight away. No much I can do then. But I should not be the only one…

What could be done is a script to execute when resuming from suspend to log the state of the kernel at that time.

Hi @Pierre_van_Male

Is you BIOS version already up to date?
does the issue happen for both plugged and unplugged power cable?

Hi @Loell_Framework ,

Yes, my BIOS is up to date:

vmalep@framework:~$ sudo dmidecode -s bios-version
[sudo] password for vmalep: 
03.03

If it happens with the power cable plugged or not: good question. It only occurred a few time until now, so I am not sure. Definitely unplugged, but I will pay attention if it happens when plugged also.

Best regards,
Pierre

New crash this morning (laptop unplugged).

This is the last line of the journal log (just in case):


jan 22 08:08:07 framework avahi-daemon[1195]: New relevant interface wlp1s0.IPv6 for mDNS.
jan 22 08:08:07 framework avahi-daemon[1195]: Registering new address record for fe80::1957:f54f:f2ab:2818 on wlp1s0.*.
jan 22 08:08:07 framework dbus-daemon[2144]: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/" interface="org.freedesktop.DBus.Introspectable" member="Introspect" name=":1.39" mask="receive" pid=49568 label="firefox" peer_pid=2443 peer_label="unconfined"
jan 22 08:08:07 framework dbus-daemon[2144]: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/" interface="org.freedesktop.DBus.Introspectable" member="Introspect" name=":1.39" mask="receive" pid=49568 label="firefox" peer_pid=2443 peer_label="unconfined"

Is it from suspend or sleep mode?
If it is suspend, make sure your SWAP partition/file is a little larger than your RAM.
For suspend, can’t tell. The logs tell us nothing here.

Thanks @Jorg_Mertin for the FUP.

I guess it is suspend, because it is after having reopened the lid:

/etc/systemd/logind.conf:

#HandleLidSwitch=suspend

This said, I have 32Gb of RAM and 2GB of swap:

vmalep@framework:~$ free
total used free shared buff/cache available
Mem: 32016992 6473120 21463144 140424 4080728 24937572
Swap: 2002940 0 2002940

I will increase the swap anyway and see how it goes…

ref:

vmalep@framework:~$ free -h
total used free shared buff/cache available
Mem: 30Gi 6.4Gi 20Gi 114Mi 3.9Gi 23Gi
Swap: 32Gi 0B 32Gi

:crossed_fingers:

Best regards,
Pierre

If the laptop crashes again, I will resume this topic, but it seems to me that the issue was as swap file to small to store the RAM when the computer was ongoing on sleep mode.

Thanks @Jorg_Mertin for your support!

Dear all,

Since Jan 24, I have been using the computer without any problem of that kind.

Recently, I have resinstalled Linux on the computer. First Fedora, which created a BTRFS in place of ext4. Then I replaced Fedora by Ubuntu again (24.04, and because with Fedora, applications were crashing all the time), but maintaining the BTRFS to see how it goes.

This time, in place of a swap file (not possible with BTRFS), I created a swap partition:

And the issue of Ubuntu crashing upon resuming from suspend reappeared and it now very frequent…

I am planing to reinstall the all computer and switch back to ext4 fs like before. I hope the issue will disappear.

To be followed up…

BR
Pierre

Let us know how things went this time, good call on a fresh install with ext4 as a filesystem.

I crated a separate topic because I thought my issue was different, but it seems more and more like this one as I find out more.

I can take that down and move the information here if that’s the thing to do. For now I’ll give a summary of my corroboration of the issue.

I’m on Fedora 40, which uses btrfs. I haven’t used any other operating systems on the device. After opening the computer from suspend, less than 20 seconds after login (and interacting with the previously open applications as usual), it goes black and shows the splash screen and login page anew. This doesn’t happen every time. My working theory is that it happens after the first suspend-open since the computer was last fully restarted or shut down, and doesn’t occur on subsequent suspend-opens on the same session. I haven’t done it enough to confirm.

I also encounter the exact issue frequently. I am using Ubuntu 22.04 on FW13 AMD edition. I originally suspected that the problem originates from the connection to a power adapter, but I can not reliably reproduce the issue either with or without. I read the log in journalctl but found nothing suspicious. So frustrating.

Upon seeing this, I wonder if the problem has something to do with btrfs? So do both of you, I also have a btrfs setup on my Framework. Is there btrfs-related issue that might cause abrupt reboots? I would like to switch to ext4 in the future to help diagnose this issue.

As far as I understood, the problem comes from a too small swap (it must be bigger than the RAM). And with BTRFS, it is not possible to create a swapfile, only a swap partition. I had tried that solution and it was still not working.

I reinstalled Ubuntu using ext4 and then created a 32Gb swap file (I have 32Gb of RAM), but the computer was still crashing. I then created a 64Gb swap file and since then, no problem…

I have a 16GB ram and an 18GB swap file but it is still happening. By the way, do you have any possible guess of how a small swap triggers a reboot?

I’ve since experienced this in a greater time range, between seconds after login and minutes. Not yet happened twice in the same session, but it’s happened after the first and second suspend of different session. Whether it’s btrfs, swap, or a different issue, I wonder why it’s only now a problem. btrfs gets updated in newer kernels, but I stay relatively up to date and this definitely wasn’t a problem for me in January.

Eventually, after the reboot, you should recover the journal/logs entries?

sudo journalctl -b 1

will show you the log before the reboot, -b 2 from before the 2 last reboots and so on.
Eventually there is an indication on why the reboot happened?

I have tried reading journalctl output again and again but have not found any error. Even not a slight error message. I guess that if there was really an error, the error log had not been flushed to the hard disk.

I tried disabling the swap entirely. Did not work either.

1 Like