Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Aug 1999 15:33:45 -0500 (CDT)
From:      Jonathan Lemon <jlemon@americantv.com>
To:        plm@xs4all.nl, current@freebsd.org
Subject:   Re: recent apm changes
Message-ID:  <199908052033.PAA16082@free.pcs>
In-Reply-To: <local.mail.freebsd-current/87n1w6hk62.fsf@muon.xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <local.mail.freebsd-current/87n1w6hk62.fsf@muon.xs4all.nl> you write:
>In FreeBSD, when I activate suspend mode, I see the light on my
>computer blinking, indicating it has gone into suspend mode, but still
>there is no reduction in noise whatsoever. The disks keep spinning,
>the CPU fan (or whatever) too. I could activate the BIOS spindown
>timer on the HDD's, but I'd rather not (since then I also get
>spindowns while I'm normally working with the computer) but still the
>other fan will always continue to run.
>
>What can I do to change this behaviour? Can anyone explain what Linux
>(or Win95 for that matter) are doing to make it 100% quiet in suspend
>mode? Then I could give it a try to have FreeBSD do the
>same. Currently this prevents me from using FreeBSD alas.

FreeBSD's APM suspend works by sending the BIOS a suspend event
for all BIOS managed devices, and the BIOS is supposed to put
all devices under it's control into the "low-power suspend" state.

I'd guess that this isn't the same as "off".  You can't tell the 
BIOS to turn off all devices, you need to specify which devices
to turn off.

You could play around with adding something like this to 
apm_suspend_system (for your hdd:):

        sc->bios.r.eax = (APM_BIOS << 8) | APM_SETPWSTATE;
        sc->bios.r.ebx = 0x02ff;
        sc->bios.r.ecx = state ? PMST_APMENABLED : PMST_OFF;
        sc->bios.r.edx = 0;
 
        if (apm_bioscall())
                printf("Failed to turn off HDD: errcode = %d\n",
                       0xff & (sc->bios.r.eax >> 8));

Of course, you'd probably also need a corresponding "turn on", call
somewhere.  As for your fan, I'm not sure what the deviceid for the
fan would be, the "0x02ff" above means "all 2ndary storage devices".
Perhaps "0x80FF", for all OEM devices.

At the moment, there isn't the ability to control individual devices,
but at some point, I can see this being added to the new-bus architecture;
each device can register callbacks for various power management events.
--
Jonathan


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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