Reliable Way to Get Logs?

Hello,
So I think that my laptop is having difficulty resuming from sleep in a reliable way. Occasionally, after locking the desktop and turning off the screen, when I press a key, the display doesn’t come back on.
Now I have heard rumblings about amdgpu not playing well with sleep states, but the thing is, I have no logs (and I must scream). If I have no evidence of something going wrong, how can it be fixed?
The most recent occurrence of this was yesterday. The laptop had been up for two weeks with no issue, but as I picked it up in the morning and tried to wake it, the keyboard was responsive but the screen was blank. I know that I had left Firefox with a few tabs (less than 10) open.

Over time, when experiencing issues I had begun to start the sshd service in the background as a means of troubleshooting my workstation with no display, but could not get to it this time (“connection refused)”. The laptop was still responding to pings.

To try to force the laptop to “do something”, I connected the HDMI port to a monitor. The system can ignore the user all day long, but it can’t ignore hardware changes.

It was at this point that a black screen with a blinking/flashing cursor in the corner became visible (on the laptop display and the monitor). Pleased, because I could now see “something”, but also not pleased because the WM had apparently died and the system was locked up.

Magic SysRq is apparently a no-go. By default, all commands except sync (Alt+Print Screen then ‘S’) are disabled. I have since changed this (sysctl -w kernel.sysrq=1).

At this point, I had to accept that the system was beyond saving and held the power button. Unfortunately, as I use Fedora in a completely immutable fashion (Fedora 43 Sway Spin, booting from Live USB) the system journal is not retained, so I have no further insight as to what’s going on.

So, a couple of questions:-

  • Can I ringfence sshd in such a way that it can’t be killed?
  • Can I redirect the system journal/dmesg to a network destination reliably (so it still sends even when in distress?)

Possibly you may be able to wake the system if you enabled Wake On Lan for the interface. This may not be possible when suspended if the LAN interface is wifi though, since suspend also normally disables wifi as part of the suspension process.

Sleep leaves the system active and sshd should remain active with the LAN interface active. Suspend actually does a shutdown of those functions.

Is it possible that you are actually doing a suspend instead of sleep?

I do not use either. My desktop runs active 24x7 and I only allow it to lock the screen.

The laptop is on wi-fi 99% of the time.
I’m pretty sure that in most instances, it (the CPU) wakes up fine, but the graphics driver has trouble getting hold of the display.
The laptop’s IP address still responds to pings, so at a low level it was “there”, but the userspace was most likely trashed and not able to present anything (like a VT) on screen.

So really I’m trying to deal with 2 issues: a suspected problem with AMD graphics and sleeping, and a suspected problem with memory consumption wiping out the userspace.
The fact that I am running from a Live USB does not help things (has to use RAM to hold changes to the LiveOS filesystem).
What I would give for a serial port right now…

I have a couple small SSD’s left after upgrading systems to larger SSD’s, mounted in USB3 cases, and populated with Fedora. These are actually faster than the original laptop internal spinning disks. You should be able to find small lightly used SSD’s on ebay or a local computer shop. Note that several differently keyed connectors have been used so you have to check specs and choose an appropriate external case for the SSD model.