Microphone not working when VRDP is enabled

Discussions related to using VirtualBox on Linux hosts.
Post Reply
rsuzano
Posts: 1
Joined: 26. Feb 2019, 19:54

Microphone not working when VRDP is enabled

Post by rsuzano »

Hi,

I've been an issue with "Microphone" on Virtualbox Ubuntu 18 host with Windows 7 Guest, I can't say if it's problem with host or guest O.S. or with VBox.
The problem is...
If the "Remote Display" is disabled, the Microphone work's well (capture sound), besides the already know audio crackling problem, but it works, and if I access the windows guest via Windows Remote Desktop (using Remmina or xfreedesktop on Linux and connecting direct to the Windows) the Audio Output and Microphone works very well and the audio quality improves and no more crackling.

Via VRDP/VRDE (Virtual Remote Display) the audio Output quality improves and no more crackling too, but, When I enable Remote Display, immediately the Mic stops capture sounds (only on Windows Guest, on Linux Host the Mic works very welll), once I disable Remote Display it turn to work again on Windows 7 Guest.

Is it an expected behavior of "VRDP" or it's a problem???

Here is the log entry when I Enable and Disable "Remote Display"

When I Enable VRDP

Code: Select all

00:05:09.261706 VRDP: Statistics created: [full], enabled: 0.
00:05:09.263266 VRDP: VRDP: VD: Frames=10 MinMS=15 MaxMS=300 HistoryMS=2000 VideoMS=300
00:05:09.263583 VRDP: Failed to query a property: 9, rc = VERR_NOT_SUPPORTED
00:05:09.271600 VRDP: TCP server listening on port 3389 (IPv4 and IPv6).
00:05:09.277731 VRDP: Audio: rate correction mode 0x3.
00:05:09.278163 VRDE: loaded version 4 of the server.
00:05:09.278184 VRDE: [IMAGE]
00:05:09.278198 VRDE: [MOUSEPTR]
00:05:09.278206 VRDE: [SCARD]
00:05:09.278212 VRDE: [TSMFRAW]
00:05:09.278217 VRDE: [VIDEOIN]
00:05:09.278222 VRDE: [VRDE::INPUT]
00:05:09.282695 Audio: Initializing VRDE driver
00:05:09.282857 Audio: Disabling input for driver 'PulseAudio'
00:05:09.283829 Audio: Enabling input for driver 'AudioVRDE'
00:05:09.283928 HDA: Set recording source for 'Line In' to 'VRDE audio driver'
00:05:23.140754 VMMDev: Guest Log: VBOXNP: DLL loaded.
When I Disable VRDP:

Code: Select all

00:04:44.741234 VRDP: TCP server closed.
00:04:44.741499 Audio: Disabling input for driver 'AudioVRDE'
00:04:44.741803 PulseAudio: Retrieving server information ...
00:04:44.742340 Audio: Enabling input for driver 'PulseAudio'
00:04:53.758103 VMMDev: Guest Log: VBOXNP: DLL loaded.
00:04:55.511627 Audio: Disabling input for driver 'PulseAudio'
00:04:55.512501 PulseAudio: Retrieving server information ...
00:04:55.513814 Audio: Enabling input for driver 'PulseAudio'
00:04:55.513988 HDA: Set recording source for 'Line In' to 'PulseAudio driver'
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Microphone not working when VRDP is enabled

Post by socratis »

I split your post from the "Microphone input not working Linux Host Win10 Guest" thread. Not that much in common to tell you the truth. That thread was about an app specific problem, yours is about the VRDP server being enabled. Not the same issue...

Can you please post two complete logs? ZIPPED? A complete VBox.log, from a complete VM run, where the problem does occur, and a similar log from when the problem does not occur. Or else, one with VRDP enabled, and one with VRDP disabled:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe problem / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
Image
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
bvhoesel
Posts: 2
Joined: 10. Oct 2015, 15:30

Re: Microphone not working when VRDP is enabled

Post by bvhoesel »

Same issue over here. It is not limited to Win7 guest. A Win10 guest exhibits the same issue.
Running VBox 6.0.4 on Linux Mint Mate 19.2 (based on Ubuntu 18.04).
By the way the 'issue' is real-time. By enabling 'Remote Display' mic input is gone. By disabling it again input is back.

Please find attached the log files as requested. The OK file is with disabled remote display. The NOK file is with enabled remote display.
Attachments
Win10test-OK-2019-03-25-11-22-23.log.zip
with remote display disabled
(28.42 KiB) Downloaded 20 times
Win10test-NOK-2019-03-25-11-25-26.log.zip
with remote display enabled
(28.8 KiB) Downloaded 23 times
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Microphone not working when VRDP is enabled

Post by socratis »

This has been sitting on my to-reply-tab-list for ever. But today a similar issue came up on IRC ([url=irc://irc.freenode.net/vbox]#vbox[/url]) and it gave me the necessary "push" to finally reply to you. Sorry about the delay...

Here's what's in the VBox.log, where VRDP is enabled, that's making this happen:
[quote=""Win10test-NOK-2019-03-25-11-25-26.log.zip""]
00:00:48.163433 HDA: Set recording source for 'Line In' to 'PulseAudio driver'
00:00:48.163464 Audio: Disabling input for driver 'PulseAudio'    <-- That's the problem
00:00:48.163467 Audio: Enabling input for driver 'AudioVRDE'
[/quote]
Here's the "why" part...

Up until 5.2.x, when VRDP was enabled, the audio was being allocated for two sources and two sinks, or else two incoming and two outgoing streams. Independently of whether an RDP client was connected or not. That was wasting resources, CPU cycles for nothing.

In 6.0.x, they tried to address the situation, but they went overboard; it's an "either/or" situation now. If VRDP is enabled, the "line in" is shut down. Which is not the necessarily best or the desired result.

A couple of developers were on the IRC discussion when I found the issue, and they promised that they'll look into this, because it is clearly the wrong behavior:
audio out should go to all consumers (host audio, VRDE, video recording), and audio in should be taken from all sources (host audio, VRDE and theoretically video recording, which of course wouldn't ever produce anything), mixed together.

either way... this seems to deserve a ticket. needs investigation.
Ping me tomorrow if you can, we need to figure out if the developers have created an internal ticket for this, or we may have to "push" them, by creating a ticket in the bug tracker.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
phmatos
Posts: 1
Joined: 2. Mar 2020, 16:40

Re: Microphone not working when VRDP is enabled

Post by phmatos »

Hello is there any workaround or solution to enable the input audio with the RDP? today I migrated from 5.2 to 6.1 and with the VRDP on is not working the input audio in my VM, I use a lot the VRDP and the microphone.
Post Reply