Package: x2goclient Version: 4.0.2.0
When I use sound forwarding and launch inside X2Go session some application with sound support, pulseaudio.exe at client side starts consuming ~100% CPU. By default, X2Go Client starts pulseaudio.exe with high priority (13). When I set priority to "Above Normal (10)" PA's CPU load drops to 10-20%. With "Normal (8)" it drops to almost 0%, although sound is still played stable, without any additional delays.
I'm using WinXP SP3 (32-bit) on my laptop with single core CPU. This issue seems to be "PulseAudio 5.0 && WinXP"-specific.
Control: tag -1 build-win32
Hi Nable,
On So 29 Jun 2014 16:04:42 CEST, Nable 80 wrote:
thanks for handing this one in.
Our PA expert will take a look at that (I hope!).
DAS-NETZWERKTEAM mike gabriel, herweg 7, 24357 fleckeby fon: +49 (1520) 1976 148
GnuPG Key ID 0x25771B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xf...
Hi Nable,
thank you for the patch. Command line testing shows that it does lower the priority for PulseAudio 5.0 on Windows to "normal". PulseAudio 1.1 ignores the argument and remains at "high" priority, even though --help states that it recognizes the argument. 0.9.6 defaults to normal priority anyway. None of them refuse to start when the argument is passed though.
I will incorporate your patch (it's only 1 line after all,) but after talking with the PulseAudio developers, I will extend it so that "normal" priority will only be set on Windows XP and Server 2003 / Server 2003 R2. On Windows Vista / server 2008 and later, we will continue to default to "high" priority. (You are welcome to extend the patch to do this, or I will do extend it later today or tomorrow.)
Right now I cannot test the patch with x2goclient because the WIndows build VM has a networking problem. Mike#1 will fix that problem sometime this week.
My testing reveals the following: a. I am able to reproduce this bug. See setup #2 below. b. I encountered a different bug with the virtual hardware (setup #1), which is fixed by switching to a different sound driver (setup #2). I will clone this bug report for my setup #1 bug. c. This bug does not result in high CPU usage until audio is playing, unlike my bug. d. Manually lowering the priority in task manager does appear to be a valid workaround.
All my test details:
setup #1: Note: default sound driver. I think I have a driverpacks.net driver pack installed though, so it may not be the default driver for XP without said driver pack. Host & Hypervisor: Fedora 20 w/ KVM/virt-manager VM accessed via: VirtViewer 0.6.0 64-bit for Windows w/ the SPICE protocol Guest OS: Windows XP SP3 32-bit vCPUs : 2 (host has 4 cores, core i5 750) Sound setting in virt-manager: ac97 Sound adapter according to Windows: Intel(r) AC'97 Audio Controller - SIgmaTel Codec Driver Provider: SigmaTel Driver Date: 12/20/2001 Driver Version: 5.10.0.7159
Results with: PulseaAudio 5.0, PulseAudio 1.1, and PulseAudio 0.9.6 launched from the command-line: The combined CPU usage of pulseaudio.exe + "System" is very high, even at normal priority, and the VM is extremely slow overall. This occurs before any sound as playing. In other words, as the process is started, the CPU usage immediately goes up and the VM immediately becomes extremely slow. The combined CPU usage is always greater than or equal to 1 CPU core.See #1 for notes on the behavior of the priority. And yes, "System" CPU usage is normally 0% or just above 0%, when pulseaudio.exe is not running. The attached logs are from said results.
Results with x2goclient 4.0.2.0 (PulseAudio 5.0): X2Go client GUI is extremely slow for same reason as on the command-line. Cannot test any further.
setup #2 Note: same as before, except for a different sound driver: Host & Hypervisor: Fedora 20 w/ KVM/virt-manager VM accessed via: VirtViewer 0.6.0 64-bit for Windows w/ the SPICE protocol Guest OS: Windows XP SP3 32-bit vCPUs : 2 (host has 4 cores, core i5 750) Sound setting in virt-manager: ac97 Sound adapter according to Windows: Intel(r) 82801AA AC'97 Audio Controller Driver Provider: Microsoft Driver Date: 7/1/2001 Driver Version: 5.1.2535.0
Results with: PulseaAudio 5.0, PulseAudio 1.1, and PulseAudio 0.9.6 launched from the command-line: Whether I have normal priority or high priority, there is no high CPU usage for either process, and no VM slowdown.
Results with x2goclient 4.0.2.0 (PulseAudio 5.0): I reproduced this bug reported by Nable. I also observed that lowering PulseAudio to normal fixes the problem. Only 1 vCPU was maxed out for me (Nable had single core.) Also, unlike my problem with setup #1, the VM is not extremely slow. Also, unlike my problem setup #1, CPU usage is not high until audio is playing. Also, unlike my problem on setup#1, "System's usage is 0% or a few % like normal. There seems to be a 1 second delay in audio, but that may be due to me accessing the VM over Virt-Viewer. Also, the delay occurs at high priority.
-Mike#2
On Sun, Jun 29, 2014 at 11:47 AM, Nable 80 <nable.maininbox@googlemail.com> wrote:
Processing control commands:
-- 526: http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=526 X2Go Bug Tracking System Contact owner@bugs.x2go.org with problems
Your message dated Sun, 14 Dec 2014 12:16:35 -0500 with message-id <CAMKht8jpvw3HOiNmiOV_GXKkEivHEz2ejBgq3QiSUzQ3gHkkdA@mail.gmail.com> and subject line This was fixed in 4.0.2.1 has caused the X2Go Bug report #526, regarding Included PulseAudio consumes too much CPU when launched with high priority to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.x2go.org immediately.)
-- 526: http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=526 X2Go Bug Tracking System Contact owner@bugs.x2go.org with problems