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.

jberculo
  • 159
  • 7

1 Answers1

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!

jberculo
  • 159
  • 7