I have to restart pulseaudio.service every time to access the built-in microphone

Hello, community.

I’ve been playing with sound production (JACK, audio software, etc.) on my laptop for some time; it’s a lot of fun, but then I found out that everytime I have a videocall I need to do (once) the following steps because the built-in microphone is out of reach, nowhere to be found:

1 - run “$ systemctl --user restart pulseaudio.service”
2 - restart web browser

Then, everything’s back to normal. Would anybody tell me how to avoid these steps?

Thank you very much, you are awesome.

Can you list the changes you’ve made and let us know what the status is of the microphone after a reboot? (I.E. is it always unavailable or does it become unavailable after some time)

if the former, would automating a pulse-audio restart at logon be a good workaround?

:innocent:

I installed JACK, Cadence, I switched several times between the built-in soundcard and an external usb interface… I don’t know, I made quite a lot of changes. I’m no expert…

I think an automatic pulse-audio restart would be nice, and I would appreciate some help to do so.

Thank you very much.

As you’re on KDE like me, that’s exceedingly simple:

  1. Execute:

    sudo nano --backup /usr/local/bin/PulseRestart
    
  2. Copy-paste the following in there:

    #!/bin/bash
    sleep 5
    systemctl --user restart pulseaudio.service
    

    Ctrl+X Enter (and if you do this twice because you made a mistake, you have to add Y to overwrite)

  3. Make this text file an executable file:

    sudo chmod a+x /usr/local/bin/PulseRestart
    
  4. And now go to System Settings

  5. Type start

  6. Click on Autostart

  7. Click on Add Script

  8. Copy-paste /usr/local/bin/PulseRestart in the Shell script path

  9. Click on OK

  10. Quit System Settings

  11. Log off and back on and see if that worked.

If it doesn’t or only does work every now and then, increase the 5 in sleep 5 by 1 second and keep increasing until it does work (or if it’s too slow, decrease that number)

:innocent:

Thank you so much. I’ll post the result when I check if it works!

1 Like

I followed your steps and I haven’t had to restart pulseaudio manually, so thank you very much for making it so easy!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.