-
Notifications
You must be signed in to change notification settings - Fork 60
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
Initial AudioVM implementation with pipewire and pulseaudio #576
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test results on Lenovo-X1-gen11
manual testing
- Poweroff and reboot buttons don't work
- All apps launch by clicking their icons
- Audio output works both from integrated speakers and 3.5mm headphones, automatically swapping to/from 3.5mm IO
- Audio output works both in chromium and element
- Integrated microphone does not work
- Youtube video real playback time does not differ from the video nominal lenght
- Increasing volume works in audio-vm with “pactl set-sink-volume @DEFAULT_SINK@ 48000”
ci-test-automation
- performance ok
- bat tests passed
Reboot & shutdown issue fixed. The issue was that Polkit package was removed from host along with pulseaudio. Apparently only pulseaudio had a dependency for Polkit so polkit was removed from build. Manually enabling polkit on host fixed the issue. |
Now reboot and poweroff buttons work. |
Tested now also audio input with 3.5mm mobile phone headphones. Doesn't work. (Verified that the mic of the headphones work with my nixos work laptop. |
Tested 3.5mm mobile phone headphones mic again with instructions from Jon.
|
Tested that 3.5mm headphones mic works also in Element app Jitsi Video Conference but only if plugged before pressing the button "Join Conference". |
Noticed something strange when pressing ghaf desktop poweroff button while 3.5mm headset connected and Jitsi Video Conference call active. Laptop power led did shut down but two leds stayed on:
Tried to reproduce the issue. Again the same setup. This time all leds of the laptop shutdown but I heard that fan is running. After few minutes fan stopped but the machine was still not shutdown. I could verify this by pressing the power button and nothing happening. Only after doing hard reset (pressing the power button 15 sec) I was able to boot the laptop. Tried to reproduce with same setup except 3.5mm headset not plugged. This time laptop shut down normally. |
I noticed this same thing and just started trying to reproduce it. I tested 3.5 mm headset with Chromium and after that shut down the laptop with poweroff button. Mentioned leds stayed on. |
#565 could be adapted to log from relevant VMs to persistent storage to capture what's going on here. See Testing-section in the #565 PR description. |
I tried rebasing on that log-vm and solving few merge conflicts. But the build fails. |
Tried to see After normal shutdown Then tried to leave this running on ghaf-host while doing the shutdown test: but there was nothing special, just repeating these:
|
Tested 'shutdown with 3.5mm headset mic active' issue also with current ghaf mainline build (himalia 82). This issue is not in the mainline. |
The shutdown issue is a great finding. I can reproduce it also by starting the microphone/recording in chromium and then going to ghaf-host and using systemctl to stop audiovm. You can see that the recording in chromium stops (i use mic-test.com). Now audio-vm is turned off and shutting down the laptop seems to cause the issue, some times the indicator lights turn off. Checking that the fan at the bottom keeps spinning and also the laptop does not turn on with a short press of power button (needs the 15second shutdown first). |
I was able to reproduce this with just audiovm so ssh to audiovm and record audio with pulseaudio tools Now stop microvm@audio-vm.service from host and click the shutdown icon from guivm. |
Figured out a way to reset the audio device on host after audio-vm has shut down and audio device is got in some buggy state. This can be demoed as below: So after ssh to audio-vm and starting a recording
ssh to host and use systemctl to shutdown audio-vm to get to error state This can be fixed from host by forcing a reset on the pci device (remove device and rescan bus):
Next step is figure out how to automate this.. |
Tested sound and audio recording with chromium
|
Tested first the laptop shutdown issue with 3.5mm headset mic plugged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test results on Lenovo-X1
- ci-test-automation bat tests passed / performance ok
- All apps launch
- No shutdown issues
- Audio input/output works in chromium with 3.5.mm headset
- Audio input/output does not work in element app, not with 3.5mm headset nor with integrated speakers/mic
It seems element-vm network setup is done so that it does not resolve audio-vm.ghaf or other ghaf internal dns addresses. It does have access to ghaf addresses with direct ip address. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased josa41 audiovm branch on josa41 origin/element-dns-fix with
git rebase origin/element-dns-fix
to be able run tests for both PRs #576 and #600 merged together.
Test reults on Lenovo-X1:
- Now 3.5mm headset audio input/output works in Element App
- Intergrated speakers work.
- Integrated mic does not work. Logi USB headset does not work. (this was expected, will be fixed separately)
- All apps launch from icons
- ci-test-automation tests pass and performance test are ok
Initial version of AudioVM with Pipewire backend and pulseaudio TCP remote communication layer for the guest VMs. Note that this is not really secure design (yet) basically all VMs can access the pulseaudio TCP service. Signed-off-by: Jon Sahlberg <jon.sahlberg@unikie.com>
I ran regression test with an image built before that last force-push.
Tested that integrated speakers and microphone worked with chromium, as well as 3.5mm headset audio and mic works. |
Initial version of AudioVM with Pipewire backend and pulseaudio TCP remote communication layer for the guest VMs. Note that this is not really secure design (yet) basically all VMs can access the pulseaudio TCP service.
Description of changes
Separate AudioVM with HW passthrough audio device
Checklist for things done
x86_64
aarch64
riscv64
nix flake check --accept-flake-config
and it passesTesting
Notes: