Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio input/output selection is overwritten after restart due to bug in auto_run #166

Open
Alfiva opened this issue Jun 23, 2022 · 1 comment
Labels

Comments

@Alfiva
Copy link

Alfiva commented Jun 23, 2022

Describe the bug
Using the release candidate 2021-06-04, the setup wizard works OK, I select USB audio out and USB microphone, and the audio test works OK. But after restart the audio no longer works. I check with pactl info and see that indeed the audio sink is not the one I selected. I use pactl set-default-sink and all other solutions from audio troubleshooting, but after restart it gets back to the prior wrong state.

I managed to figure out that the problem is in auto_run.sh. The one in Release Candidate 2021-06-04 is different from the one in the current main branch (I couldn't pin which commit the RC is using). In this case, the audio section of the wizard uses this to save the audio setup to audio_setup.sh (I show only sink but it's the same for source):

echo 'pactl st-default-sink ${card_name}'

This writes out ${card_name} into audio_setup.sh instead of the actual card name. You have to use double quotes instead of single quotes in order for the variable to be replaced:

echo "pactl st-default-sink ${card_name}"

Otherwise Picroft will use the default device. If it just so happens that the default card number is the one you want, you will not realize the problem.

To Reproduce
Steps to reproduce the behavior:

  1. Burn Picroft Release Candidate 2021-06-04 image to RPi
  2. Follow setup wizard
  3. Select audio input and output and check that it works in the audio test
  4. Restart
  5. Audio in/out may no longer work (if they are not the default number)

Expected behavior
The audio in/out devices should remain the ones selected during the wizard.

Log files
Sorry but I sent my test Raspberry to a user test session and cannot use it right now to get logs.

Environment (please complete the following information):

  • Device type: Raspberry Pi 4 Model B 4GB
  • OS: Picroft Release Candidate 2021-06-04
  • Mycroft-core version: v21.02.0

Additional context
I am using the release candidate because it is the only one that works on the newer RPi 4 with 4GB that I used, since the stable version does not work on this newer hardware, as per #164

I am using an eMeet Luna conference speaker/mic combo for audio in/out through a single USB. With the fix described in this issue it works OK, and it also works without any problem in an older RPi that uses the stable version.

@Alfiva Alfiva added the bug label Jun 23, 2022
@krisgesling
Copy link
Contributor

Hey, thanks for flagging this. Looks like a fix is already in #153 it just didn't get to the release candidate.

Will see if I can carve out time to do a new RC release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants