On Mon, 10 Jan 2005, Bastien Nocera wrote: > On Mon, 2005-01-10 at 02:30 +0200, Martin-�ric Racine wrote: > > There indeed is a bug and a concensus is raising among the Debian PPC > > community > > as to how the /dev/pmu handler should be recoded: > > > > 1) check if we are at least on NewWorld. If not, PMU is not there so we > > stop. > > > > 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, so we stop > > (checking for /dev/pmu doesn't help because the device is created by > > default on > > most distros and the presence of the device file says nothing about what the > > hardware really has). > > Read the damn code before talking like that:
[code fragment] > We only open the pmu if we're on a PowerBook. And I don't maintain acme > any more. If you have problems with the key shortcuts code in GNOME 2.8, > let me know, then I can do something. I'm indeed talking about the ACME code integrated in control-center. Note that most of the problem appears to be caused by incorrect detection of a PowerBook in your original code, which the Debian maintainer tried to replace with more generic code to detect a NewWorld Mac, while adding code to generate error popups in GNOME at the same time. Extremely annoying for the user and not your fault; this is definitely a mistake from Debian maintainers. In a way, I'm starting to think that your original code made more sense than Debian's dirty attempt at trying to make the error disappear on OldWorld by shifting the problem to NewWorld hardware owners. However, I still beleive that ACME code needlessly duplicates pbbuttonsd functions, while adding the irritant of having to access PMU with user permissions, which is an extremely bad idea, from a security point of view. Instead, your code to use ALSA or Gstreamer to control the Volume should be added to pbbuttons or pmud. See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=281952 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=284328 (they are essentially duplicate bugs) In the long run, though, this begs for a more portable solution. While the PPC universe has pmud and pbbuttonsd, the i386 universe has packages that mostly do the same thing for e.g. IBM ThinkPad models. I think that a generic interface should exist at the kernel level, to control display-related functions like LCD brightness, built-in monitor's alignment and contrast (e.g. vintage iMac), etc. that could be controlled by a cross-platform daemon similar to what pbbuttonsd does. I am indeed talking about a system-wide daemon, rather than a GNOME application. The rationale is that whoever is sitting in front of the hardware ought to be allowed to adjust things like speaker volume and monitor settings without any permission backflips. Running a daemon like pbbuttonsd provides sufficient priviledge separation to keep it safe and does not require changing permissions at every GNOME sessions startup, so it makes more sense. -- Martin-�ric Racine, ICT Consultant http://www.iki.fi/q-funk/

