You are not logged in.

#1 2021-05-06 21:33:38

isochor89
Member
Registered: 2020-09-15
Posts: 11

[Solved] Sometimes Sound only works with specific programs e.g. GTA V

Hello,

2-3 times a week I have a very strange problem with my audio: If I play e.g. GTA V I have no problem but as soon as I minimize the program and go to the desktop, the Sound icon in the taskbar is gone and I can not hear any audio. If I go to the audio settings there is no audio device listed (Cinnamon -->Settings-->Sound-->Output).

This problem is very hard to reproduce. Usually it goes like this: everything works fine, I start Lutris --> Epic Games --> GTA V, I play, I minimize to surf, I go back to the game, I suspend the computer, I go back, surf again, do office stuff, maximize the game, play a few hours, minimize the game again and sometimes when I am back on the Desktop I don't longer have any audio device. But If I go back to GTA V the sound is still working.

I thought this would be a specific configuration bug on my computer. But last week I had the same problem on another Computer which runs on PopOS! while I was using Zoom. So in Zoom the Sound worked as well, but as soon as I opend Firefox to watch a video on youtube I no longer had any sound. Here also I didn't had any audio device listed. After restarting Zoom I also lost Audio with this program.

It is not like Firefox, VNC, Spotify etc. would be muted. They are not. The problem is, that the Computer doesn't recognize/list any audio device any longer while the audio obviously is still working on some programs. If I restart the computer, everything goes back to normal.

I tried to do:


systemctl --user restart pulseaudio.service 

But it had not the hoped effect. I got my HDMI Audio-Devices back but not the audio device on my mainboard, where my loudspeaker are plugged in. I assume this is not a Arch-Specific problem since I had the same bug on PopOS! with another program. So I think there is something fundamental I don't understand. Did I described my problem clear? It would be great if someone could pinpoint me to a possible root cause.

Thank you very much


perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US",
        LC_ALL = (unset),
        LC_ADDRESS = "de_DE.UTF-8",
        LC_NAME = "de_DE.UTF-8",
        LC_MONETARY = "de_DE.UTF-8",
        LC_PAPER = "de_DE.UTF-8",
        LC_IDENTIFICATION = "de_DE.UTF-8",
        LC_TELEPHONE = "de_DE.UTF-8",
        LC_MEASUREMENT = "de_DE.UTF-8",
        LC_TIME = "de_DE.UTF-8",
        LC_NUMERIC = "de_DE.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
System:    Host: archDesk Kernel: 5.11.16-arch1-1 x86_64 bits: 64 Desktop: Cinnamon 4.8.6 Distro: Arch Linux 
Machine:   Type: Desktop Mobo: MSI model: B150M MORTAR (MS-7972) v: 2.0 serial: G616404399 UEFI: American Megatrends v: C.D0 
           date: 06/27/2018 
CPU:       Info: Quad Core model: Intel Core i5-6500 bits: 64 type: MCP L2 cache: 6 MiB 
           Speed: 1537 MHz min/max: 800/3600 MHz Core speeds (MHz): 1: 1537 2: 1200 3: 1530 4: 1200 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] driver: amdgpu 
           v: kernel 
           Display: server: X.Org 1.20.11 driver: loaded: amdgpu unloaded: modesetting,vesa resolution: 1: 1920x1080~60Hz 
           2: 1920x1080~60Hz 
           OpenGL: renderer: AMD Radeon RX 5700 XT (NAVI10 DRM 3.40.0 5.11.16-arch1-1 LLVM 11.1.0) v: 4.6 Mesa 21.0.3 
Audio:     Device-1: Intel 100 Series/C230 Series Family HD Audio driver: snd_hda_intel 
           Device-2: Advanced Micro Devices [AMD/ATI] Navi 10 HDMI Audio driver: snd_hda_intel 
           Sound Server: ALSA v: k5.11.16-arch1-1 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 
           IF: enp6s0 state: up speed: 1000 Mbps duplex: full mac: 4c:cc:6a:4b:5c:95 
Drives:    Local Storage: total: 1.84 TiB used: 657.26 GiB (34.9%) 
           ID-1: /dev/nvme0n1 vendor: A-Data model: SX8200PNP size: 953.87 GiB 
           ID-2: /dev/sda vendor: SanDisk model: SSD PLUS 1000GB size: 931.52 GiB 
Partition: ID-1: / size: 224.23 GiB used: 49.06 GiB (21.9%) fs: ext4 dev: /dev/nvme0n1p2 
           ID-2: /boot size: 499 MiB used: 106 MiB (21.3%) fs: vfat dev: /dev/sda3 
           ID-3: /home size: 820.35 GiB used: 156.3 GiB (19.1%) fs: ext4 dev: /dev/sda2 
