2

I am having a strange issue with my Pi 4. Every minute around second 47, it 'stalls' for a few seconds, like some process is going on. The CPU spikes and pings to the router are delayed. I am running Kodi and Snapserver/librespot.

Ping results, this happens every minute, (almost) to the second exact

Kodi playback is not interupted, the kodi remote does not respond anymore but recovers. But especially librespot does not like this and crashes due to this issue when it tries to play a new song during this period.

This of course suggests that there is a process running every minute, but I can't find it.

Any clue how to find the culprit?

Update: output of top command during hickup, sorted by CPU time:

enter image description here Upon closer inspection, I also see the RTW_CMD_THREAD having a little load, where it normally is just doing almost nothing.

9
  • What does 'top' show?
    – CoderMike
    May 26, 2020 at 11:28
  • Something happening exactly every minute looks like a cron job. May 26, 2020 at 12:26
  • Yes, but there are no cron jobs. Besides, I'd expect the process to start running at 0 seconds in the minute, but it's not @DmitryGrigoryev
    – jberculo
    May 26, 2020 at 14:23
  • I added output from top @CoderMike
    – jberculo
    May 26, 2020 at 14:30
  • You should sort the top output by total CPU time. May 26, 2020 at 14:32

1 Answer 1

3

After focussing on top (ht @coderMike/@DmitryGrigoryev), I noticed RTW_CMD_THREAD spiking at the same moment as the stall occuring. I then remembered that the power save mode of the RP-wifi could cause similar problems, but this is switched off by default nowadays. But as I am using a wifi dongle instead of the onboard wifi, i checked, and the power save mode was on. I used Make "iw wlan0 set power_save off" permanent to disable it, and the problem vanished!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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