ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.31k stars 1.06k forks source link

No sound on DOOM (2016) with USB Audio (379720) #206

Open whiskersnout opened 6 years ago

whiskersnout commented 6 years ago

On Kubuntu 18.04, fresh install, with all drivers installed as recommended at https://github.com/ValveSoftware/Proton/blob/proton_3.7/PREREQS.md. Game seems to run fine otherwise, just no sound whatsoever, whether on OpenGL or Vulkan.

Edit for system specs: Ryzen 1500X RX 480 4GB

LeJimster commented 6 years ago

Works flawlessly for me, but I'm running on Arch. Maybe somebody running the same distro as you can test.

Thinkaboutmin commented 6 years ago

Hey buddy, try to see whether the audio is outputting to the correct device. As you have Kubuntu, go to the system sound menu, while the game is running, and check if the application is outputting the audio to the device correctly.

Eonfge commented 6 years ago

Can confirm. Game works here apart from audio. Details

I did some research myself and I found the following things: PulseAudio never receives any audio. Doom is mentioned within the playback devices, but there is never any input reported.

When I start the winecfg, I can do an audio test which shows that audio works. @whiskersnout you can test your wine-audio by starting winecfg

WINEPREFIX=/DIRECTORY/Steam/steamapps/compatdata/379720/pfx winecfg

aqxa1 commented 6 years ago

Audio is broken for me in all games for me since the update today. Nothing in pamix (console mixer for pulse) and doesn't work with pure ALSA either.

Eonfge: Checking winecfg won't tell the entire story since that will use your system Wine, rather than the Proton one. I'm not sure where that is stored, however.

commandhat commented 6 years ago

@thirdeyefunction winecfg is telling (most of) the entire story here; the command line from the comment above yours temporarily sets the system WINEPREFIX env variable so that winecfg reads from Proton's configs as opposed to your system's normal wine configs. It's reset as soon as the program ends.

This isn't the correct explanation, but it works well enough for what's going on here.

As for the bug itself, I remember running into this issue with PulseAudio before; for whatever reason PulseAudio doesn't like to register apps that attempt to play sound at the same time the first frame is sent to the GPU. You may be able to temporarily fix it by delaying either PulseAudio 2 frames or delaying the game executable by 2 frames, but it's an ugly hack and should not be used in release builds (as doing so can mess with a lot of sensitive drivers, and cause some devices to crash or hang)

aqxa1 commented 6 years ago

@commandhat Yes, but the test itself relies on the system Wine executable to run (unless you explicitly run Proton's wine executable with winecfg following). If there is a problem in Proton's Wine executable, rather than its configuration, that would not be seen.

whiskersnout commented 6 years ago

So I've come to discover that the no audio only occurs when attaching my Bose USB speakers. Audio functions correctly when using the HDMI via RX 480, or when using the direct audio connectors on the motherboard.

Eonfge commented 6 years ago

Can add to the information, I'm Using a Cooler Master Sirus 5.1 headset which is connected to my machine using a USB Mixing console (fancy word for volume nob).

           description: USB controller
             product: 7 Series/C210 Series Chipset Family USB xHCI Host Controller
             vendor: Intel Corporation
             physical id: 14
             bus info: pci@0000:00:14.0
             version: 04
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi xhci bus_master cap_list
             configuration: driver=xhci_hcd latency=0
             resources: irq:24 memory:f7320000-f732ffff
           *-usbhost:0
                product: xHCI Host Controller
                vendor: Linux 4.15.0-33-generic xhci-hcd
                physical id: 0
                bus info: usb@3
                logical name: usb3
                version: 4.15
                capabilities: usb-2.00
                configuration: driver=hub slots=4 speed=480Mbit/s
              *-usb
                   description: Audio device
                   product: Sirus Headset
                   physical id: 4
                   bus info: usb@3:4
                   version: 0.10
                   capabilities: usb-1.10 audio-control
                   configuration: driver=usbhid maxpower=500mA speed=12Mbit/s
Eonfge commented 6 years ago

To all those subscribed, who don't want to go without their USB headset, I have this workaround.

Use winetricks to install the following packages: WINEPREFIX=/your location/steamapps/compatdata/379720/pfx winetricks package

Then, I switched the audio system to alsa: WINEPREFIX=/your location/steamapps/compatdata/379720/pfx winetricks sound=alsa

After which I went into the winecfg to set the proper audio channels as defaults: WINEPREFIX=/your location/steamapps/compatdata/379720/pfx winecfg

After that, 4.1 sound in Doom 2016. Rip and tear.

Eonfge commented 6 years ago

@kisak-valve Issue might be resolved with proton 3-7.6

I first had this issue with both Doom 2016 and Rage, after which I used my own workaround to get Doom running. Now with 3.7, Rage audio works. I'm a little apprehensive to Reinstall Doom just to validate this bug, but it might be resolved.

LeJimster commented 6 years ago

@Eonfge backup your prefix for Doom. Delete it. Restart steam. And verify file intergrity. It will redownload a fresh prefix.

Eonfge commented 6 years ago

@LeJimster I tried that but I had no success.

I did discover a few other things:

Eonfge commented 5 years ago

Reproduced case once more on 3.7-8:

Also, the Alsa trick I used before doesn't work. Using also now, I get crackling and disrupted audio.

Edit. Trying to set sound=pulse does reveal the following:

Executing /mnt/InternalStorage/Steam/steamapps/common/Proton 3.7/dist/bin/wine regedit C:\windows\Temp\_sound=pulse\set-sound.reg
001f:err:module:load_builtin_dll failed to load .so lib for builtin L"winebus.sys": libudev.so.0: cannot open shared object file: No such file or directory
001f:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\WineBus": c0000142
001f:err:winedevice:create_driver failed to create driver L"WineBus": c0000142
0013:err:service:process_send_command service protocol error - failed to write pipe!
000d:fixme:service:scmdatabase_autostart_services Auto-start service L"WineBus" failed to start: 1114

Executing /mnt/InternalStorage/Steam/steamapps/common/Proton 3.7/dist/bin/wine64 regedit C:\windows\Temp\_sound=pulse\set-sound.reg
001f:err:module:load_builtin_dll failed to load .so lib for builtin L"winebus.sys": libudev.so.0: cannot open shared object file: No such file or directory
001f:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\WineBus": c0000142
001f:err:winedevice:create_driver failed to create driver L"WineBus": c0000142
0013:err:service:process_send_command service protocol error - failed to write pipe!
000d:fixme:service:scmdatabase_autostart_services Auto-start service L"WineBus" failed to start: 1114
Eonfge commented 5 years ago

Works in 4.2-6 with my setup.

@whiskersnout Could you validate and close the issue?