9

I'm getting a lot of

Dec 27 08:35:49 htpc kernel: [ 1552.153797] pciehp 0000:00:1c.5:pcie04: Card not present on Slot(0-2)
Dec 27 08:35:49 htpc kernel: [ 1552.157744] pciehp 0000:00:1c.5:pcie04: Card present on Slot(0-2)

messages in my syslog, about 10 every second. That just makes syslog unusable, can I somehow get rid of them?

I don't know and don't really care about the reason of those messages being there, partly because my motherboard doesn't have pcie slots on it and partly because everything I care about works perfectly. That might be a WiFi chip I disabled in bios but hey, I don't want wifi to be powered on, I'm not using it.

So can I just suppress those messages?

vava
  • 1,362
  • If you use the gnome log viewer, you can add a filter to hide them. Not really suppressing nothing, it's just a kind of GUI only workaround. – Javier Rivera Dec 27 '10 at 11:03
  • You should file a bug report, this message is likely to affect other users which don't have the skills to identify it and get their root directory full. – João Pinto Dec 27 '10 at 11:18
  • @João Pinto, based on my googling, it seems to be more or less known problem with no real solution. – vava Dec 27 '10 at 11:21

2 Answers2

12

Since Ubuntu 10.04 rsyslog is used instead of plain syslog and it does have filtering capabilities. Proceed as follows:

  • Create gksudo gedit /etc/rsyslog.d/01-blocklist.conf
  • Add the following lines there
    :msg,contains,"Card not present on Slot(0-2)" stop
    :msg,contains,"Card present on Slot(0-2)" stop

The solution works as follows:

  • 01- part in file name forces rsyslog to load this config before it loads anything else
  • the lines in the file find any messages containing the text we want to ignore and discards those messages right away, thanks for discard operator (~)
  • it is possible to match by regexp or ignore case, check [this helpful guide] (http://www.rsyslog.com/doc/property_replacer.html) on matching

Note, that solving that kind of issues the right way is always preferred. For example, broken pciehp won't let your CPU to go into deeper sleep states and will increase effective TDP and power consumption of you CPU. However, since pciehp is compiled into Ubuntu kernel, there's little you can do without compiling your own kernel, which is not advisable.

zx485
  • 2,426
vava
  • 1,362
  • This was an issue for (althoug now on 12.04) and this answer does stop them from appearing in the syslog, but dmesg still shows them. any thought about that? – Nanne May 01 '12 at 18:15
5

I am not sure this first option works, but since it's much easier than the second (which works for sure) please try.

Option 1

Edit /etc/default/grub , append pciehp.pciehp_poll_time=10000 to the GRUB_CMDLINE_LINUX_DEFAULT line.

Option 2

Rebuild the kernel without CONFIG_HOTPLUG_PCI_PCIE, for instructions check the last comment on this forum: http://www.evga.com/forums/tm.aspx?m=630487&mpage=1

João Pinto
  • 17,159