Ginn is not suspend/resume safe

Bug #666749 reported by Christian Schürer-Waldheim
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
ginn
Triaged
Medium
Unassigned

Bug Description

I know that ginn is in early development but as I have the Apple magic trackpad I'm eager for ginn and try to help by testing it.

What I've observed is that ginn is not suspend/resume safe. The trackpad is connected via bluetooth and switches off/disconnects when I suspend the computer, so after a resume, the trackpad is not available. But ginn is trying to read/get data from it and consumes 100% of the cpu (core).

I did a strace on ginn and this is the output after resume (only the last few lines - the first line is the debug output of the last gesture event):

write(1, "\tattr touch 1 y=509.246765\n", 27 attr touch 1 y=509.246765
) = 27
read(3, 0xe9abb4, 4096) = -1 EAGAIN (Resource temporarily unavailable)
select(4, [3], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted)
select(4, [3], NULL, NULL, NULL) = 1 (in [3])
read(3, "\"\0\v\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\260yF\2\0\0\0\0", 4096) = 32

There is no further output after resume, even if I power on the device. It stops at the last read. Stracing a newly started ginn, the output is:

read(3, 0xa70bb4, 4096) = -1 EAGAIN (Resource temporarily unavailable)
select(4, [3], NULL, NULL, NULL) = 1 (in [3])
read(3, "#\236\v\0\23\0\0\0\0\0d\0\3\0\n\0\221\347{\3Z\1\0\0Z\1\0\0\243=@\0"..., 4096) = 108
write(1, "Gesture type 0 updated\n", 23Gesture type 0 updated
) = 23

I hope this info helps to make ginn aware of suspends - I guess it just has to stop the read operation and try it again.

Revision history for this message
Mohamed IKBEL Boulabiar (boulabiar) wrote :

Ginn is an application using geis. The problem seems to come from there (or maybe a lower layer).

Thanks a lot for reporting this bug !

affects: ginn → utouch-geis
Changed in utouch-geis:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
José Expósito (jose-exposito89) wrote :

Hi!

I had the same problem in Touchégg, but solve it is easy, only is necessary to suscribe to input devices with "geis_input_devices" and use a semaphore, adding 1 to it when a device is added and removed 1 from it when a device is removed.
Later, in the loop to get gestures only is neccesary wait if the semaphore is 0.

You can see the code here:
https://code.google.com/p/touchegg/source/browse/touchegg/src/touchegg/gestures/collector/GestureCollector.cpp

Anyway, if you need help, I can make a patch for ginn with this feature ;)
Greetings!

Revision history for this message
Linus Seelinger (s-linus) wrote :

On my Natty machine, this problem does not occur on sleep. However, after killing the X-server, it does. Can that also be solved?

Revision history for this message
Bijan Binaee (bijanbina) wrote :

it affect me too and i think it's not ginn bug

affects: utouch-geis → ginn
Revision history for this message
Dražen Lučanin (kermit666) wrote :

I've noticed it on my Macbook Pro on its internal trackpad. Once the computer wakes from sleep the ginn process goes wild and consumes 100% CPU. I have to kill it to quiet down the fan humming.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.