tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Some powerd(8) defaults



On Fri, May 06, 2011 at 02:38:51PM +0300, Jukka Ruohonen wrote:
>   1. Provide a generic "sleep" script and link the current "sleep_button"
>      and "lid_switch" to it appropriately. This means that the default action
>      upon closing the laptop lid changes to "suspend". By default, we already
>      resume (in-kernel) automatically when the lid is opened.

I'd prefer if there was a simple configuration file (e.g. sourced by the
scripts) to control this without having to modify the scripts. With
that, it would actually be a sane idea to move the scripts to /libexec.

>   2. By default, stop/start the cron(8) deamon upon changes in the AC adapter.
>      This behavior is already in the script, but it was commented out.

Don't, please. Consider an option for cron to be stop logging. The
supposed power drain depends on too many other factors to justify
the POLA violation.

>   3. New laptops are notoriously bad at thermal management. Currently NetBSD
>      lacks a well-defined thermal management interface, but the least we could
>      do is to gracefully shutdown the system when "sensor_temperature" is
>      called with "critical" or "critical-over" events. This has saved my
>      ThinkPad many times from the CPU's forceful shutdown detector.

Fine with me.

>   4. Before the "low-power" event is called in "sensor_battery", use wall(1)
>      to display a warning during the earlier event. This was requested by
>      jakllsch@ and jmcneill@.

It would be preferable here to add support for cancelling a shutdown.
That way "shutdown -p now" could be replaced with "shutdown -p +1" and
adds some useful independent feature...

>   5. Even though NetBSD also lacks an uniform interface to control the
>      display brightness levels, use the acpivga(4)'s sysctls (and possibly
>      other MD sysctls) to set the brightness to, say, 75 % when the AC
>      adapter is disconnected, and set it back to 100 % when the power cord
>      is again plugged.

No opinion on this, but I have hardware that already does it...

Joerg


Home | Main Index | Thread Index | Old Index