Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm getting "NVRM: os_raise_smp_barrier()" messages in syslog and dmesg at a rate of 4-6 per minute; I think it's from the Nvidia graphics driver.

The system behaves normally, but the messages clutter up the logs so I can't find any real issues. (At the moment dmesg is 4,000 lines and 3,925 of those lines are the same message.)

Is it possible to suppress or redirect these messages?

Example log snippet:

Mar 13 20:38:04 desktop kernel: [175481.413559] NVRM: os_raise_smp_barrier(), invalid context!
Mar 13 20:38:04 desktop kernel: [175481.430904] NVRM: os_raise_smp_barrier(), invalid context!
Mar 13 20:38:45 desktop kernel: [175522.223337] NVRM: os_raise_smp_barrier(), invalid context!
Mar 13 20:38:45 desktop kernel: [175522.239655] NVRM: os_raise_smp_barrier(), invalid context!
Mar 13 20:38:47 desktop kernel: [175523.556706] NVRM: os_raise_smp_barrier(), invalid context!
Mar 13 20:38:47 desktop kernel: [175523.572015] NVRM: os_raise_smp_barrier(), invalid context!
share|improve this question
1  
I thought this sounded familiar, it did: bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/…. I'm pretty sure a driver or kernel upgrade fixed it for my lappy but forget which (I stopped it at the time I read that bug report). –  msw Apr 13 '11 at 11:37
    
@msw Thanks, a driver update did the trick. Still interested in the question, as this is not the first time (and probably not the last) I have had "log spamming", and I'd like to know a general solution. –  j-g-faustus Apr 14 '11 at 8:01
    
which is why I commented rather than answered (and upvoted your self-answer) –  msw Apr 14 '11 at 11:27

1 Answer 1

I have half an answer: I don't know how to block specific drivers, but rsyslog has a mechanism for filtering log messages on content:

Edit the rsyslog configuration file:

sudo nano /etc/rsyslog.d/50-default.conf

Add a text filter at the top of the file, and redirect the messages matching the filter to a separate log:

:msg, contains, "NVRM: os_raise_smp_barrier" -/var/log/junk.log
& ~

Save the file and restart rsyslog:

sudo service rsyslog restart

Check that the restart worked:

$ tail /var/log/syslog
...
Mar 14 10:38:35 desktop kernel: Kernel logging (proc) stopped.
Mar 14 10:38:35 desktop kernel: imklog 4.2.0, log source = /proc/kmsg started.
Mar 14 10:38:35 desktop rsyslogd: [origin software="rsyslogd" swVersion="4.2.0" x-pid="18494" x-info="http://www.rsyslog.com"] (re)start
Mar 14 10:38:35 desktop rsyslogd: rsyslogd's groupid changed to 103
Mar 14 10:38:35 desktop rsyslogd: rsyslogd's userid changed to 101

And /var/log should now contain a new log file junk.log containing the filtered messages.

So far so good, the only drawback is that it doesn't work for dmesg.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.