GNOME Bugzilla – Bug 667913
gcm-picker does not unlock sensor on error
Last modified: 2012-01-16 12:22:55 UTC
Created attachment 205262 [details] [review] Possible fix, probably needs some cleanup from someone with GNOME coding experience ;-) (Experienced with colorhug) Running gcm-picker from console with the sensor off-screen, I get (gcm-picker:4797): Gcm-WARNING **: failed to get sample: Failed to GetSample: GDBus.Error:org.freedesktop.ColorManager.Failed: failed to sample: Invalid read: retval=0x04 [Underflow of sensor] cmd=0x23 (expected 0x23 [take-reading-xyz]) len=2 (expected 14) which is fine since the sensor was off-screen. However, subsequent samples are not possible due to (gcm-picker:4797): Gcm-WARNING **: failed to lock: Failed to Lock: GDBus.Error:org.freedesktop.ColorManager.Failed: sensor is already locked because the device isn't unlocked after the error
Created attachment 205265 [details] [review] Improved patch
commit 09c5755ae05daf3e73290f2aaf29f7e718fd9885 Author: Richard Hughes <richard@hughsie.com> Date: Mon Jan 16 11:55:01 2012 +0000 Ensure the sensor is unlocked after failing to get a sample in gcm-picker The failure may be transitory, and if the sensor is left locked then the use has to restart the gcm-picker tool. This is based on a patch from Klaus Kaempf, many thanks. Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=667913