Summary: | setkeycodes b725 84 doesn't work (KDSETKEYCODE: No such device) changing the magic sysrq key on usb kbd | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Federico Ferri (RETIRED) <mescalinum> |
Component: | [OLD] Core system | Assignee: | Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel> |
Status: | RESOLVED UPSTREAM | ||
Severity: | major | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
URL: | http://marc.theaimsgroup.com/?l=linux-kernel&m=110430679525030&w=2 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 185788 | ||
Bug Blocks: | |||
Attachments: |
This is the patch file i was talking about
sysrq_scancode.patch This is the latest versione of my patch |
Description
Federico Ferri (RETIRED)
![]() Created attachment 62231 [details, diff]
This is the patch file i was talking about
This is the patch file i was talking about
that patch is already applied to linux-2.6.11-gentoo-r9. PLEASE CAN SOMEONE TELL ME WHY I CANNOT CHANGE SYSRQ SCANCODE ON USB_KEYBOARD? MANY MANY THANKS Please add output of "emerge info" to every bug that you file like it says on the bug submission form. `emerge info`: Gentoo Base System version 1.6.12 Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r9 i686) ================================================================= System uname: 2.6.11-gentoo-r9 i686 AMD Athlon(tm) XP 2800+ Python: dev-lang/python-2.3.5 [2.3.5 (#1, May 5 2005, 07:35:49)] ccache version 2.3 [enabled] dev-lang/python: 2.3.5 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -mno-sse" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -mno-sse" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.ngi.it" LANG="it_IT" LC_ALL="it_IT" LINGUAS="it" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X aalib alsa apache2 apm avi bash-completion berkdb bitmap-fonts bonobo cdr crypt cups curl divx4linux dvd dvdr eds emboss encode escreen esd fam flac flash foomaticdb fortran ftp gd gdbm gif glitz gpm gtk gtk2 gtkhtml guile imagemagick imlib innodb ipv6 jack java joystick jpeg junit ladcca ladspa ldap libg++ libwww mad mikmod mmx mono motif mozdevelop mozilla mozsvg mp3 mpeg mysql ncurses network nls nvidia ogg oggvorbis opengl oss pam pcre pdflib perl png python qt quicktime readline real rtc samba sdk sdl slang spell sqlite ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts unicode usb userlocales vim-with-x vorbis xine xml xml2 xmms xv xvid zlib zvbi linguas_it userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LDFLAGS Can you reproduce this on vanilla-sources-2.6.13_rc1? yes, it happen the same thing (and doesn't work framebuffer, nvidia video, alsa) i saved the output of strace running setkeycodes on 2.6.13_rc1. here's some relevant lines: open("/dev/tty", O_RDWR) = 3 ioctl(3, KDGKBTYPE, 0xbffdfcb7) = 0 ioctl(3, KDSETKEYCODE, 0xbffdfd20) = -1 ENODEV (No such device) dup(2) = 4 fcntl64(4, F_GETFL) = 0x8001 (flags O_WRONLY|O_LARGEFILE) close(4) = 0 ... write(2, "KDSETKEYCODE: No such device\n", 29KDSETKEYCODE: No such device ) = 29 ... write(2, "failed to set scancode 64b7 to k"..., 42failed to set scancode 64b7 to keycode 84 ) = 42 i repeat: this is an USB keyboard. could this change some behavior? =| Odd. Does /sys/class/tty/tty exist? This command might help: mknod /dev/tty c 5 0 See upstream response: "Sorry, you can't use 'setkeycodes' on USB keyboards. They don't use the PS/2 protocol, and hence it doesn't make sense." Created attachment 63042 [details, diff]
sysrq_scancode.patch
i released a patch for linux-kernel that allows you to change the default KEY_SYSRQ scancode Created attachment 63466 [details, diff]
This is the latest versione of my patch
It is a one-line hack that adds one more question after "Magic Sysrq Key", and
allows you to specify a keycode other than 99 (KEY_SYSRQ).
Please submit this properly (i.e. read Documentation/SubmittingPatches). We'll include it once it gets accepted upstream. Please reopen this bug when your patch has been included in the upstream kernel, and then we'll include it in gentoo-sources. Thanks. upstream mostly ignored my patch. would you include that? (come on, it's SO simple) otherwise: in the middle of which process I can hook it, in order to have it applied each time I emerge gentoo-sources kernel? No. Get it included upstream first. I searched my LKML archives and I don't see any patch submissions from you. Please re-read Documentation/SubmittingPatches. you didn't search well :) http://lkml.org/lkml/2005/7/12/241 also I sent that patch privately to Linus. still it got ignored. actually I am not subscribed anymore to LKML. (but it'd be worth trying again to submit that patch?) Please stop reopening the bug until it is accepted into Linus' tree. My archives do not go back that far. If you only submitted it once, 2 years ago, then it demonstrates that you haven't read SubmittingPatches which points out it's normal for you to have to resend your patch. this can be solved (for real) using the keyfuzz (bug #185788) on a recent (>=2.6.22_rc1) kernel. I'll wait for gentoo-sources-2.6.22 and report here wether it works gentoo-sources-2.6.22 is in portage. I'm guessing, but it may be possible to use the setkeycodes command on this newer kernel. At least, I guess keyfuzz is just a wrapper around the same system call... KDSETKEYCODE works for PS/2 keyboards, and that's the old way. setkeycodes uses KDSETKEYCODE ioctl. for changing keycode on USB keyboards, EVIOCSKEYCODE ioctl is needed, and keyfuzz implements it. OK, I can confirm ketfuzz solved my problem. I've put commands like: echo "0x00070068 99" | keyfuzz -s -d/dev/input/event1 which remap F13 to KEY_SYSRQ. I should now mark this bug as RESOLVED but... oh... eh %) |