Summary: | immediately suspends on startup when lid is closed | ||
---|---|---|---|
Product: | upower | Reporter: | Martin Pitt <martin.pitt> |
Component: | general | Assignee: | Richard Hughes <richard> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | lool |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
URL: | https://launchpad.net/bugs/385135 | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
suppress initial change event
git formatted patch of the above Add a notify flag to set_lid_is_closed and use it only on input cold plug git format patch of notify flag addition log of dkp --verbose exposing the issue (before patch) log of dkp --verbose once fixed (with the patch) |
Description
Martin Pitt
2009-07-01 01:28:01 UTC
Created attachment 27290 [details] [review] suppress initial change event What do you think about this patch? It works for me. (In reply to comment #1) > What do you think about this patch? It works for me. Yup, please apply. Looks fine to me. > Yup, please apply. Looks fine to me.
Was that for me? (-EPERM)
(In reply to comment #3) > Was that for me? (-EPERM) Sure. If you want commit then open bug in fd.o, cc me, and I'll give my approval. Are you sure that you've not got commit? -- I seem to remember that you have commit on HAL, and the group list is the same as that IIRC. If you can't be arsed, say so and I'll commit on your behalf :-) Yes, I already tried that a while ago: $ ls -ld /git/DeviceKit/DeviceKit-power.git/ drwxrwsr-x 7 david devicekit 4096 2008-08-01 03:12 /git/DeviceKit/DeviceKit-power.git/ $ groups freedesktop hal So it's a different group. I requested upload privs in bug 22578. Thanks! Created attachment 27294 [details] [review] git formatted patch of the above For your convenience. :-) (In reply to comment #6) > Created an attachment (id=27294) [details] > git formatted patch of the above Committed. Thanks dude. Hi folks This breaks the first suspend resume for me when I close the lid. What happens is that: 1. on startup dkp assumes lid is closed 2. on input coldplug it detects lid as truly closed; this doesn't set initialized though 3. on the first lid event (lid close to suspend in my case) the event is swallowed because of this patch I could offer a fix to set initialized in case 2. as well, but I don't like the general approach very much. Instead I'd like to offer a different approach which is to add a flag to set_lid_is_closed to disable notifications and use that only on input coldplug. Created attachment 27417 [details] [review] Add a notify flag to set_lid_is_closed and use it only on input cold plug Created attachment 27418 [details] [review] git format patch of notify flag addition Created attachment 27419 [details]
log of dkp --verbose exposing the issue (before patch)
Created attachment 27420 [details]
log of dkp --verbose once fixed (with the patch)
Thanks, Loic. I like this approach better. I tried to apply it to 009, but unfortunately I can't really test it since g-p-m bails out with $ gnome-power-manager --debug (gnome-power-manager:4054): devkit-power-gobject-WARNING **: unhandled property 'recall-vendor' ** devkit-power-gobject:ERROR:dkp-device.c:193:dkp_device_collect_props_cb: code should not be reached Aborted (core dumped) I'll investigate this, and report back about this patch later here. (In reply to comment #13) > Thanks, Loic. I like this approach better. I tried to apply it to 009, but > unfortunately I can't really test it since g-p-m bails out with You need to grab a patch for gnome-power-manager: commit 655dc92e5b2259d008021d5258e77b00e3d5bfad Author: Richard Hughes <richard@hughsie.com> Date: Fri Jul 3 10:11:09 2009 +0100 Be less asserty if newer enums get added to DeviceKit-power If you're using a new DKP with an old g-p-m. (In reply to comment #10) > Created an attachment (id=27418) [details] > git format patch of notify flag addition I've applied this, thanks. Richard. Ah, apparently 009 broke ABI without bumping shlibs. A mere g-p-m rebuild was enough. I tested the patch now and confirm that it works just fine in both cases (lid closed in docking, and lid open/first suspend). Thanks! |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.