Summary: | PulseAudio should deal with display DPMS when playing audio on HDMI devices | ||
---|---|---|---|
Product: | PulseAudio | Reporter: | Rudd-O <rudd-o+freedesktop> |
Component: | modules | Assignee: | pulseaudio-bugs |
Status: | RESOLVED MOVED | QA Contact: | pulseaudio-bugs |
Severity: | enhancement | ||
Priority: | medium | CC: | benjamin, bugzilla, chewi, lennart, rudd-o+freedesktop |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux (All) | ||
URL: | https://bugzilla.gnome.org/show_bug.cgi?id=753429 | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Proof of concept to track the state in PA, signalling to DE is missing
Identical module as patch including other changes |
Description
Rudd-O
2016-09-19 17:43:36 UTC
Can you give a pointer to an API that is used to inhibit display power-saving? > Remaining questions to be tackled: > > a. Do we need to inform the user that the screen saver is blocked while > sound is playing back? If so, how? This is a question for desktop environment designers. PulseAudio itself can't really show any notifications. > b. Do we provide a mechanism to turn the policy off / on? If so, how? (In > paprefs? / As a module option?) paprefs could maybe do it. paprefs uses gconf for storing its settings, however, which has serious problems, which is why I don't really like adding more stuff under the control of paprefs. If a GUI toggle is needed, I think it would be better if the module provided an API through the native protocol. paprefs could still be the program to implement the GUI (I think pavucontrol would be fine too), but if the toggle was available in the native protocol, using gconf for this could be avoided. > c. Do we load this proposed policy module by default? In many (if not most) > use cases, it seems that this should in fact be the default. Enabling by default seems sensible to me. (To be clear, I'm not volunteering to implement this any time soon. I just wanted to comment.) qdbus org.freedesktop.ScreenSaver /ScreenSaver method uint org.freedesktop.ScreenSaver.Inhibit(string application_name, string reason_for_inhibit) The companion method is the UnInhibit() method. Someone else will need to confirm that these are present in GNOME's screensaver, but even if they aren't, that's still a starting point, and GNOME can gain it later (remember I said if the APIs are not supported, the module would be a no-op). GNOME has an upstream bug. So the thing here is that ideally we don't inhibit the lock screen from happening but just prevent the monitors from being turned on through DPMS. As a start I have created a small PA module which can make the decision (attaching) and am planning to look into how to hook that up on the desktop side next. There are different options for this, but ideally the solution is desktop environment agnostic so anything that directly pushes the information to mutter or g-s-d might be a bit odd. Created attachment 132341 [details] [review] Proof of concept to track the state in PA, signalling to DE is missing Proof of concept of how it could be implemented in PA. The whole protocol with the DE to actually prevent the DPMS off state is still missing. The information is only logged. Thanks for working on this! I had a look at the code. I didn't see any big problems, but I have a question: why do you read the "prevent dpms off" bit from a proplist? Do you plan to set the property from some other module? If so, why? Created attachment 136571 [details] [review] Identical module as patch including other changes Hrm, I completely forgot about this again and didn't even realise there was reply :) Using a property seemed like an easy way to tag all the relevant sinks as there are already configurations and e.g. the device.icon_name property (which is set to "video-display" in this case). Don't have a strong opinion on how to detect the case. Note that one could even go further than this an e.g. figure out the relevant DRM device for the monitor so that only that monitor will be kept on. Can you send the patch to pulseaudio-discuss@lists.freedesktop.org? That will give it more visibility and make it tracked by patchwork, so it won't get forgotten. Posting to pulseaudio-discuss requires subscription, here's the listinfo page: https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/451. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.