Disable the most annoying printk in the kernel
PATCH 1/1 Disable the most annoying printk in the kernel
Remove most useless printk in the world
drivers/input/keyboard/atkbd.c +0 -1
@@ -328,7 +328,6 @@ static irqreturn_t atkbd_interrupt(strucatkbd_report_key (&atkbd->dev, regs,KEY_HANJA ,3 ); goto out;case ATKBD_RET_ERR : - printk(KERN_DEBUG "atkbd.c: Keyboard on %s reports too many keys pressed. goto out; }
Quoted 1 line · Andi Kleen
Remove most useless printk in the world
No way! I love that prink! =P
Quoted 15 lines
Signed-off-by Andi Kleen <[email protected]>Index:
linux/drivers/input/keyboard/atkbd.c
===================================================================drivers/input/keyboard/atkbd.c +0
-1@@ -328,7 +328,6 @@ static irqreturn_t atkbd_interrupt(strucatkbd_report_key (&atkbd->dev, regs,KEY_HANJA ,3 ); goto out;case ATKBD_RET_ERR : -printk (KERN_DEBUG "atkbd.c: Keyboard on %s reports too many keys pressed. \n", serio->phys); goto out; }
Quoted 5 lines · Keenan Pepper
Quoted 1 line · Andi Kleen
Remove most useless printk in the world
No way! I love that prink! =P
And you know, once it is gone, you will start getting reports from people that their kernel doesn't act like it use to. Or they'll start to think that their keyboards suddenly work better ;-)
-- Steve
Quoted 20 lines
Quoted 8 lines
Signed-off-by Andi Kleen <[email protected]>Index:
linux/drivers/input/keyboard/atkbd.c
===================================================================drivers/input/keyboard/atkbd.c static irqreturn_t atkbd_interrupt(struc · line 333
Quoted 7 lines
drivers/input/keyboard/atkbd.c +0
-1@@ -328,7 +328,6 @@ static irqreturn_t atkbd_interrupt(strucatkbd_report_key (&atkbd->dev, regs,KEY_HANJA ,3 ); goto out;case ATKBD_RET_ERR : -printk (KERN_DEBUG "atkbd.c: Keyboard on %s reports too many keys pressed. \n", serio->phys); goto out; }-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Hi Andi,
Quoted 1 line · Andi Kleen
Remove most useless printk in the world
*clap* *clap*
Thanks!
It usally triggers, if your cat, child, bird whatever handles your keyboard or you accidentally put a book or sth. on it (e.g while the screen has been locked).
So there is really no use for it, except for kernel debugging, where it can be wrapped up by pr_debug() or similiar.
Regards
Ingo Oeser
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Remove most useless printk in the world
No way! I love that prink! =P
And you know, once it is gone, you will start getting reports from people that their kernel doesn't act like it use to. Or they'll start to think that their keyboards suddenly work better ;-)
You could make it a high beep click `a la MS-DOS.
Jan Engelhardt
Quoted 7 lines · Ingo Oeser
Hi Andi,
Quoted 1 line · Andi Kleen
Remove most useless printk in the world
*clap* *clap*
Quoted 8 lines
Thanks!
It usally triggers, if your cat, child, bird whatever handles your keyboard or you accidentally put a book or sth. on it (e.g while the screen has been locked).
So there is really no use for it, except for kernel debugging, where it can be wrapped up by
pr_debug()or similiar.
I am not the fastest typer on Earth, far from it.
I use to have this printed all over the place on my Dell Inspiron 8100 laptop, without really doing anything special with my keyboard....
So I don't know if this was an issue or not, but given that my keyboard never caused me a trouble, I just brain blacklisted the message.
Thanks a lot for making this simple yet effective patch :)
Cheers,
Jerome
Hi!
Quoted 3 lines
Remove most useless printk in the world
Signed-off-by Andi Kleen <[email protected]>
It warns about crappy keyboards. It triggers regulary for me on x32, (probably because of my weird capslock+x+s etc combination). It is usefull as a warning "this keyboard is crap" and "no, bad mechanical switch is not the reason for lost key".
Pavel
Signature · 1 line
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
Quoted 10 lines · Pavel Machek
Hi!
Quoted 3 lines
Remove most useless printk in the world
Signed-off-by Andi Kleen <[email protected]>It warns about crappy keyboards. It triggers regulary for me on x32, (probably because of my weird capslock+x+s etc combination). It is usefull as a warning "this keyboard is crap" and "no, bad mechanical switch is not the reason for lost key".
In German that would be described as "Zum Schaden auch noch den Spot" (for the damage you get the gossip too). Not very useful.
-Andi
Quoted 7 lines · Pavel Machek
Quoted 2 lines
Remove most useless printk in the world
It warns about crappy keyboards. It triggers regulary for me on x32, (probably because of my weird capslock+x+s etc combination). It is usefull as a warning "this keyboard is crap" and "no, bad mechanical switch is not the reason for lost key".
Okay, if you want a message to remind you that your keyboard is crap several times a day, please keep your own patch to do so. Let the rest of the world go with Andi's patch.
Hugh
"Add insult to injury" ;)
2005/10/28, Andi Kleen <[email protected]>:
Quoted 22 lines · Pavel Machek
Quoted 10 lines
Hi!
Quoted 3 lines
Remove most useless printk in the world
Signed-off-by Andi Kleen <[email protected]>It warns about crappy keyboards. It triggers regulary for me on x32, (probably because of my weird capslock+x+s etc combination). It is usefull as a warning "this keyboard is crap" and "no, bad mechanical switch is not the reason for lost key".
In German that would be described as "Zum Schaden auch noch den Spot" (for the damage you get the gossip too). Not very useful.
(quoted diff) +0
-2-Andi -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 4 lines · Hugh Dickins
Quoted 3 lines · Pavel Machek
Quoted 2 lines
Remove most useless printk in the world
Quoted 8 lines
Quoted 4 lines
It warns about crappy keyboards. It triggers regulary for me on x32, (probably because of my weird capslock+x+s etc combination). It is usefull as a warning "this keyboard is crap" and "no, bad mechanical switch is not the reason for lost key".
Okay, if you want a message to remind you that your keyboard is crap several times a day, please keep your own patch to do so. Let the rest of the world go with Andi's patch.
Plus keyboards are a dime a dozen these days, they give you one with every server whether or not you want it. If you have rack full of 1U servers the pile of keyboards will be as high as the rack. I wish our KVM vendor would come haul them away.
Lee
Hi!
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
Remove most useless printk in the world
It warns about crappy keyboards. It triggers regulary for me on x32, (probably because of my weird capslock+x+s etc combination). It is usefull as a warning "this keyboard is crap" and "no, bad mechanical switch is not the reason for lost key".
Quoted 8 lines
Quoted 3 lines
Okay, if you want a message to remind you that your keyboard is crap several times a day, please keep your own patch to do so. Let the rest of the world go with Andi's patch.
Plus keyboards are a dime a dozen these days, they give you one with every server whether or not you want it. If you have rack full of 1U servers the pile of keyboards will be as high as the rack. I wish our KVM vendor would come haul them away.
Well, keyboard detected and reported an error. Kernel reacted with printk(). You are removing that printk(). I can understand that, printk is really annoying, but I really believe _some_ error handling should be added there if you remove the printk.
Pavel
Signature · 1 line
Thanks, Sharp!
Quoted 4 lines · Pavel Machek
Well, keyboard detected and reported an error. Kernel reacted with
printk(). You are removing thatprintk(). I can understand that, printk is really annoying, but I really believe _some_ error handling should be added there if you remove the printk.
What do you suggest?
Having a TP 380XD which regularly produces this annoying message, it's just logspam. There's no noticable failure.
Plus, kernels previous to ones with the new input subsystem just used to ignore the scancode (from v2.[24].xx):
int pckbd_translate(unsigned char scancode, unsigned char *keycode,
char raw_mode)
{
...
/* 0xFF is sent by a few keyboards, ignore it. 0x00 is error */
if (scancode == 0x00 || scancode == 0xff) {
prev_scancode = 0;
return 0;
}
}Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Quoted 7 lines
Quoted 5 lines
Well, keyboard detected and reported an error. Kernel reacted with
printk(). You are removing thatprintk(). I can understand that, printk is really annoying, but I really believe _some_ error handling should be added there if you remove the printk.What do you suggest?
I would say print it once a day, or even less, e.g. once per boot.
Quoted 2 lines
Having a TP 380XD which regularly produces this annoying message, it's just logspam. There's no noticable failure.
Jan Engelhardt
Quoted 7 lines · Russell King
Quoted 4 lines · Pavel Machek
Well, keyboard detected and reported an error. Kernel reacted with
printk(). You are removing thatprintk(). I can understand that, printk is really annoying, but I really believe _some_ error handling should be added there if you remove the printk.What do you suggest?
Obviously it needs an DBUS over netlink interface with an user space daemon to open a window on the desktop. Then the user needs to click ok to make sure they understood they did something wrong (either by buying broken hardware or by simply typing).
You get bonus points when that window first opens another window with a "Did you know ..." message with a little dancing pink penguin that gives you helpful tips regarding typing on keyboards and offers you links to buy new keyboards on the web.
Wouldn't that be great?
-Andi
Hi!
Quoted 6 lines
Quoted 4 lines
Well, keyboard detected and reported an error. Kernel reacted with
printk(). You are removing thatprintk(). I can understand that, printk is really annoying, but I really believe _some_ error handling should be added there if you remove the printk.What do you suggest?
Well, having error counter for each input device would probably be enough. Or perhaps add some rate-limiting. One message per boot should be adequate.
Quoted 2 lines
Having a TP 380XD which regularly produces this annoying message, it's just logspam. There's no noticable failure.
I do notice lost keys on x32 here. You need to press some weird combination...
Pavel
Signature · 1 line
Thanks, Sharp!
Quoted 5 lines · Pavel Machek
Quoted 2 lines
Having a TP 380XD which regularly produces this annoying message, it's just logspam. There's no noticable failure.
I do notice lost keys on x32 here. You need to press some weird combination...
I don't need any weird combinations to produce this message - it appears quite often when hitting keys to wake it up from sleep mode (which it has an eager desire to be in when it's used in text-only mode.)
Quoted 5 lines
Quoted 1 line
What do you suggest?
Well, having error counter for each input device would probably be enough. Or perhaps add some rate-limiting. One message per boot should be adequate.
$ dmesg |grep 'too many' | wc -l 72
I don't care how many occur or even that they do occur. That's not to say someone else doesn't. But if there is someone else who does care, maybe they should speak up and produce a patch to add whatever /they/ /do/ require.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Quoted 14 lines · Andi Kleen
Quoted 7 lines · Russell King
Quoted 4 lines · Pavel Machek
Well, keyboard detected and reported an error. Kernel reacted with
printk(). You are removing thatprintk(). I can understand that, printk is really annoying, but I really believe _some_ error handling should be added there if you remove the printk.What do you suggest?
Obviously it needs an DBUS over netlink interface with an user space daemon to open a window on the desktop. Then the user needs to click ok to make sure they understood they did something wrong (either by buying broken hardware or by simply typing).
Quoted 5 lines
You get bonus points when that window first opens another window with a "Did you know ..." message with a little dancing pink penguin that gives you helpful tips regarding typing on keyboards and offers you links to buy new keyboards on the web.
Wouldn't that be great?
Sounds like too much hastle. I heard an alternative suggestion somewhere which I liked much better <evil grin>.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Quoted 7 lines · Andi Kleen
Quoted 6 lines · Russell King
Quoted 4 lines · Pavel Machek
Well, keyboard detected and reported an error. Kernel reacted with
printk(). You are removing thatprintk(). I can understand that, printk is really annoying, but I really believe _some_ error handling should be added there if you remove the printk.
Quoted 6 lines
Quoted 1 line
What do you suggest?
Obviously it needs an DBUS over netlink interface with an user space daemon to open a window on the desktop. Then the user needs to click ok to make sure they understood they did something wrong (either by buying broken hardware or by simply typing).
But just in case the mouse is also broken, this should broadcast out on the local network and popup windows on every other Linux box we can find within 50 miles.
Quoted 5 lines
You get bonus points when that window first opens another window with a "Did you know ..." message with a little dancing pink penguin that gives you helpful tips regarding typing on keyboards and offers you links to buy new keyboards on the web.
Wouldn't that be great?
Where does sysfs fit into this plan? :P
Jon.
Quoted 4 lines · Lee Revell
Plus keyboards are a dime a dozen these days, they give you one with every server whether or not you want it. If you have rack full of 1U servers the pile of keyboards will be as high as the rack. I wish our KVM vendor would come haul them away.
My employer sells servers and neither includes keyboards nor monitors nor mouses. These are extras, since my employer considers servers "unattended machines" and you either have a KVM switch or can rip a KVM-set off some work station, if you have a hardware failure.
If you don't have a KVM set at hand, our service team brings it in.
So you just need to change to a sane vendor and can exclude that kind of costs[1] in the next contract.
Regards
Ingo Oeser
[1] Just consider the deposit and recycling costs, maintence costs, storage space costs, inventory costs and so on. This all adds up dime by dime for a good amount of servers.
Quoted 2 lines · Pavel Machek
I do notice lost keys on x32 here. You need to press some weird combination...
So just tell the message, if !strcmp(current->comm,'emacs') :-)
Regards
Ingo Oeser
Hi!
Quoted 6 lines
Quoted 4 lines
Well, keyboard detected and reported an error. Kernel reacted with
printk(). You are removing thatprintk(). I can understand that, printk is really annoying, but I really believe _some_ error handling should be added there if you remove the printk.What do you suggest?
Second possibility would be to create "error" event, and send it to userspace. Userspace would probably ignore it, but that's okay. At least it has chance to do the right thing.
(AKA dbus event, and nice, friendly "do not panic" message ;-)
Signature · 1 line
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms