Bug#284328: retitling duplicate bugs
Martin-Éric Racine
Martin-Éric Racine ,
284328@bugs.debian.org
Mon, 10 Jan 2005 13:56:29 +0200 (EET)
retitle 281952 control-center: acme: excessive /dev/pmu popups (1)
retitle 284328 control-center: acme: excessive /dev/pmu popups (2)
thanks
*****
Information about what /dev/pmu is and what PowerPC hardware provides it appears
in the kernel documentation, specifically:
config ADB_PMU
bool "Support for PMU based PowerMacs"
depends on PPC_PMAC
help
On PowerBooks, iBooks, and recent iMacs and Power Macintoshes, the
PMU is an embedded microprocessor whose primary function is to
control system power, and battery charging on the portable models.
The PMU also controls the ADB (Apple Desktop Bus) which connects to
the keyboard and mouse on some machines, as well as the non-volatile
RAM and the RTC (real time clock) chip. Say Y to enable support for
this device; you should do so if your machine is one of those
mentioned above.
config PMAC_PBOOK
bool "Power management support for PowerBooks"
depends on ADB_PMU
---help---
This provides support for putting a PowerBook to sleep; it also
enables media bay support. Power management works on the
PB2400/3400/3500, Wallstreet, Lombard, and Bronze PowerBook G3 and
the Titanium Powerbook G4, as well as the iBooks. You should get
the power management daemon, pmud, to make it work and you must have
the /dev/pmu device (see the pmud README).
Get pmud from <ftp://ftp.samba.org/pub/ppclinux/pmud/>.
If you have a PowerBook, you should say Y here.
*****
Additionally, one notices that not all NewWorld hardware provides PMU:
*****
config ADB_CUDA
bool "Support for CUDA based Macs and PowerMacs"
depends on (ADB || PPC_PMAC) && !PPC_PMAC64
help
This provides support for CUDA based Macintosh and Power Macintosh
systems. This includes many m68k based Macs (Color Classic, Mac TV,
Performa 475, Performa 520, Performa 550, Performa 575,
Performa 588, Quadra 605, Quadra 630, Quadra/Centris 660AV, and
Quadra 840AV), most OldWorld PowerMacs, the first generation iMacs,
the Blue&White G3 and the "Yikes" G4 (PCI Graphics). All later
models should use CONFIG_ADB_PMU instead. It is safe to say Y here
even if your machine doesn't have a CUDA.
*****
Essentially, all Apple laptops and all post-G3 desktops (except for the "Yikes"
G4) provide PMU, while early-G3 and OldWorld hardware provides CUDA instead.
*****
There are three solutions to this problem, one simple kludge, one more elaborate
klude and one clean final resolution:
*****
1. quick and dirty annoyance cleanup
A quick and dirty fix would be to remove the code that generates the error
popops. The rationale is, the user won't know what causes them or what to do to
fix things, so let's not annoy him needlessly.
Basically, we let ACME wonder why it cannot access the LCD brightness control
and leave it at that.
*****
2. ACME code cleanup
The proper solution for the code cleanup would be to perform the following
checks:
1) check if we are at least on NewWorld. If not, PMU is not there and that's
not an error.
2) if it indeed is NewWorld, check if we have /proc/device-tree/aliases/via-pmu
and if we don't, then this is an early G3 without PMU support, which is not an
error. We exit gracefully and disable LCD support in our code.
3) if we passed both 1 and 2, let's access PMU via the 'pmud' daemon. We should
never access devices directly for security reasons (hence current code is bad).
*****
3. Removing ACME completely and instead "Recommends: pmud | pbbuttonsd"
ACME codes shows that it's essentially a needless fork off pbbuttonsd, with the
added irritant of having to fiddle with user permissions (which is not necessary
with pbbuttonsd since it's a daemon).
The only tiny advantage that ACME has over pmud | pbbuttonsd is that it can use
ALSA | OSS | Gstreamer as alternative means of controling the audio volume.
IMHO, it would be more practical to completely get rid of ACME and to instead
port its extensive audio control options into pmud | pbbuttonsd.
*****
Recommended strategy for Sarge: 1. quick and dirty fix.
Recommended strategy for Etch: 3. purge ACME and improve pbbuttonsd.
--
Martin-Éric Racine, ICT Consultant
http://www.iki.fi/q-funk/