I opened much stuff, then stopped when I saw a certain lag. I'd probably have to open these programs twice to see a consistent swap usage but I think I went off-topic enough.
What about changing audio provider? Should I try another one to see if the problem happens again or replacing PulseAudio is too dangerous? I mean temporarily of course, to test another provider, definitively only if the audio works every time I log in again.
Looking back at your
alsamixer settings in post #19. I see [Loopback Mode] = "Disabled".
alsamixer in terminal.
Hit F5 to show "All" sound channels.
Scroll accross to [Loopback Mode] channel and toggle it from "Disabled" to "Enabled".
See if that helps.
Interesting sequence, I tried killing PulseAudio more times and at eighth time it says
E: [pulseaudio] main.c: Daemon termination failed: No process matches.
pulseaudio -kagain once I closed Minetest but it said the same and audio didn't work anyway once I restarted the game. Note that audio tray icon misses.
No game audio was working, Surge the Rabbit at least showed an error.
The best thing is that my Rhythmbox musics and soundtracks played just as normal. I'd have expected a scary silence of course. Moreover, PulseAudio was missing from running processes on System Monitor.
I tried to remove PulseAudio, then I'd have replaced it with any other audio provider but the procedure wants to remove Zorin OS Desktop, I don't know why, I'm not trying to remove that .
sudo apt purge pulseaudio Reading list of packages... Done Dependency tree generation Reading status information... Done The following packages were installed automatically and are no longer required: adwaita-qt libpaper1:i386 libpulsedsp libspeexdsp1 pulseaudio-utils rtkit vlc-bin vlc-data vlc-l10n vlc-plugin-base vlc-plugin-notify vlc-plugin-qt vlc-plugin-samba vlc-plugin-skins2 vlc-plugin-video-output vlc-plugin-video-splitter vlc-plugin-visualization Use "sudo apt autoremove" to remove them. The following packages will be REMOVED: libcanberra-pulse* pulseaudio* pulseaudio-module-bluetooth* zorin-os-desktop* 0 updated, 0 installed, 4 to be removed, and 29 not updated. After this operation, 5,036 kB of disk space will be freed.
Pulse audio is a service that interacts with the hardware, not just a front end mixer/configurator. The same would most likely occur if you install Alisa instead, as it would rely on pulse audio service. I don't know if there is an alternative. As it is, most applications attempt to fix the gaps and issues that plaque pulse audio.
You can try using Pipewire instead of Pulseaudio.
Pulseaudio is part of SystemD. This, right here, is a glaring example as to why you will find a lot of negativity toward SystemD.
It is not actually modular. SystemD is convoluted and complex and intertwined with many dependencies that it shouldn't have.
It is heavy and clunky and it runs itself, rather than being run.
GnuLinux prides on the idea of "Do one thing; do it well". This makes sense, as it allows keeping things simple, ensuring things work well and keeps things Open Source as it is more accessible.
SystemD does many things, with moderate success.
It is such a large clustered mess of many different components, that open source programmers generally won't touch it. Meaning that it gets very little independent review or improvements.
pipewire just to try. Also, after the whole output the terminal didn't write
luca@Asus:~$ as usually does after the output end.
[E][000003491.014906][module-protocol-native.c:578 lock_socket()] server 0x55b6a0b50290: unable to lock lockfile '/run/user/1000/pipewire-0.lock': Resource temporarily unavailable (maybe another daemon is running) [E][000003491.015914][conf.c:309 load_module()] config 0x55b6a0b36820: could not load mandatory module "libpipewire-module-protocol-native": Resource temporarily unavailable [E][000003491.016364][conf.c:383 create_object()] can't find factory spa-node-factory
It's already installed, I never did it though, at least not personally.
Reading list of packages... Done Generating dependency tree Reading status information... Done pipewire is already at the latest version (0.3.24-3+zorin3). Pipewire has been set up for manual installation.
@Luca_Pavan , was this issue ever resolved?
No, but I'm going to test different configurations of settings and let the laptop in standby with them to see if one can do the trick, like for example letting a game opened and turning off auto-suspend. I'll have to try with different times, like from few minutes till 1 hour or more. So far I don't have much trust on PulseAudio.
So, I tried different things, I set the laptop in standby both with a game running and without any, I did again the same but this time without suspension, I set it in standby while a game soundtrack was playing, I was unable to make the problem happen intentionally in any situations. I just felt the issue was kidding me. I tried again, this time with headphones plugged and in fact the problem happened. Now I'm a bit confused, if it comes with the use of headphones or without the use of suspension. No doubt this problem has been a plague ever since I started using Zorin OS Core.
With the headphones, as we have witnessed here many times, the system does not always "remember" the state of headphones, which ones are in use...sometimes even when setting the default manually. So I would not take this as a confirmation that the original problem was not resolved...this very well may be a completely separate issue altogether.
If you can not reproduce it by the speakers, then I would say the original issue may have been resolved.
At this point I'd have really liked at least to confirm if the problem was using suspension or headphones but tests I made with them both combined and separated didn't prove it. I even shared the issue on Launchpad but I got no reply from developers from months yet.