Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 651 - Summary: WDM/KS issues
Summary: WDM/KS issues
Status: RESOLVED WONTFIX
Product: Audacity
Classification: Unclassified
Component: Audio IO
2.0.4
PC Windows (all)
: P5 Summary
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-06 11:58 UTC by Gale Andrews
Modified: 2018-09-09 11:06 UTC (History)
6 users (show)

See Also:
Steps To Reproduce:
* WDM-KS is currently the least compatible of the four Windows hosts, and may produce "error opening sound device" on some machines or have other quirks such as some inputs not being available under this host. * The input slider in Device Toolbar is disabled on all or most inputs. * Recording from stereo mix produces a very low input level even if the Windows stereo mix input level is on maximum. You can only record an adequate input level by turning the system audio output up very high.
Release Note:
<!-- Commenting out so as to retain the release note but hide it from the visible release notes while WDM-KS is not enabled. GROUP: Playback and Recording * (Windows) "Windows WDM-KS" host is currently the least compatible of the four hosts, and may produce "error opening sound device" on some machines or have other quirks (such as some inputs not being available under this host). Please report detailed problems to [https://www.audacityteam.org/contact/#feedback our feedback address] and state your exact version of Windows. ** The input slider in [https://manual.audacityteam.org/o/man/device_toolbar.html Device Toolbar] is disabled for all or most inputs. Please use the Windows system input slider instead. ** Recording from the stereo mix input may not produce an adequate input level unless you turn the system audio output up very high. On Windows Vista and later you can choose the "Windows WASAPI" host and a "loopback" input instead for recording computer playback. -->
First Git SHA:
Group: ---
Workaround:
Closed: 2018-09-09 00:00:00


Attachments
Attempts to detect usability of WDMKS at runtime (19.33 KB, patch)
2013-09-13 17:16 UTC, Leland Lucius
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gale Andrews 2013-09-06 11:58:08 UTC
This is a summary bug for Windows WDM/KS issues. 

Some minor issues or available patches are not noted here yet. 

The currently unfixed issues are noted in "Steps to Reproduce" as this seems (in the absence of editable comments) as the most intuitive method.
Comment 1 Leland Lucius 2013-09-13 17:16:57 UTC
Created attachment 381 [details]
Attempts to detect usability of WDMKS at runtime
Comment 2 James Crook 2013-09-14 11:05:44 UTC
Leland, patch looks great for a hung process, but what about a BSOD?  Won't the sub process simply BSOD and bring down the computer?  So Gale, are users reporting BSODs from using WDMKS or just 'error opening sound device' and inputs missing?

Think this is de-facto a P2 as RM needs to decide on whether to address the WDM-KS issue for 2.0.5, probably yes, so raising to P2.
Comment 3 Gale Andrews 2013-09-14 11:56:14 UTC
(In reply to comment #2)
> Leland, patch looks great for a hung process, but what about a BSOD?  Won't the
> sub process simply BSOD and bring down the computer?
From what Leland told me, a BSOD cannot be avoided... unless we kill WASAPI before the BSOD happens to trigger. Is 5 seconds too long to wait before kill?  I take 30 seconds to start Audacity on a moderately fast machine. Does that mean each API is taking 7.5 seconds or is LAME and FFmpeg adding to API init time? 

I still feel the patch should tell users that WDM-KS was removed (AFAICT it does not). 

We need testing from users who had real-life hangs and BSOD's. Are we going to commit this, or shall I offer past and new complainants a patched build of my own? 


> So Gale, are users reporting BSODs from using WDMKS or just 'error opening sound 
> device' and inputs missing?

BSOD and hang, with most of the Vista and later reports being BSOD's. Where we know the BSOD process on Vista and later, it's always been "Ksthunk.sys" ("Microsoft Kernel Streaming Thunk Service system driver").
 
I've only seen one actual usage report for WDM-KS.
Comment 4 Leland Lucius 2013-09-14 16:18:30 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Leland, patch looks great for a hung process, but what about a BSOD?  Won't the
> > sub process simply BSOD and bring down the computer?
> From what Leland told me, a BSOD cannot be avoided... unless we kill WASAPI
> before the BSOD happens to trigger.

Correct.  It can't guard against a BSOD.  The only option for those users would be to manually add the "AudioIO/DisableWDMKS=1" to the audacity.cfg file.

> Is 5 seconds too long to wait before kill? 
> I take 30 seconds to start Audacity on a moderately fast machine. Does that
> mean each API is taking 7.5 seconds or is LAME and FFmpeg adding to API init
> time? 

There's a LOT of stuff taking up that 30 seconds (wow...30 seconds!) and portaudio init would take up a fair amount of that.  I've noticed on my machine, that Audacity takes longer to start when no other audio type application are running.  If other audio apps (like Pandora) are running, then Audacity starts up very quickly.  (That's a discussion for a different day though. ;-))

I'm pretty sure that WDM/KS is one of the faster APIs to initialize, but you have given me an idea on how to test that.

> 
> I still feel the patch should tell users that WDM-KS was removed (AFAICT it
> does not). 
> 
> We need testing from users who had real-life hangs and BSOD's. Are we going to
> commit this, or shall I offer past and new complainants a patched build of my
> own? 

Don't commit just yet.  I submitted the portaudio changes to the PA list and it looks like Ross will be incorporating a variant into portaudio.  But, it would be easy to repatch with the variant later if you want to commit.  That way you could get it into the users hands more quickly.

> 
> 
> > So Gale, are users reporting BSODs from using WDMKS or just 'error opening sound 
> > device' and inputs missing?
> 
> BSOD and hang, with most of the Vista and later reports being BSOD's. Where we
> know the BSOD process on Vista and later, it's always been "Ksthunk.sys"
> ("Microsoft Kernel Streaming Thunk Service system driver").
> 
I've done a lot of googling and it seems that "Ksthunk.sys" gets the "blame" for a lot of driver issues, since he's sort of the middleman.
Comment 5 Peter Sampson 2014-12-06 09:37:56 UTC
Testing on audacity-win-r13705-2.1.0-alpha-06-dec-14 on Windows 7 Home Premium with onboard Realtek soundcard and external UA-1EX USB soundcard.

With the output device set to Speakers (Realtek HD Audio output) i.e. the PCs speakers - I get "Error Opening Sound Device ..." with all three available inputs both for recording and for playing back an existing track:
1)Microphone (Realtek HD Audio mic input)
2)Stereo Mix (Realtek HD Audio stereo input)
3)IN(IN(UA-1EX))

