Hi everyone,
I have an external monitor connected via HDMI which has better sounding speakers than the internal ones. Sometimes I leave the machine idle while keep playing audio on it, but shortly after the lock screen kicks the external monitor is turned off (power saving I guess) and the audio switches back to the internal speakers. I use Fedora Workstation 31, Gnome 3.34.1, PulseAudio 13.0, Kernel 5.3.11.
Does anyone know about a way to prevent turning off the external monitor when audio is being played through the HDMI port? I would still like to have the lock screen, even blanking it, but without turning it off and keep using the external monitor speakers. Currently I use Spotify from Flathub for playing music and when I make a break and leave the music on, after few minutes it switches back to the internal speakers, that have worse quality especially if I am away from the machine.
I have seen this same question raised in other forums [1][2][3], but couldn't see solutions, so wanted to try to ask here in case anyone knows a way to deal with this.
[1] https://askubuntu.com/questions/1165801/dpms-and-hdmi-audio [2] https://trac.videolan.org/vlc/ticket/10865 [3] https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/451
Thanks, Robert
On Sat, 23 Nov 2019 14:03:45 -0000 "Robert Mihaly" rob@mihalyr.com wrote:
Hi everyone,
I have an external monitor connected via HDMI which has better sounding speakers than the internal ones. Sometimes I leave the machine idle while keep playing audio on it, but shortly after the lock screen kicks the external monitor is turned off (power saving I guess) and the audio switches back to the internal speakers. I use Fedora Workstation 31, Gnome 3.34.1, PulseAudio 13.0, Kernel 5.3.11.
Does anyone know about a way to prevent turning off the external monitor when audio is being played through the HDMI port? I would still like to have the lock screen, even blanking it, but without turning it off and keep using the external monitor speakers. Currently I use Spotify from Flathub for playing music and when I make a break and leave the music on, after few minutes it switches back to the internal speakers, that have worse quality especially if I am away from the machine.
I notice in the screensaver preferences, the advanced tab, that a timeout can be set for turning off the power to the device. Perhaps you could use that? I haven't tried this, so don't know if it will work.
On Sat, 2019-11-23 at 08:00 -0700, stan via users wrote:
I notice in the screensaver preferences, the advanced tab, that a timeout can be set for turning off the power to the device. Perhaps you could use that? I haven't tried this, so don't know if it will work.
I think you mean this setting:
$ gsettings describe org.gnome.desktop.session idle-delay The number of seconds of inactivity before the session is considered idle.
Yeah, I guess I could use that to disable the screen saver, but was thinking about something that would work automatically and inhibit it only when the music is playing through HDMI for example.
I have this functionality with video players, e.g. Totem would prevent turning off the monitor when I play a video on it. I am looking for this functionality for music players and wondering if Spotify has a way to do this.
- Robert
On Sat, 23 Nov 2019 16:40:48 +0100 Robert Mihaly rob@mihalyr.com wrote:
I think you mean this setting:
$ gsettings describe org.gnome.desktop.session idle-delay The number of seconds of inactivity before the session is considered idle.
Yeah, I guess I could use that to disable the screen saver, but was thinking about something that would work automatically and inhibit it only when the music is playing through HDMI for example.
No, I meant the setting in the screensaver itself. It separates into three timers under 'Display Power Management': Standby after xxx minutes Suspend after xxx minutes Off after xxx minutes
But, I see now that it is Xscreensaver, and in Gnome you will be using Wayland. Also, it doesn't meet your requirement that it happen only when the display is being used. So, it wouldn't meet your needs, and, as Rex said, you need to somehow gain that ability for your application.
On Sat, 2019-11-23 at 12:39 -0700, stan via users wrote:
No, I meant the setting in the screensaver itself. It separates into three timers under 'Display Power Management': Standby after xxx minutes Suspend after xxx minutes Off after xxx minutes
But, I see now that it is Xscreensaver, and in Gnome you will be using Wayland. Also, it doesn't meet your requirement that it happen only when the display is being used. So, it wouldn't meet your needs, and, as Rex said, you need to somehow gain that ability for your application.
Ah right, I see what you mean. My confusion came from that I don't use a separate screensaver just GDM/Gnome shell and don't have those options directly. I don't use Wayland because of NVIDIA optimus and stuff, but it might not be relevant here anyway.
Yes, I agree about the application support, I reached out to Spotify about this question, but would be great if someone could point me to some API other apps like Totem use to suspend power management when something is playing.
Thanks, Robert
Robert Mihaly wrote:
Hi everyone,
I have an external monitor connected via HDMI which has better sounding speakers than the internal ones. Sometimes I leave the machine idle while keep playing audio on it, but shortly after the lock screen kicks the external monitor is turned off (power saving I guess) and the audio switches back to the internal speakers. I use Fedora Workstation 31, Gnome 3.34.1, PulseAudio 13.0, Kernel 5.3.11.
Does anyone know about a way to prevent turning off the external monitor when audio is being played through the HDMI port?
Yes, there's a well-known API to inhibit power-management for media players.
What application are you using to play audio?
For example, I know that vlc supports the api for when video is playing, but apparently not for audio-only unfortunately. Reference: https://forum.videolan.org/viewtopic.php?t=144664
-- Rex
On Sat, 2019-11-23 at 09:26 -0600, Rex Dieter wrote:
What application are you using to play audio?
I am using Spotify from Flathub, couldn't find anything in the application settings. Is there perhaps another spotify client that supports the inhibit power-management functionality? Or do other music players like Rhythmbox support this?
I'll try to ask over at Spotify as well. Is this[1] the API you mentioned?
[1]: https://www.freedesktop.org/wiki/Software/systemd/inhibit/