-   Linux - Newbie (
-   -   How to "mute" kernel errors? (

evtooms 01-05-2012 09:37 AM

How to "mute" kernel errors?

Every 5 or 10 seconds, I get a kernel error related to my PCMCIA Wireless Adapter.

Dump of the last line of /var/kern.log:

Jan  5 15:20:28 LAP-TRAVELMATE kernel: [ 1556.500188] phy0 -> rt2500pci_set_device_state: Error - Device failed to enter state 1 (-16)
I don't think this is a severe problem, as my wireless adapter works perfectly, but it is really annoying and prevents me to work outside of X, because of the error showing up frequently.

What do you think? Is there a simple way to troubleshoot this particular problem or should I just disable the display of errors (and if so how to do that)?

Thanks in advance,

unSpawn 01-07-2012 09:47 AM

Sometimes the device driver has a setting for verbosity and if any 'modinfo [modulename]' should show. Else some modern Syslog replacements allow for filtering out messages. For Rsyslog a filter line would look like this:

:msg, contains, "Device failed to enter state" ~

:msg, contains, "rt2500pci_set_device_state" ~

btmiller 01-07-2012 07:56 PM

If you want to mute kernel messages from being sent to the ttys when not running X, "dmesg -n 1" should do it. The errors will still be written to the /var/log/kern.log (or wherever syslog sends them), but won't clutter up the console.

evtooms 01-08-2012 09:13 AM

Thank you btmiller and unSpawn for your helpful answers.

Indeed, "dmesg -n 1" did it (actually even -n 3) and provided a quick solution to the problem.

As lowering the general verbosity level muted the relevant errors as well, I will try to figure out how to set a filter asap. I have never used tools like rsyslogd but I have understood the idea from your answer (unSpawn) and I will read the doc as soon as I have the time.

All times are GMT -5. The time now is 01:00 PM.