[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1414424673.30379.58.camel@hadess.net>
Date: Mon, 27 Oct 2014 16:44:33 +0100
From: Bastien Nocera <hadess@...ess.net>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: John Stultz <john.stultz@...aro.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: A desktop environment[1] kernel wishlist
On Mon, 2014-10-27 at 16:31 +0100, Geert Uytterhoeven wrote:
> Hi Bastien,
>
> On Mon, Oct 27, 2014 at 3:20 PM, Bastien Nocera <hadess@...ess.net> wrote:
> > On Tue, 2014-10-21 at 20:24 +0200, Geert Uytterhoeven wrote:
> >> On Tue, Oct 21, 2014 at 7:14 PM, Bastien Nocera <hadess@...ess.net> wrote:
> >> >> As for: 'Export of "wake reason" when the system wakes up (rtc alarm,
> >> >> lid open, etc.) and wakealarm (/sys/class/rtc/foo/wakealarm)
> >> >> documentation'
> >> >>
> >> >> Can you expand more on the rational for the need here? Is this for UI
> >> >> for power debugging, or something else?
> >> >
> >> > No, it would be used for automating backups, or implementing
> >> > suspend->hibernation transitions. For example, right before the machine
> >> > suspends, I would schedule it to wake up in a hour. If I get woken up by
> >> > the rtc alarm (and not by the user through a lid open), I might:
> >> > - check that I'm plugged into the AC, it's night, and in the vicinity of
> >> > the server that handles my backups and so backup the system.
> >> > - check whether the battery is low, and hibernate the machine (if it
> >> > supports it, obviously).
> >>
> >> Isn't this already available through /sys/kernel/debug/wakeup_sources
> >> and/or the various power/wake* files in sysfs?
> >
> > That might very well be, but /sys/kernel/debug/wakeup_sources really
> > isn't much of a user-space API. Where's the documentation for the
> > various power/wake* files?
>
> The debugfs entry is indeed not documented.
> Documentation for the others is just a git grep away:
Fair enough, but apart from tallying up wakeup_count by hand, I'm not
sure how I'm supposed to interface with that.
It also doesn't fix the problem of knowing which event caused a wakeup
(or when the last event occurred on a particular device) when this
device can have multiple different reasons to wake up (see the
WOL/connected suspend mentions earlier in the thread).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists