Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #242316

Re: sysrq over *USB*

From Marc SCHAEFER <schaefer@alphanet.ch>
Newsgroups linux.debian.user
Subject Re: sysrq over *USB*
Date 2021-11-21 22:00 +0100
Message-ID <Dm26l-751-5@gated-at.bofh.it> (permalink)
References <D8AKC-5jE-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

sysrq over *USB* Marc SCHAEFER <schaefer@alphanet.ch> - 2021-10-15 21:10 +0200
  Re: sysrq over *USB* Nicholas Geovanis <nickgeovanis@gmail.com> - 2021-10-16 04:40 +0200
    Re: sysrq over *USB* Marc SCHAEFER <schaefer@alphanet.ch> - 2021-10-18 13:10 +0200
      Re: sysrq over *USB* David Wright <deblis@lionunicorn.co.uk> - 2021-10-18 18:20 +0200
  Re: sysrq over *USB* Marc SCHAEFER <schaefer@alphanet.ch> - 2021-11-21 22:00 +0100

csiph-web