This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Can power saving be suspended when playing Youtube videos?

Tags: None
(comma "," separated)
User avatar
MirceaKitsune
Registered Member
Posts
330
Karma
0
OS
Now that Youtube allows videos longer than 10 minutes, I've been noticing a slight annoyance: KDE doesn't detect that I'm watching a video and prevent turning off the monitor or locking the screen. If I watch a long video, I must to remember to move the mouse every 5-10 minutes, otherwise the monitor goes into standby mode. Although if I watch long films in Kaffeine, KDE appears to know and not do this.

Is there a list of processes which KDE can disable energy saving for, and a way to add flash player to it? If not, is there another way to make Youtube videos pause power management while playing?
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
I don't know details, but it's probably not trivial. Flash player is used on a variety of websites for a variety of nonsensical things, for example "Copy to clipboard" buttons, displaying images, ...
So if you make KDE not turn the monitor blank when flash player is running (which is doable, I guess) you would probably end up disabling blanking most of the time your web browser is running.

A fancy way to detect if a youtube video is playing would possibly be to write something which detects whether flash is using more than x% CPU for some time (which it should not do for what most other websites do with it, just for playing videos). That might work.

Probably your better bet right now is just clicking the "Disable power management" box from this power management tray icon when you watch videos.
Maybe you can do better if you use HTML5 video, or maybe you can also do something when you use fullscreen mode. At least in the latter case we might be able to find a relatively easy way to do what you want, I think I've seen things like that somewhere in KDE. If you're interested I can look.

Greetings,
Sven


I'm working on the KDevelop IDE.
User avatar
MirceaKitsune
Registered Member
Posts
330
Karma
0
OS
I'm not sure if I got to test this by the time I still had Windows. But IIRC Windows knew not to turn off the monitor when watching videos on Youtube. On the other hand, I can imagine it's probably hard for KDE to detect when a Youtube video is playing. Detecting % used of CPU would be very unreliable IMO, so not really. But if you can look into it, that would be appreciated.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Do you play windows in fullscreen or windowed? If you use fullscreen it might be possible to just turn power management off when an application is in fullscreen... otherwise things become more difficult.


I'm working on the KDevelop IDE.
User avatar
toad
Global Moderator
Posts
1258
Karma
7
OS
I've been following this thread.

On scummons' last post I checked power management in systemsettings but did not find an option for full screen. Cue special application settings but no joy there either. Hm, so how do I do it?

An alternative: one could have a different activity for watching movies. It'd only be one click away rather than five.


Debian testing
User avatar
MirceaKitsune
Registered Member
Posts
330
Karma
0
OS
No, not fullscreen. I always watch Youtube in windowed mode (large window).
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
toad wrote:On scummons' last post I checked power management in systemsettings but did not find an option for full screen. Cue special application settings but no joy there either. Hm, so how do I do it?

No, unfortunately it doesn't exist as I found out, I remembered there was something but apparently I was wrong :(
I guess one could write a two-line kwin script, though, that option always exists. For windowed that doesn't work, of course.

Right now I just see the "does flash use more than x% CPU" script, which is quite easy to do I'd say. If you want it, I guess I could write it for you ;)


I'm working on the KDevelop IDE.
User avatar
google01103
Manager
Posts
6668
Karma
25
Google for wigglemouse, it will wiggle the mouse for you automatically every 10 minutes or whatever time frame you select


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
How does that help in this situation?


I'm working on the KDevelop IDE.
User avatar
google01103
Manager
Posts
6668
Karma
25
scummos - it moves (wiggles) the mouse which keeps power management from putting the monitor into standby mode


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Yes, but if you just want to prevent that you can just turn off power management. There's even a dbus call for that. The problem is doing this automatically when a youtube video is playing.

Cheers,
Sven


I'm working on the KDevelop IDE.
ellisthomas86
Registered Member
Posts
1
Karma
0
Practically its is not possible.
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
I use "caffeine", which is similar to wigglemouse (without actually wiggling the mouse). You can set it to automatically activate when certain processes are active, and I have it set for (e.g.) make, rsync, backintime, abcde, and dispcal. It supposedly has a feature to prevent the screensaver from activating when flash videos are playing, although I've never used that feature, so I'm not sure how well it works.
User avatar
google01103
Manager
Posts
6668
Karma
25
sparhawk wrote:I use "caffeine", which is similar to wigglemouse (without actually wiggling the mouse). <snip>.

nice app but the flash option did not work for me in my testing, tested with youtube running in Opera and FF. Google'ing brings up multiple results confirming this issue with Youtube. Did not test other flash sites.


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
google01103 wrote:the flash option did not work for me in my testing


Ah okay. Sorry for the red herring. I should have tested it myself, as caffeine does provide nice visual feedback on when it's active.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar