automatic standby after idle timeout
freebsd-questions-local at be-well.no-ip.com
Thu Mar 27 02:45:16 PST 2003
Lowell Gilbert <freebsd-questions-local at be-well.no-ip.com> writes:
> mike mcgranahan <mike_mcgranahan at yahoo.com> writes:
> > thank you for your reply. correct me if i'm wrong, but
> > apmd only responds to apm signals sent to it, either
> > by the user or by the machine hardware (lid closing or
> > opening).
> That looks correct. It should be possible to hack a screensaver to
> send such an event; if my kid gives me enough time this week, I'll
> take a crack at it.
It definitely works; replacing the apm_display() call in apm_saver()
in src/sys/modules/syscons/apm/apm_saver.c with:
will suspend the system when the screen saver kicks in. It won't work
in X, though, because the screensaver gets disabled by the video card
change to graphics mode. So it's only a hack, but I'll still probably
try wrapping it in a sysctl and submitting it as a PR.
I'll have to figure out more of the implementation of the saver-module
infrastructure to do this properly; any hints would be appreciated.
[It's not that this really *should* be connected to screen savers,
just that detecting inactivity is the part that I don't have a good
way to do independently.]
More information about the freebsd-questions