Issue in gsd-media-keys when using power standby button of usb device ...


I'm using a usb keyboard (microsoft wireless) and a usb remote control
for controlling my home cinema device (earlier a lenovo notebook, now a
minnow board max). The device is put into S3 (suspend to ram) when it is
not used. I can wake it up again by pressing the suspend button of the
keyboard again. However, in most of the times, the system goes back into
suspend directly again. I've to repeat this some more times until the
device suddenly stays active.

I debugged down the issue a bit more by enabling the verbose mode of
gsd-media-keys. It looks as if the gsd-media-keys process is detecting
the press of the suspend key which has been used to wake up the system
and with it he is putting the system back to standby again. Following
line in the logs points me to this assumption:

Nov 20 21:07:18 wohnzimmer gsd-media-keys[1482]: Received accel id 114
(device-id: 3, timestamp: 241835, mode: 0x1

I see this log line twice. Once when I put the system into standby and a
second log when I activated it back with the key.

-> Is this issue known to someone?
-> Can someone confirm to see this issue as well? Should be reproducable
with any usb keyboard with a standby key.

If yes. What would be a good solution to overcome this issue?

I'd suggest the following. Since gsd-media-keys is already connecting
with systemd-logind, it's easy to register for signals for standby and
reactivation. One could implement a sort of "Ignore standby keys 1s
after wakeup" logic.

What do you think? Other ideas?

I'd provide a patch once it is clear that the issue is actually an issue
and we agree on an appropriate solution.

Thx in advance.

Marko Hoyer

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]