On Debian 13 GNOME HP laptop, how to make the following lines mentioning `spd5118` not be part of `sudo dmesg` output, but not silent all `spd5118` possible lines?
To suppress only the specific spd5118 resume error lines (e.g., spd5118_resume [spd5118] returns -6 and failed to resume async: error -6) from appearing in dmesg output without silencing all spd5118-related messages, you can use kernel dynamic debugging (dyndbg) to filter these messages.
Here’s how to do it on Debian 13 (GNOME/HP laptop):
Step 1: Identify the Kernel Module
The messages are generated by the spd5118 kernel module. Confirm this by running:
bash
lsmod | grep spd5118
If it’s loaded, proceed.
Step 2: Disable Specific Debug Messages
Use dyndbg to disable only the resume-related debug messages for spd5118.
Run the following command as root:
If you only want to hide these messages when running dmesg (without suppressing them at the kernel level), use:
bash
sudo dmesg | grep -v "spd5118_resume\|failed to resume async"
This filters out the lines only for the current session.
Why This Works
dyndbg allows granular control over kernel debug messages.
Disabling spd5118_resume debug messages only suppresses the resume-related errors while preserving other spd5118 messages (e.g., initialization, other functions).
Reverting the Change
To re-enable all spd5118 debug messages:
bash
echo 'module spd5118 +p' | sudo tee /sys/kernel/debug/dynamic_debug/control
Aug 4, 9:27pm
This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.