tech-userlevel archive

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

Re: Some powerd(8) defaults



On Fri, 6 May 2011 14:38:51 +0300
Jukka Ruohonen <jruohonen%iki.fi@localhost> wrote:

Sorry for posting quite late about this, I have some accumulated mail
I'm now catching up with;

>   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 agree

>   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.

My opinion here is that cron(8) should always run

>   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.

Makes sense to 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@.

No objection, SIGPWD should probably still be issued as per Bellovin's
suggestion; I'm not sure if the kernel should take care of this, the
general shutdown scripts or powerd scripts.

>   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.

I have a question relating to this: would this leave as-is any current
user setting?  I would not care if 25% dimming could automatically
occur (optionally, of course) on low battery or non-AC situation, but
would expect that to be 25% of the current setting, rather than 75% of
the total brightness possible.  Replugging the cord would restore it to
the previous setting rather than at 100% brightness.

Thanks,
-- 
Matt


Home | Main Index | Thread Index | Old Index