Skip to content
TORNLIFE More

Help with Raspberry pi 4.

Started by Mr-Fixer [447734] on in Technology.

2 replies · 45 views · thread synced · 7 days ago · View on torn.com
About this thread

Posts archived: 3 / 3 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
3
Discussion span
→
People posting
2
Likes on archived posts
1
Authority score
6 / 100
Historical score
8 / 100
Story score
23 / 100
Engagement score
41 / 100
Mr-Fixer [447734]

Howdy hive mind, wondering if anyone knows how to fix this

 

[929.757827] re.local [4391] alsa lib pcm.c:0424: (snd-pcm-recover) underrun occurred 

 

im aware its a sound issue apparently, this raspberry pi4 is running an arcade machine, Raspberry pi screen boots no problems plays the intro screen of the pi, then sits on a blank screen displaying that error code above, just one line of code, then after a few mins will throw another and so on, every now and then sound will play as these codes are being displayed also.

 

 

Any Ideas ?

 

I have a micro sd card reader and can only access the SD card that way due to the machine showing blank screen i had to remove the micro SD from the pi to access the files.

Forestmuse [2118608]

The message ALSA lib pcm.c:0424: (snd-pcm-recover) underrun occurred indicates an audio buffer underrun in a Linux system using the ALSA (Advanced Linux Sound Architecture) library. This means the software is not providing audio samples to the sound hardware fast enough, causing the buffer to run empty and resulting in sound dropouts, stuttering, or static. 

This issue commonly occurs in resource-constrained environments like the Raspberry Pi or when the system CPU is under high load. 

 

Potential Solutions

You can attempt the following solutions to address the underrun:

  • Increase the audio buffer size: The most common solution is to increase the size of the ALSA or application-specific audio buffer. This gives the system more time to fill the buffer before it runs out of samples.
    • For applications using libraries like pygame, you might adjust the buffer size in the application's configuration or initialization code.
    • System-wide, you can try adjusting the default fragment size in the PulseAudio daemon.conf file (if PulseAudio is used).
  • Reduce system load: If the CPU is highly utilized, the audio process may not get enough time to run.
    • Try closing other demanding applications.
    • If you are using a lightweight desktop environment like XFCE instead of a heavy one like Gnome, it might free up CPU resources.
    • Consider adjusting the CPU governor to "performance" mode.
  • Improve code efficiency: If you are developing an audio application, your algorithm might not be fast enough. Optimizing the code that generates or sends audio data can help.
  • Check for driver/hardware issues: Occasionally, the issue might be related to specific drivers or hardware configurations. Ensuring your system is up-to-date or consulting hardware-specific forums (e.g., Raspberry Pi Forums) may provide insights.
  • Restart the system/application: Sometimes the issue can be a temporary software
Mr-Fixer [447734]

yeah i searched the shit out of it too, all this has no impact, was sitting in storage for ages, decided to fire it up, was working perfectly and had little use, then in storage for years, i dont know if pi makes some sort of memory dump w/e, all the files appear to be there, just audio, even when i unplug the amp from the pi, the issue still persists. Oh and anything you explain to me as to be like im 5, not very pi savvy at all. I got this in a mod kit i got for the machine. I can read the card only through a micro sd card reader plugged into my pc, pi seems to work as the intro screen and sound plays no issue, it stops on the boot up the games and throws that code, and each code after is a different number like an event log or something.

 

Edit - to add, while its sitting on that screen above, a sound bite of a menu plays, yet the screen works on boot up as it plays the pi intro sequence and sound.