Re: [PATCH] HID: playstation: ratelimit input CRC check failed messages
From: Jiri Kosina
Date: Fri Nov 27 2026 - 02:59:02 EST
On Tue, 27 Oct 2026, Mauricio Faria de Oliveira wrote:
> The kernel log of a Steam Deck was mostly filled with CRC check errors
> from what is apparently a bogus controller, with 8174 messages in <200
> seconds, averaging ~43 messages/second:
>
> $ cat dmesg-pstore.202610250608-0 \
> | grep -c "input CRC's check failed"
> 8174
>
> $ cat dmesg-pstore.202610250608-0 \
> | grep -m1 "input CRC's check failed"
> <3>[ 8.715455] playstation 0005:054C:05C4.0006:
> DualShock4 input CRC's check failed
>
> $ tac dmesg-pstore.202610250608-0 \
> | grep -m1 "input CRC's check failed"
> <3>[ 196.187459] playstation 0005:054C:05C4.0006:
> DualShock4 input CRC's check failed
>
> $ echo $((8174 / (196-8)))
> 43
>
> Let's ratelimit the input CRC check failed messages for the exceptional,
> high-frequency error case, which doesn't impact the occasional, low-freq
> error case (as ratelimiting does not trigger) or the non-error case.
>
> CRC check failed messages for driver-initiated requests are kept as is.
>
> Testing with a UHID driver to synthetically reproduce input CRC check
> errors (generated by an LLM) shows that it reduces the duplicate lines
> and still provides useful information (number of errors/same message).
>
> For example, triggering such error every 25ms (40 times/second), prints
> 10 messages and silently counts another 187 in 5 seconds, ie, 197 / 5 =
> 39.4 times/second (aligned with the synthetic reproducer's rate):
>
> [ 9.554184] playstation ...: Registered DualShock4 controller ...
> [ 10.053936] playstation ...: DualShock4 input CRC's check failed
> [ 10.078162] playstation ...: DualShock4 input CRC's check failed
> [ 10.103447] playstation ...: DualShock4 input CRC's check failed
> [ 10.128739] playstation ...: DualShock4 input CRC's check failed
> [ 10.154016] playstation ...: DualShock4 input CRC's check failed
> [ 10.179198] playstation ...: DualShock4 input CRC's check failed
> [ 10.204474] playstation ...: DualShock4 input CRC's check failed
> [ 10.229762] playstation ...: DualShock4 input CRC's check failed
> [ 10.254904] playstation ...: DualShock4 input CRC's check failed
> [ 10.280441] playstation ...: DualShock4 input CRC's check failed
> [ 15.070695] dualshock4_parse_report: 187 callbacks suppressed
> ...
>
> This reduces the space consumed in the kernel log during 5 seconds from
> ~200 lines to only 11 lines (5.5%).
>
> Signed-off-by: Mauricio Faria de Oliveira <mfo@xxxxxxxxxx>
Applied, thanks.
--
Jiri Kosina
SUSE Labs