No audio after some time, have to reboot

REPRODUCIBILITY:
OS VERSION: 4.5
HARDWARE: Sony Xperia 10 iii
UI LANGUAGE: US
REGRESSION:

DESCRIPTION:

After a few hours the phone does not ring anymore, can not answer calls, no audio on whatsapp, music player makes no sound. Everything fine after a reboot.

I was waiting for a few days before posting this to try to understand more about what is happening but can’t figure it out.

PRECONDITIONS:

STEPS TO REPRODUCE:

  1. Just wait for a few hours. I didn’t understand what causes the issue but it’s been happening every day.

EXPECTED RESULT:

ACTUAL RESULT:

MODIFICATIONS:

ADDITIONAL INFORMATION:

4 Likes

I can confirm that this happens to me, sometimes after a few days, often after restarting the home screen.

Do you have used GPS anytime between the start of the phone and the dissapearing audio?

1 Like

I tried using Here We Go Android GPS app and music could still play.

Then I spent some time in the browser and email app to reset my password so I could reply on the phone, and sound is not working anymore.

I’ll continue investigating.

This is a known bug, which seems GPS related. I always restart the phone after using GPS. More details in the Bug report i posted.

1 Like

I have this problem several times a week, but without using GPS at all - so disappearing sound is not always related to this function .

2 Likes

I know, but it is easier to check if GPS is tge cause of tge audio loss.

I read the posts in the 2022 bug report for version 4.4 from almost a year ago. It makes sense that the phone will be “out of RAM” after using a GPS app because those tend to allocate lots of RAM to cache as much as they can of the maps. That the “OOM killer” decides to kill Pulse Audio because there is no more free RAM is the worst thing that can happen on a phone. Even a reboot would be preferable.
Imagining that it is written in C, we must edit oom.cpp, wherever that is, and keep nasty “OOM killer” from ever killing Pulse Audio, recompile and submit a patch. I am an experienced C coder, I’m all in on switching to a Linux phone OS and I can find some spare time to contribute. Can anyone guide me on where to find the source code and compile tools?

From the OOM documentation, we just need to tweak the “badness()” function so that it never gives a bad score to Pulse Audio. Adding a list of “essential” processes that can never be killed, if that has not been done already.

" Process Selection
Whenever out of memory failure occurs, the out_of_memory() function will be called. Within it the select_bad_process() function is used which gets a score from the badness() function. The most ‘bad’ process is the one that will be sacrificed. There are some rules badness() function follows for the selection of the process."

1 Like

Please, on your bug report update the version of Sailfish.

Is this device specific? On my XA2 I’ve never had anything like this, in +2 years.

@miau , do you know of a workaround for this, or must you reboot every time?

Restarting the pulseaudion and ngfd services is sufficient to restore audio:

systemctl --user stop pulseaudio
systemctl --user stop ngfd
systemctl --user start pulseaudio
systemctl --user start ngfd
5 Likes

No need to patch, compile or otherwise change anything in code, you can adjust oom kill likelyhood per-process using a sysctl tunable, or better let systemd do it for you.

Of you search some more you will find the issue is not that simple though, as there are several different memory pressure systems in place on SFOS, (the kernel oom, the mce one, the Android one at least) and finding the right tuning for all of them isn’t trivial.

2 Likes

That being said, I have yet to see the proof that OOM killing has anything to do with the problem.

People seem to tend to attribute a lot of things to the OOM killer without really checking that is was to blame.

1 Like

I’ve been trying to find out what causes this for a week now and:

  • without opening any apps, just the phone and the music player, it happens in a couple of days
  • using a mapping app it happens in a few minutes
  • and everything in between
1 Like

Is this device related? Is there a phone I can get where Sailfish OS is usable? Is anyone working on fixing this?

Yes, never had this issue on all XA2 Platform, have on 10 III.

XA2 imo is best suitable, but phones are underpowered

Only some part of community. Jolla couldn’t reproduce this bug, like many others. Wouldn’t count on official/community fix anytime soon

Thank you for the answers. Should we offer Jolla an Xperia 10 III? Do Jolla employees use Sailfish OS phones?

1 Like

This might be related: