Power management in 2.6 and ACPI - are the pm_registered functions used?
ezra peisach <[email protected]> Wed, 14 Jan 2004 10:59:51 -0500 (EST)
| Newsgroups | gmane.linux.power-management.devel |
|---|---|
| Message-ID | <[email protected]> |
Here is the problem: When using ACPI - if I go to S1/S3 on an inspiron
8200, on power restore, the vga console is garbage - unless X is
running and a console switch usually solves the problem. This is suboptimal.
I have ascertained that upon restoration of power, the console backlight is
disabled - which is one of the problems - but I suspect that the vga console
can get into a weird state in low power mode which needs to be restored.
The more underlying problem stems from how power management is handled:
Under apm the pm_send_all is invoked to notify devices and then the device
power handling is invoked, with ACPI, the pm_regsitered interface is ignored.
Would it make sense for drivers/video/console/vgacon.c to register
itself as a device? Then it could handle power requests directly and
the pm_send_all could be ignored. Or is the first solution for
pm_send_all be added to kernel/power/main.c.
It is entertaining in that the vga console is sort of on a bus - the
pci bus on one machine - but may be on a baseboad... Does one try to
pci_register_driver? Does one create a system class? Interesting dilemma.
Any thoughts?
Ezra
-----------------------------------------------------------------------
The following described the code paths involved:
With apm - on a 386, arch/i386/kernel/apm.c: in suspend(), the
following logic exists:
if (pm_send_all(PM_SUSPEND, (void *)3)) {
/* Vetoed */
....
device_suspend(3);
--------------------------------------------------
In ACPI: drivers/acpi/sleep/main.c: acpi_suspend()
This invokes pm_suspend
... In kernel/power/main.c: pm_suspend invokes enter_state(), suspend_prepare(), which then invokes device_suspend().
--------------------------------------------------------
In the sysfs interface: enter_state is used...
---------------------------------------------------
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html