However if I switch the output device to Line Out(OUT(UA-1EX))
then all three inputs record properly and playthrough and playback work properly.

In contrast using any of the other three hosts MME, WDS and even WASAPI the Realtek card performs properly as expected for recording and playback - likewise the UA-1EX with these hosts.
Comment 6 Peter Sampson 2014-12-06 09:49:40 UTC
(In reply to comment #5)
If I re-test with Software Playthrough turned "off" - then even with the output set to Realtek the recording takes place fine - but playback fails with "Error opening sound device ... "  

This firmly  points the finger at the payback side of the Realtek device.
Comment 7 Peter Sampson 2016-11-10 13:24:27 UTC
(In reply to Peter Sampson from comment #5)
Just tested 2.0.4 (last released version wit WDM/KS) under W10.

Under W10 I get exactly the same sumptoms as I got under W7 and reported in comment #5 and comment #6
Comment 8 Peter Sampson 2017-11-26 07:35:33 UTC
I am demoting this to P3 as we currently have no plan or intention to ship WDM-KS as a host
Comment 9 James Crook 2018-08-24 15:29:18 UTC
P3 per comment 8.
Comment 10 James Crook 2018-08-24 17:00:55 UTC
P5 per off-list discussion with Peter.
Comment 11 James Crook 2018-09-09 11:05:02 UTC
Support by us for WDM/KS discontinued from 2.0.4.  Use WASAPI instead.

RESOLVED WONTFIX.