Skip site navigation (1)Skip section navigation (2)
Date:      26 Mar 2003 21:45:12 -0500
From:      Lowell Gilbert <freebsd-questions-local@be-well.no-ip.com>
To:        mikemcg@ucla.edu
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: automatic standby after idle timeout
Message-ID:  <44wuilsf2f.fsf@be-well.ilk.org>
In-Reply-To: <44isu88kr6.fsf@be-well.ilk.org>
References:  <20030323091358.32327.qmail@web13803.mail.yahoo.com> <44isu88kr6.fsf@be-well.ilk.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Lowell Gilbert <freebsd-questions-local@be-well.no-ip.com> writes:

> mike mcgranahan <mike_mcgranahan@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:
        if (blank)
		apm_suspend(PMST_SUSPEND);
        sc_touch_scrn_saver();
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.]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44wuilsf2f.fsf>