Bug 350622

Summary: Laptop goes to sleep while there is MIDI input
Product: [Frameworks and Libraries] frameworks-kidletime Reporter: Kelytha <kelytharun>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: kde, mgraesslin
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Kelytha 2015-07-25 23:12:17 UTC
As simple as description says. Typing on the keyboard or moving the mouse keep the computer awake, but MIDI input doesn't.

Reproducible: Always

Steps to Reproduce:
1. Disconnect your laptop's charger
2. Connect a MIDI controller and start a software synth (like LMMS)
3. Enjoy playing some music

Actual Results:  
After some time the laptop goes down to sleep.

Expected Results:  
MIDI input should be treated like any other kind of input and prevent the computer from sleeping.
Comment 1 Christoph Feck 2015-08-01 19:28:56 UTC
Is MIDI input routed through X11? I doubt it.
Comment 2 Kelytha 2015-08-01 19:34:50 UTC
(In reply to Christoph Feck from comment #1)
> Is MIDI input routed through X11? I doubt it.

It is routed through ALSA or JACK. As I have looked through the code of KIdleTime this does seem to be notoriously difficult to implement. TBH I am not even sure if it is possible at all, especially without adding extra latency to the MIDI stack.
Comment 3 Kai Uwe Broulik 2015-08-01 19:46:59 UTC
So it seems the only viable solution is to have your application post a powermanagement inhibition so the screen does not turn off.
Comment 4 Martin Flöser 2016-06-21 16:54:27 UTC
Midi-input sounds as out-of-scope for kidletime. This is something which either should run as a daemon process or - in case of a GUI application - to use the inhibition frameworks.