LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Debugging hibernation on laptop without a serial port (https://www.linuxquestions.org/questions/linux-hardware-18/debugging-hibernation-on-laptop-without-a-serial-port-4175632037/)

whereswaldon 06-15-2018 08:35 PM

Debugging hibernation on laptop without a serial port
 
I'm not sure that I'm posting in the correct topic. I chose hardware because my question currently revolves around USB/Serial devices. Please let me know if I should post this somewhere else.

I have a System76 Galago Pro laptop that I bought last summer. I have recently completed a Linux From Scratch build on it and have been playing around with various kernel features trying to learn how to use them. I briefly had hibernation working properly on the laptop, but it has now stopped functioning entirely. When I run
echo disk | sudo tee /sys/power/state
(which once worked as the command to initiate hibernation) the system pauses userspace programs, then the screen corrupts (graphics driver's fault?) and the system hangs. I can hold the power button to turn it off and restart, but the hibernation failed.

I'd like to diagnose the problem. I sometimes see flashes of kernel errors and warnings on the system console during this process, but I can't read anything before they disappear. Because userspace is not running when the system is creating a hibernation image, the logging daemon is not writing the kernel log to disk. I have no record of the error messages at all when I reboot.

I think this is the kind of problem that would be debugged by hooking up a serial terminal and setting the kernel to use that serial TTY as the system console. I do not have a hardware serial terminal or really any serial devices at all, just USB. I do, however, have multiple laptops at my disposal. So I guess I have several questions:
  • Does anyone know of a non-serial way that I can persist a copy of the logs while userspace is suspended?
  • Is there a way to connect two laptops (usb or ethernet cables?) and use one as a serial terminal for the other?
  • Do I need to buy two usb-to-serial converters and connect my two laptops so that they both just see a serial connection?

Thanks!

syg00 06-15-2018 10:17 PM

Quick search found this. Seems to cover things pretty well.

whereswaldon 06-16-2018 09:37 AM

Thanks for the link! It does have a couple tricks that I haven't tried yet. The serial debugging section presumes that you have a USB-to-serial hardware device and a device that can read serial. I don't have that, so I guess serial debugging is out. However, the NetConsole may work? Depends on a lot of things, but I'll give it a go.

https://wiki.ubuntu.com/Kernel/Netconsole -- route the console messages over UDP

I don't know whether the netconsole will suspend before the problems start, but there's only one way to find out!


All times are GMT -5. The time now is 02:38 PM.