I have 3 devices connected to my pc for playing sounds. The first one is a headset and it’s the default output device, the second is a tv, the third are 5.1 speakers. Whenever i’m using the tv to watch something i select it as output audio device but after the screensaver get activated the output device always switches back to the headset. How can i stop it from switching automatically?
Please read this: How to provide good information
and post some more information so we can see what’s really going on. Now we know the symptom of the disease, but we need some more probing to know where the origin lies…
An inxi --admin --verbosity=7 --filter --no-host --width would be the minimum required information… (Personally Identifiable Information like serial numbers and MAC addresses will be filtered out by the above command)
Also, please copy-paste that output in-between 3 backticks ``` at the beginning and end of the code/text.
the output to alsa-info before and after the switch would be helpful as well.
Also-info output: (2nd command was a double press of tab key)
[nick@manjaro ~]$ alsa-info
bash: alsa-info: command not found
[nick@manjaro ~]$ alsa
alsabat alsa_delay alsaloop alsa_out
alsabat-test.sh alsa_in alsa_loopback alsatplg
alsactl alsa-info.sh alsamixer alsaucm
[nick@manjaro ~]$ alsa-info.sh
ALSA Information Script v 0.4.65
--------------------------------
This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.
dmesg
lspci
aplay
amixer
alsactl
rpm, dpkg
/proc/asound/
/sys/class/sound/
~/.asoundrc (etc.)
See '/usr/bin/alsa-info.sh --help' for command line options.
Newer version detected: 0.5.0
To view the ChangeLog, please visit http://www.alsa-project.org/alsa-info.sh.changelog
ALSA-Info script has been downloaded /tmp/alsa-info.uqvEag8aoI.
Please, re-run it from new location.
[nick@manjaro ~]$ cd /tmp/alsa-info.uqvEag8aoI
bash: cd: /tmp/alsa-info.uqvEag8aoI: Not a directory
I’m not sure if i did anything wrong with the alsa-info command. I don’t think it matters anyways as i dont plug anything in or out. After i wake up my screen from sleep/standby-mode all the same devices are still there but sound plays through the hyperx headset instead of hdmi. Hdmi is what i had selected via xfce panel sound icon before my screen went into sleepmode. I want the sound output to stop switching back to the hyperx-HS by itself whenever my screen goes into sleep.
You did not: it just detected that a new version exists and downloaded that and told you to execute the new one
so instead of:
just:
chmod a+x /tmp/alsa-info.uqvEag8aoI #this command gives 'a'll users the additional '+' right to e'x'ecute that script
/tmp/alsa-info.uqvEag8aoI #executes the newly downloaded script
Before and after sleep so we can see what changed automatically, so we can make what you want the default.
chmod a+x /tmp/alsa-info.uqvEag8aoI #this command gives 'a'll users the additional '+' right to e'x'ecute that script
/tmp/alsa-info.uqvEag8aoI #executes the newly downloaded script
ALSA Information Script v 0.5.0
--------------------------------
This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.
dmesg
lspci
aplay
amixer
alsactl
rpm, dpkg
/proc/asound/
/sys/class/sound/
~/.asoundrc (etc.)
See '/tmp/alsa-info.uqvEag8aoI --help' for command line options.
/tmp/alsa-info.uqvEag8aoI: line 661: tree: command not found
/tmp/alsa-info.uqvEag8aoI: line 661: tree: command not found
/tmp/alsa-info.uqvEag8aoI: line 661: tree: command not found
dmesg: read kernel buffer failed: Operation not permitted
Automatically upload ALSA information to www.alsa-project.org? [y/N] : y
Uploading information to www.alsa-project.org ... Done!
Your ALSA information is located at http://alsa-project.org/db/?f=8a6f12a5cd5d88be5a6c3f48248d67fdd83824fc
Please inform the person helping you.
After waking up display:
chmod a+x /tmp/alsa-info.uqvEag8aoI #this command gives 'a'll users the additional '+' right to e'x'ecute that script
/tmp/alsa-info.uqvEag8aoI #executes the newly downloaded script
ALSA Information Script v 0.5.0
--------------------------------
This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.
dmesg
lspci
aplay
amixer
alsactl
rpm, dpkg
/proc/asound/
/sys/class/sound/
~/.asoundrc (etc.)
See '/tmp/alsa-info.uqvEag8aoI --help' for command line options.
/tmp/alsa-info.uqvEag8aoI: line 661: tree: command not found
/tmp/alsa-info.uqvEag8aoI: line 661: tree: command not found
/tmp/alsa-info.uqvEag8aoI: line 661: tree: command not found
dmesg: read kernel buffer failed: Operation not permitted
Automatically upload ALSA information to www.alsa-project.org? [y/N] : y
Uploading information to www.alsa-project.org ... Done!
Your ALSA information is located at http://alsa-project.org/db/?f=419bafa6feb831ae53d3c11bb604f75f84edd885
Please inform the person helping you.
OK, no differences found. (You didn’t change from headset to HDMI manually after coming back from sleep, and before providing the second output, did you???)
No i didn’t, before running the command the first time i had hdmi as sound output. Before running the command a second time the sound output was put back to hyperx automatically i didn’t touch anything.
Maybe it’s worth mentioning that i use a pc screen and a tv which i have configured to mirror each other. I did change the hdmi source on the tv to watch cable tv while waiting for the display to sleep.
Also before creating this topic i tried the solution in this post: (it didn’t work)
I added this to line #34
load-module module-switch-on-connect
This is what the last 3 lines look like in /etc/pulse/default.pa
### Make some devices default
set-default-sink alsa_output.pci-0000_08_00.1.hdmi-stereo
#set-default-source input
pacmd dump after waking up display: (tv was off when i woke my screen this time. I think it doesn’t make a difference because it always goes to hyperx-HS regardless of whether the tv is on or off when waking the display.
@fabby
This is a tricky one
The HDMI audio to the TV must be suspended or not available in some way when the screensaver is active, but no way to get terminal data to know exactly whilst the screensaver is active
@Nick1402
Try this first for working around the screensaver
In Xfce the screensaver can be disabled whilst watching TV
Left click the Power Manager icon in the panel and turn on Presentation Mode
The Presentation Mode orange indicator icon might need to be turned on in the Power Manager plugin settings
That will prevent the screensaver being activated and audio will continue to play to HDMI
But audio streams would still switch from HDMI when Presentation Mode is turned off
Try unloading the Pulseaudio module most likely to be causing this
pacmd unload-module module-suspend-on-idle
The module will only be unloaded temporarily. If it works Pulseaudio can be reconfigured to remove the module permanently
If it does not work, it will likely require changing ALSA configuration to disable power saving