Re: sysrq over *USB*
On Fri, Oct 15, 2021 at 09:02:50PM +0200, Marc SCHAEFER wrote:
> Should I abandon all hope to make it work with USB, or should it work?
Yes, sysrq can work with USB, but not with stock Debian kernels,
because of [1].
Here is the work-around:
1) recompile kernel (see [2]) with the following options:
CONFIG_USB=y
CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_CONSOLE=y
CONFIG_U_SERIAL_CONSOLE=y
2) configure /etc/default/grub with console=ttyUSB0,9600 console=tty0
and run upgrade-grub
3) I then get:
# cat /proc/consoles
tty0 -WU (EC p ) 4:1
ttyUSB0 -W- (E p ) 188:0
and I can then do sysrq from USB:
schaefer@acer-1:~$ cu -l ttyUSB0 -s 9600
Connected.
~%break
[ 1633.701624] sysrq: HELP : loglevel(0-9) reboot(b) crash(c)
terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i)
thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l)
show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p)
show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u)
force-fb(V) show-blocked-tasks(w) dump-ftrace-buffer(z)
Also, the HDMI console still works (logs & sysrq).
The problem and solution was found with help from the kernel-newbies
mailing-list.
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=868352
[2] https://wiki.debian.org/BuildADebianKernelPackage
Reply to: