Game losing sound in KDE

Questions about Wine on Linux
Post Reply
ForeverNoob
Newbie
Newbie
Posts: 4
Joined: Sat Mar 27, 2021 12:25 pm

Game losing sound in KDE

Post by ForeverNoob » Sat Mar 27, 2021 12:44 pm

Hello,

I'm using wine (always latest stable version) to play a Windows game (WWII Online: Battleground Europe, platinum rating). On KDE only, after some time - could be days, weeks or even months - suddenly the game loses all sound. When this happens the sound test in winecfg still works. Never had that problem on other DE. It happened on kubuntu, openSUSE and manjaro, always KDE. Last time it happened mid-game, after I alt-tabbed to another application and then back to the game. Once sound is lost, reinstalling the game and wine doesn't solve the problem. I tried creating a new user, which helped, but again only for a limited time, after which sound lost again. Any ideas what it could be?

TIA

SetantaLP
Level 3
Level 3
Posts: 52
Joined: Mon Jul 31, 2017 3:55 am

Re: Game losing sound in KDE

Post by SetantaLP » Mon Mar 29, 2021 5:01 pm

What exactly do you mean by "reinstalling the game"? Just running the installer again in the same wine prefix or creating a new wine prefix and installing the game there. In case of the former it looks like something got corrupted in the wine prefix and trying the latter might help (and after that maybe diff-ing the two prefixes to see what is different); in case of the latter something in the user account got corrupted, and to find out what it might help to create a backup of an account that works and when it no longer works to create a new incremental backup and check the log for what has changed between the two backups (which could be a lot if the backups are weeks apart, so you probably should do backups every few days).

ForeverNoob
Newbie
Newbie
Posts: 4
Joined: Sat Mar 27, 2021 12:25 pm

Re: Game losing sound in KDE

Post by ForeverNoob » Mon Mar 29, 2021 11:46 pm

SetantaLP wrote:
Mon Mar 29, 2021 5:01 pm
What exactly do you mean by "reinstalling the game"? Just running the installer again in the same wine prefix or creating a new wine prefix and installing the game there. In case of the former it looks like something got corrupted in the wine prefix and trying the latter might help (and after that maybe diff-ing the two prefixes to see what is different); in case of the latter something in the user account got corrupted, and to find out what it might help to create a backup of an account that works and when it no longer works to create a new incremental backup and check the log for what has changed between the two backups (which could be a lot if the backups are weeks apart, so you probably should do backups every few days).
Hi SetantaLP,

What I did was to entirely delete the .wine directory, then re-run winecfg and reinstall the game. That didn't help. However, I will try your suggestion to periodically backup the account and see what happenes.

Thanks.

jojoax
Newbie
Newbie
Posts: 2
Joined: Fri Oct 31, 2014 6:35 am

Re: Game losing sound in KDE

Post by jojoax » Wed Mar 31, 2021 4:02 am

Hi!
deleting and re installing may never help with in the Linux world.

I Presume, you are using pulseaudio (KDE does so, if installed, nearly every case)?
Mostly all linux sound hardware runs over the Alsa driver environment.

New KDE installations depend on PulseAudio, older used alsa directly, mid-age both.
Perhaps you have "kmix" installed, perhaps you see in the system tray the speaker icon twice. First then, deinstall the kmix package or stop it from beeing loaded on login to your desktop.
kmix may block the hardware access against other audio users.
Pulseaudio is such. Pulseaudio is a rather sophisticaed and also complex audio server router. The new KDE (Plasma) workspace depend on it.


Check Audio is working over pulseaudio:
- open konsole, run "pactl info"; you shoul see version, rigfhts etc.
- if pulse does not run, try "pulseautio --kill", "pullseaudio start"
- open KDE Sound controll via Systemtray or Systemsettings, youse you output, test it. if sound works, ok, fine.

Now let's check wine:
- in konsole run "winecfg", find Tab "Audio", set "Standards" to pulseaudio, and look over speaker configs below.
if you can not choose pulse audio (Choosen Driver: winepulse.drv) then consider to update wine to "wine-staging", which includes the pulse audio drivers.

Remember pulseaudio does i.g. the audio routing, remember to give pulseaudio the routing hint, which device ("sink") of ypur pulseaudio is to be choosen for wine.
you can run your game, open the audio mixer for pulse (there are quite a lot of them) and choose the correct audio device for your running wine - game. Once set up correctly it runse here flawless and rockstable. (Arch Linux, current KDE 5.21.xx, wine-staging v6.5, pulseaudio v14.2)

Sometimes Pulseaudio may have an annoying behavior, if many audio devices are used, (Headset, Bluetooth, direct Hardware Alsa with many outputs, HDMI Audio to Monitor), in such cases you have to give the Advise, which device is to be used.

I hope, I could help

ForeverNoob
Newbie
Newbie
Posts: 4
Joined: Sat Mar 27, 2021 12:25 pm

Re: Game losing sound in KDE

Post by ForeverNoob » Wed Mar 31, 2021 7:06 am

Thnak you jojoax, will try that and report back.

Synack2008
Newbie
Newbie
Posts: 4
Joined: Tue Mar 30, 2021 8:30 am

Re: Game losing sound in KDE

Post by Synack2008 » Wed Mar 31, 2021 7:42 am

More often than I care to admit, the audio can change output destinations if you have more than one possible output.
Many systems will have Front speakers, Rear speakers, HDMI and digital out.

You can also do a really quick check in the volume manager.
Once the app is running and some audio *should* be playing, open the volume manager by your clock (on a default KDE Plasma install)
Select the applications tab and click the "hamburger" next to the application running. Make sure the correct output device is selected

Doesn't look like I can directly attach a screenshot here, let me know if one would help and i'll upload it somewhere and post the URL.

ForeverNoob
Newbie
Newbie
Posts: 4
Joined: Sat Mar 27, 2021 12:25 pm

Re: Game losing sound in KDE

Post by ForeverNoob » Thu Apr 01, 2021 6:54 am

Hello,

I may have found a solution: adding the game to my Steam library, which makes it run under proton. As of now everything works, hope it continues.

Thanks to all that helped.

Post Reply