Skip to contentSkip to conversation

2.6.38-rc6: SysRq broken?

DISCUSSION Alexey Dobriyan 3 participants 7 messages Feb 28, 2011 – Mar 1, 2011

lore
Share & tools
lore
#0 lore raw

It just strikes me that SysRq is broken here:
Alt+SysRq+h doesn't print anything

CONFIG_MAGIC_SYSRQ=y
CONFIG_INPUT_EVDEV=y
kernel.sysrq=1
echo h >/proc/sysrq-trigger works

Keyboard is USB one, "Logitech HID compliant keyboard".

#1 lore raw
Quoted 9 lines · Alexey Dobriyan

It just strikes me that SysRq is broken here:
Alt+SysRq+h doesn't print anything

CONFIG_MAGIC_SYSRQ=y
CONFIG_INPUT_EVDEV=y
kernel.sysrq=1
echo h >/proc/sysrq-trigger works

Keyboard is USB one, "Logitech HID compliant keyboard".

What does /proc/bus/input/devices show?

Signature · 1 line
Dmitry
#2 lore raw
Quoted 4 lines · Dmitry Torokhov
Quoted 3 lines · Alexey Dobriyan

It just strikes me that SysRq is broken here:
Alt+SysRq+h doesn't print anything

Quoted 8 lines
Quoted 6 lines

CONFIG_MAGIC_SYSRQ=y
CONFIG_INPUT_EVDEV=y
kernel.sysrq=1
echo h >/proc/sysrq-trigger works

Keyboard is USB one, "Logitech HID compliant keyboard".

What does /proc/bus/input/devices show?

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input0
U: Uniq=
H: Handlers=kbd event0
B: PROP=0
B: EV=3
B: KEY=10000000000000 0

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=3
B: KEY=10000000000000 0

I: Bus=0003 Vendor=093a Product=2510 Version=0111
N: Name="PIXART USB OPTICAL MOUSE"
P: Phys=usb-0000:00:1d.0-1.1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/input/input2
U: Uniq=
H: Handlers=mouse0 event2
B: PROP=0
B: EV=17
B: KEY=70000 0 0 0 0
B: REL=103
B: MSC=10

I: Bus=0003 Vendor=046d Product=c30e Version=0110
N: Name="Logitech HID compliant keyboard"
P: Phys=usb-0000:00:1d.0-1.2/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/input/input3
U: Uniq=
H: Handlers=sysrq kbd event3
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff800000000007ff febeffdff3cfffff fffffffffffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=046d Product=c30e Version=0110
N: Name="Logitech HID compliant keyboard"
P: Phys=usb-0000:00:1d.0-1.2/input1
S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.1/input/input4
U: Uniq=
H: Handlers=kbd event4
B: PROP=0
B: EV=13
B: KEY=fff ffffffffffffffff 2000000 387ad800d001 1e000000000000 0
B: MSC=10

#3 lore raw
Quoted 15 lines · Alexey Dobriyan
Quoted 4 lines · Dmitry Torokhov
Quoted 3 lines · Alexey Dobriyan

It just strikes me that SysRq is broken here:
Alt+SysRq+h doesn't print anything

Quoted 8 lines
Quoted 6 lines

CONFIG_MAGIC_SYSRQ=y
CONFIG_INPUT_EVDEV=y
kernel.sysrq=1
echo h >/proc/sysrq-trigger works

Keyboard is USB one, "Logitech HID compliant keyboard".

What does /proc/bus/input/devices show?

Quoted 12 lines

I: Bus=0003 Vendor=046d Product=c30e Version=0110
N: Name="Logitech HID compliant keyboard"
P: Phys=usb-0000:00:1d.0-1.2/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/input/input3
U: Uniq=
H: Handlers=sysrq kbd event3
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff800000000007ff febeffdff3cfffff fffffffffffffffe
B: MSC=10
B: LED=7

Hmm, looks like we bound sysrq handler here and the device has both alt and SysRq keys. Is it only help that is not working? What abouth other functions (reboot, etc)?

Signature · 1 line
Dmitry
#4 lore raw
Quoted 29 lines · Dmitry Torokhov
Quoted 15 lines · Alexey Dobriyan
Quoted 4 lines · Dmitry Torokhov
Quoted 3 lines · Alexey Dobriyan

It just strikes me that SysRq is broken here:
Alt+SysRq+h doesn't print anything

Quoted 8 lines
Quoted 6 lines

CONFIG_MAGIC_SYSRQ=y
CONFIG_INPUT_EVDEV=y
kernel.sysrq=1
echo h >/proc/sysrq-trigger works

