[SOLVED] !! It would be nice to find a solution to this intermittant audio problem

Questions about codecs, DVD playback, web plugins...
Forum rules
Before you post please read how to get help
User avatar
MrEen
Level 22
Level 22
Posts: 15008
Joined: Mon Jun 12, 2017 8:39 pm

Re: It would be nice to find a solution to this intermittant audio problem

Post by MrEen »

Hi ES44AC8102. Sorry I've been away from the forum for a week and am just now getting back into the groove.

Once again, I do not see anything in the dmesg output that gives any hint why pulseaudio needs restarting. I can only assume it's some kind of race condition where something isn't yet loaded when pulseaudio fires up that is causing an issue.

I don't think there is really anything more we can do to try to figure it out without the help of ALSA/pulseaudio developers. If you want to try moving the commands to the proper location just say so and I'll double check everything necessary. I think we may want to add a pulseaudio kill command on entering sleep mode, then restart it on resume. That might get us past the last hurdle.
ES44AC8102
Level 4
Level 4
Posts: 255
Joined: Tue Oct 14, 2014 4:53 pm

Re: It would be nice to find a solution to this intermittant audio problem

Post by ES44AC8102 »

MrEen,
Welcome back! Fortuitous, as I have been away too :D

Well if it’s not too much trouble we (YOU) can put the script where it belongs and see what happens, but of course this is all on you, I can't be much help, if any with a script of any sort.

So when you have nothing better to do and want to work on it, I'm all for it! :)

I'll keep checking my email alert and watch in here to see how you are getting on.

Your interest in MY problem is most appreciated, is all I can say!

Cheers and carry on,

"ES"
User avatar
MrEen
Level 22
Level 22
Posts: 15008
Joined: Mon Jun 12, 2017 8:39 pm

Re: It would be nice to find a solution to this intermittant audio problem

Post by MrEen »

Sure. I'll throw together a list after work tomorrow. It's almost bed time here. I should have it posted about 20 hours after the timestamp on this post. Maybe a little less.
User avatar
MrEen
Level 22
Level 22
Posts: 15008
Joined: Mon Jun 12, 2017 8:39 pm

Re: It would be nice to find a solution to this intermittant audio problem

Post by MrEen »

You might want to make sure you have a working backup before doing this. I am assuming there's nothing wrong with the code, and am just changing the pertinent pieces for your use-case which includes using the username fred. If you do this on another system with a different username, you'll need to change fred.service as appropriate.

First delete the /lib/systemd/system-sleep/killpa.sh file (or move it to another location to save in case you want to revert back to it.)

Then in the terminal, sudo touch /etc/systemd/system/resume-fix-pulseaudio@.service followed by gksudo xed /etc/systemd/system/resume-fix-pulseaudio@.service and paste this in:

Code: Select all

[Unit]
Description=Fix PulseAudio after resume from suspend
After=suspend.target

[Service]
User=%I
Type=oneshot
Environment="XDG_RUNTIME_DIR=/run/user/%U"
ExecStart=/usr/bin/pulseaudio -k

[Install]
WantedBy=suspend.target
Save that file and close it, then back in the terminal type systemctl enable resume-fix-pulseaudio@fred.service, followed by systemctl --system daemon-reload

I am not 100% certain ExecStart=/usr/bin/pulseaudio -k is going to work as we want. I am hopeful though.

Good luck.
ES44AC8102
Level 4
Level 4
Posts: 255
Joined: Tue Oct 14, 2014 4:53 pm

Re: It would be nice to find a solution to this intermittant audio problem

Post by ES44AC8102 »

Hi MrEen,

Well I took the bull by the horns, at least I thought it was the horns, and decided to install the script.

Had a bit of trouble removing the script you made, due to my ignorance of all the terminal commands, but I got it removed. Now on to installing the new one. fingers crossed!

"ES"
User avatar
MrEen
Level 22
Level 22
Posts: 15008
Joined: Mon Jun 12, 2017 8:39 pm

Re: It would be nice to find a solution to this intermittant audio problem

Post by MrEen »

Good luck, ES44AC8102!
ES44AC8102
Level 4
Level 4
Posts: 255
Joined: Tue Oct 14, 2014 4:53 pm

Re: It would be nice to find a solution to this intermittant audio problem

Post by ES44AC8102 »

HI MrEen,
I got it installed and rebooted and I had sound! Now we can see if over time that continues, it all went without a hitch... that scares me LOL :shock:

I see you are online now so have a nice rest of your day and I'll keep you informed! Many thanks!

" ES"
Post Reply

Return to “Sound, Multimedia, & Codecs”