pr_* and printk do not print

574 Views Asked by At

I'm using Xubuntu and I am trying to fix an issue with dell-wmi.ko and the Latitude XT. In order to be able to do this I need to be able to see debug output. That's where the problem lies.

pr_* and printk simply just do not work after boot. I can rebuild, install, remove all day long and see not one message in dmesg or any log file. Restart the computer and bam, right there, the init message I put in. After boot, nothing.

I have tried every level and every single log file and method possible. I have tried the IRC for ubuntu, which went exactly as you probably figured, 0 responses.

2

There are 2 best solutions below

0
On

The printk() calls are controlled by a kernel configuration parameter: CONFIG_PRINTK. You need to check if you activated it. In the kernel configurator, it is typically located in General setup -> Configure standard kernel features -> Enable support for printk.

0
On

First, we're assuming you're checking the output of dmesg or cat /var/log/syslog, and not the terminal/console. If printk() calls are not working, and your module is indeed up and running, it's most likely a logging verbosity level issue. Just temporarily crank up your system's verbosity:

echo "7" > /proc/sys/kernel/printk