Keyboard is USB one, "Logitech HID compliant keyboard".

What does /proc/bus/input/devices show?

Quoted 12 lines

I: Bus=0003 Vendor=046d Product=c30e Version=0110
N: Name="Logitech HID compliant keyboard"
P: Phys=usb-0000:00:1d.0-1.2/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/input/input3
U: Uniq=
H: Handlers=sysrq kbd event3
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff800000000007ff febeffdff3cfffff fffffffffffffffe
B: MSC=10
B: LED=7

Quoted 2 lines

Hmm, looks like we bound sysrq handler here and the device has both alt and SysRq keys.

Yes, both.

Quoted 1 line

Is it only help that is not working? What abouth other functions (reboot, etc)?

Seems so, SysRq+Sync works, SysRq+L works as well.

#5 lore raw
In reply to Alexey Dobriyan
Quoted 9 lines · On Mon, 28 February 2011 Alexey Dobriyan <[email protected]> wrote:

It just strikes me that SysRq is broken here:
Alt+SysRq+h doesn't print anything

CONFIG_MAGIC_SYSRQ=y
CONFIG_INPUT_EVDEV=y
kernel.sysrq=1
echo h >/proc/sysrq-trigger works

Keyboard is USB one, "Logitech HID compliant keyboard".

I've seen same kind of issue with built-in keybaord (PS2) of my laptop.

Sysrq-Sync, Sysrq-Umount, Sysrq-Help didn't work but Sysrq-reBoot did.

In my case it was during "stuck" shutdown process, caps key was still working and toggled caps LED anything else didn't trigger anything visible.

Bruno

#6 lore raw
Quoted 11 lines · On Mon, 28 February 2011 Bruno Prémont <[email protected]> wrote:
Quoted 9 lines · On Mon, 28 February 2011 Alexey Dobriyan <[email protected]> wrote:

It just strikes me that SysRq is broken here:
Alt+SysRq+h doesn't print anything

CONFIG_MAGIC_SYSRQ=y
CONFIG_INPUT_EVDEV=y
kernel.sysrq=1
echo h >/proc/sysrq-trigger works

Keyboard is USB one, "Logitech HID compliant keyboard".

Quoted 8 lines

I've seen same kind of issue with built-in keybaord (PS2) of my laptop.

Sysrq-Sync, Sysrq-Umount, Sysrq-Help didn't work but Sysrq-reBoot did.

In my case it was during "stuck" shutdown process, caps key was still working and toggled caps LED anything else didn't trigger anything visible.

Bruno

Well it worked (half way?) though fb was probably frozen (vt-deadlock?) as I have traces in my log:

[14382.063476] pcmanfm[28117]: segfault at 8 ip b772e5b5 sp bfcfba30 error 4 in libfm-gtk.so.0.0.0[b7700000+34000]
[43437.896858] SysRq : Emergency Sync
[43572.221361] SysRq : Keyboard mode set to system default
[43575.574551] SysRq : Emergency Sync
[43590.513441] SysRq : Emergency Remount R/O
[43605.923769] SysRq : Emergency Sync
[43607.320324] SysRq : Emergency Remount R/O
[43627.329605] SysRq : HELP : loglevel(0-9) reBoot Crash terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) 
thaw-filesystems(J) saK show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync show-task-states(T) Unmount force-fb
(V) show-blocked-tasks(W) 
[43676.561306] SysRq : Emergency Sync
[43690.319213] SysRq : SAK
[43690.319245] SAK: killed process 1926 (Xorg): task_session(p)==tty->session
[43690.319313] SAK: killed process 1926 (Xorg): task_session(p)==tty->session
[43690.319345] SAK: killed process 2801 (rc): fd#0 opened to the tty
[43690.319358] SAK: killed process 2802 (rc): fd#0 opened to the tty
[43690.319368] SAK: killed process 2890 (ntpd): fd#0 opened to the tty
[43690.319378] SAK: killed process 2891 (runscript.sh): fd#0 opened to the tty
[43690.319387] SAK: killed process 2898 (start-stop-daem): fd#0 opened to the tty
[43694.809374] SysRq : Keyboard mode set to system default
[43797.368728] SysRq : SAK
[43797.368768] SAK: killed process 1926 (Xorg): task_session(p)==tty->session
[43797.368829] SAK: killed process 1926 (Xorg): task_session(p)==tty->session
[43797.368864] SAK: killed process 2898 (start-stop-daem): fd#0 opened to the tty

But then, "Emergency Remount R/O" should have prevented anything further from hitting the disk. (and after sysrq-reboot filesystems were dirty)

Bruno