Swap:      ID-1: swap-1 type: partition size: 14.67 GiB used: 43 MiB (0.3%) dev: /dev/nvme0n1p1 
Sensors:   System Temperatures: cpu: 36.0 C mobo: 29.8 C gpu: amdgpu temp: 30.0 C 
           Fan Speeds (RPM): N/A gpu: amdgpu fan: 959 
Info:      Processes: 296 Uptime: 3d 1h 43m Memory: 31.31 GiB used: 19.38 GiB (61.9%) Shell: Bash inxi: 3.3.01 
 

Last edited by isochor89 (2021-05-08 16:19:21)

Offline

#2 2021-05-07 08:05:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,991

Re: [Solved] Sometimes Sound only works with specific programs e.g. GTA V

What can happen here depending on how any given program accesses the audio device is that something gets to the card quicker than pulseaudio which will break audio for everything that's on pulse (... or the reverse, pulse occupying the device will block it for other utilities that aren't on pulse) when this happens what's your output for

sudo fuser -v /dev/snd/*

, is pulseaudio-alsa installed?

Online

#3 2021-05-08 07:39:34

isochor89
Member
Registered: 2020-09-15
Posts: 11

Re: [Solved] Sometimes Sound only works with specific programs e.g. GTA V

Right now I have Sound only with GTAV while everything esle has not

[myUser@archDesk ~]$ sudo fuser -v /dev/snd/*
[sudo] password for myUser: 
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  myUser   33079 F.... Launcher.exe
                     myUser   33288 F.... GTA5.exe
                     myUser   42667 F.... steamwebhelper
/dev/snd/controlC1:  myUser   47722 F.... pulseaudio
/dev/snd/pcmC0D0c:   myUser   33288 F...m GTA5.exe
/dev/snd/pcmC0D0p:   myUser   33079 F...m Launcher.exe
                     myUser   33288 F...m GTA5.exe
                     myUser   42667 F...m steamwebhelper
/dev/snd/pcmC1D7p:   myUser   47722 F...m pulseaudio
/dev/snd/timer:      myUser   33079 f.... Launcher.exe
                     myUser   33288 f.... GTA5.exe
                     myUser   42667 f.... steamwebhelper

pulseaudio-alsa is not installed

Offline

#4 2021-05-08 10:12:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,991

Re: [Solved] Sometimes Sound only works with specific programs e.g. GTA V

Yes that's not a situation you want. While you probably want to install pulseaudio-alsa in general, it shouldn't have a bearing on this in particular however.

GTA5 is started via wine which should and would support pulseaudio, however this reads like a very late PID for pulseaudio that should be autostarted with your session. How are you starting your graphical environment? Is pulseaudio crashing? Do you find a coredump in

coredumpctl list

for pulseaudio and if so what's the output of running

coredumpctl gdb $insertPIDofthecrashedpulse
bt full

give you? Is the lutris script enforcing ALSA for some reason? Do you have error messages in pulse's journal with e.g.

journalctl -b --user-unit=pulseaudio

Online

#5 2021-05-08 11:32:48

isochor89
Member
Registered: 2020-09-15
Posts: 11

Re: [Solved] Sometimes Sound only works with specific programs e.g. GTA V

I start the desktop environment (cinnamon) with lightdm. This bug happens after I start GTAV. So on startup the Sound works fine. Maybe this has something to do with suspending the computer while GTAV is running in the background? But I had the same problem on my notebook with Zoom without going to suspend mode.

Can I give pulseaudio access to /dev/snd/controlC0 without restarting the computer?



There is no crashed pulseaudio on coredumpctl                     

 coredumpctl list 

[myUser@archDesk ~]$ coredumpctl list
TIME                            PID  UID  GID SIG     COREFILE EXE                                                                   SIZE
Fri 2021-02-26 13:19:41 CET   90518 1000 1000 SIGABRT missing  /usr/bin/konsole                                                       n/a
Sat 2021-02-27 09:09:14 CET     994 1000 1000 SIGTRAP missing  /opt/spotify/spotify                                                   n/a
Sat 2021-02-27 09:09:14 CET     993 1000 1000 SIGTRAP missing  /opt/spotify/spotify                                                   n/a
Sat 2021-02-27 09:09:15 CET     964 1000 1000 SIGTRAP missing  /opt/spotify/spotify                                                   n/a
Sun 2021-03-14 16:37:34 CET  392918 1000 1000 SIGABRT missing  /usr/bin/cvsservice5                                                   n/a
Thu 2021-03-18 18:43:35 CET  461023 1000 1000 SIGABRT missing  /usr/bin/kdeinit5                                                      n/a
Thu 2021-03-18 18:43:37 CET  461042 1000 1000 SIGABRT missing  /usr/bin/kdeinit5                                                      n/a
Thu 2021-03-18 18:43:39 CET  461057 1000 1000 SIGABRT missing  /usr/bin/kdeinit5                                                      n/a
Thu 2021-03-18 23:38:49 CET    3511 1000 1000 SIGABRT missing  /usr/bin/kglobalaccel5                                                 n/a
Thu 2021-03-18 23:38:50 CET    2408 1000 1000 SIGSEGV missing  /home/myUser/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-i386  n/a
Thu 2021-03-18 23:38:50 CET    3534 1000 1000 SIGABRT missing  /usr/bin/kglobalaccel5                                                 n/a
Thu 2021-03-18 23:38:51 CET    3596 1000 1000 SIGABRT missing  /usr/bin/kglobalaccel5                                                 n/a
Thu 2021-03-18 23:38:51 CET    3618 1000 1000 SIGABRT missing  /usr/bin/kglobalaccel5                                                 n/a
Thu 2021-03-18 23:38:51 CET    3628 1000 1000 SIGABRT missing  /usr/bin/kglobalaccel5                                                 n/a
Thu 2021-03-18 23:39:02 CET    3879 1000 1000 SIGTRAP missing  /opt/spotify/spotify                                                   n/a
Thu 2021-03-18 23:39:02 CET    3854 1000 1000 SIGTRAP missing  /opt/spotify/spotify                                                   n/a
Sun 2021-03-28 11:18:36 CEST  85139 1000 1000 SIGSEGV missing  winedevice.exe                                                         n/a
Sat 2021-04-10 10:06:59 CEST    953 1000 1000 SIGTRAP missing  /opt/spotify/spotify                                                   n/a
Sun 2021-04-11 12:11:53 CEST  40013 1000 1000 SIGSEGV missing  /usr/bin/python3.9                                                     n/a
Thu 2021-04-15 23:06:31 CEST  65453 1000 1000 SIGSEGV missing  /usr/bin/vlc                                                           n/a
Thu 2021-04-15 23:15:07 CEST  91648 1000 1000 SIGSEGV missing  /usr/bin/vlc                                                           n/a
Sun 2021-04-25 08:59:44 CEST    958 1000 1000 SIGTRAP missing  /opt/spotify/spotify                                                   n/a
Sun 2021-05-02 10:35:40 CEST 252219    0    0 SIGABRT missing  /usr/bin/kfmclient                                                     n/a
Mon 2021-05-03 21:57:43 CEST    960 1000 1000 SIGTRAP present  /opt/spotify/spotify                                                  3.7M
Mon 2021-05-03 21:57:44 CEST    913 1000 1000 SIGTRAP present  /opt/spotify/spotify                                                  7.1M

But the journalctl outputs something interessting:

 
[myUser@archDesk ~]$ journalctl -b --user-unit=pulseaudio
-- Journal begins at Fri 2021-02-26 10:53:35 CET, ends at Sat 2021-05-08 13:11:59 CEST. --
May 03 21:57:42 archDesk systemd[614]: Starting Sound Service...
May 03 21:57:43 archDesk systemd[614]: Started Sound Service.
May 05 22:14:22 archDesk systemd[614]: pulseaudio.service: Deactivated successfully.
May 05 22:14:22 archDesk systemd[614]: pulseaudio.service: Consumed 11min 12.799s CPU time.
May 05 22:14:23 archDesk systemd[614]: Starting Sound Service...
May 05 22:14:23 archDesk pulseaudio[31428]: Daemon already running.
May 05 22:14:23 archDesk pulseaudio[31428]: pa_pid_file_create() failed.
May 05 22:14:23 archDesk systemd[614]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
May 05 22:14:23 archDesk systemd[614]: pulseaudio.service: Failed with result 'exit-code'.
May 05 22:14:23 archDesk systemd[614]: Failed to start Sound Service.
May 05 22:14:23 archDesk systemd[614]: pulseaudio.service: Scheduled restart job, restart counter is at 1.
May 05 22:14:23 archDesk systemd[614]: Stopped Sound Service.
May 05 22:14:23 archDesk systemd[614]: Starting Sound Service...
May 05 22:14:24 archDesk pulseaudio[31442]: Daemon already running.
May 05 22:14:24 archDesk pulseaudio[31442]: pa_pid_file_create() failed.
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Failed with result 'exit-code'.
May 05 22:14:24 archDesk systemd[614]: Failed to start Sound Service.
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Scheduled restart job, restart counter is at 2.
May 05 22:14:24 archDesk systemd[614]: Stopped Sound Service.
May 05 22:14:24 archDesk systemd[614]: Starting Sound Service...
May 05 22:14:24 archDesk pulseaudio[31443]: Daemon already running.
May 05 22:14:24 archDesk pulseaudio[31443]: pa_pid_file_create() failed.
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Failed with result 'exit-code'.
May 05 22:14:24 archDesk systemd[614]: Failed to start Sound Service.
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Scheduled restart job, restart counter is at 3.
May 05 22:14:24 archDesk systemd[614]: Stopped Sound Service.
May 05 22:14:24 archDesk systemd[614]: Starting Sound Service...
May 05 22:14:24 archDesk pulseaudio[31459]: Daemon already running.
May 05 22:14:24 archDesk pulseaudio[31459]: pa_pid_file_create() failed.
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Failed with result 'exit-code'.
May 05 22:14:24 archDesk systemd[614]: Failed to start Sound Service.
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Scheduled restart job, restart counter is at 4.
May 05 22:14:24 archDesk systemd[614]: Stopped Sound Service.
May 05 22:14:24 archDesk systemd[614]: Starting Sound Service...
May 05 22:14:24 archDesk pulseaudio[31480]: Daemon already running.
May 05 22:14:24 archDesk pulseaudio[31480]: pa_pid_file_create() failed.
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Failed with result 'exit-code'.
May 05 22:14:24 archDesk systemd[614]: Failed to start Sound Service.
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Scheduled restart job, restart counter is at 5.
May 05 22:14:24 archDesk systemd[614]: Stopped Sound Service.
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Start request repeated too quickly.
May 05 22:14:24 archDesk systemd[614]: pulseaudio.service: Failed with result 'exit-code'.
May 05 22:14:24 archDesk systemd[614]: Failed to start Sound Service.
May 06 23:43:09 archDesk systemd[614]: Starting Sound Service...
May 06 23:43:10 archDesk systemd[614]: Started Sound Service.

Last edited by isochor89 (2021-05-08 11:36:33)

Offline

#6 2021-05-08 12:02:46

isochor89
Member
Registered: 2020-09-15
Posts: 11

Re: [Solved] Sometimes Sound only works with specific programs e.g. GTA V

ok, If i kill the following processes

/dev/snd/controlC0:  myUser   33079 F.... Launcher.exe
                     myUser   33288 F.... GTA5.exe
                     myUser   42667 F.... steamwebhelper

and then do the following:

systemctl --user restart pulseaudio.service
pulseaudio --start

I get the devices back and the sound works again.

[myUser@archDesk ~]$ sudo fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  myUser   59526 F.... pulseaudio
/dev/snd/controlC1:  myUser   59526 F.... pulseaudio 

Is there a more intelligent way in such that I don't have to kill the processes but still give pulseaudio the solely access to the /dev/snd/controlC0 ?

Last edited by isochor89 (2021-05-08 12:05:47)

Offline

#7 2021-05-08 12:22:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,991

Re: [Solved] Sometimes Sound only works with specific programs e.g. GTA V

If it only happens on suspend it's likely up to chance/racing conditions on which program gets to the sound device first. But I'd assume under normal circumstances pulse wouldn't need to be restarted just from a suspension wakeup.  Are you sure you are suspending and not hibernating? Though this might be normal, not on a system where I often use suspend right now.

Well in general you can give pulse control back by closing everything that's actively using the soundcard other than pulse so pulse can properly take over and if you restart GTA V it should go via pulse instead of accessing the card directly.

Something you might want to check is the winecfg settings of the wine prefix in use by the Epic Launcher, does it enforce ALSA output regardless? I did take a look at the lutris install script and it doesn't look like it tries to enforce ALSA, but that might still be something to check.

Edit: Ah you found that, had the thread lying around for a while, mmm do you need the second distinct pulseaudio --start? a restart of the user service should normally be sufficient.

Last edited by V1del (2021-05-08 12:24:12)

Online

#8 2021-05-08 16:05:13

isochor89
Member
Registered: 2020-09-15
Posts: 11

Re: [Solved] Sometimes Sound only works with specific programs e.g. GTA V

V1del wrote:

If it only happens on suspend it's likely up to chance/racing conditions on which program gets to the sound device first.

Are racing conditions something I can change on user level? Thought this would be a kernel topic which needs comprehensive understanding of it.

V1del wrote:

Something you might want to check is the winecfg settings of the wine prefix in use by the Epic Launcher, does it enforce ALSA output regardless? I did take a look at the lutris install script and it doesn't look like it tries to enforce ALSA, but that might still be something to check.

I checked the audio winecfg settings in lutris for the epic  Launcher. Indeed there is no ALSA listed. There are several output device options (System default; out:default; Out: HDA Intel PCH -ALC892 Analog, HDA Intel PCH -ALC892 Digital, HDA ATI HDMI 0-5)

I will install pulseaudio-alsa as you suggested and check if something changes. Thank you very much for your help, especially with your initial assumption and that I can check it with fuser

 sudo fuser -v /dev/snd/* 

If I can't get rid of the bug in future, at least I know how to handle it without having to restart the system.

Last edited by isochor89 (2021-05-08 16:06:11)

Offline

Board footer

Powered by FluxBB