"Permissions on the file /dev/pmu are broken" on login

Bug #7716 reported by Martin Pitt
22
Affects Status Importance Assigned to Milestone
control-center (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

I always get a small dialog box saying

  Wrong permission for '/dev/pmu' device

after logging into GNOME.

http://bugs.debian.org/259945 may be related to this; I think that the device
permissions are correct, but user programs should not access it.

http://bugzilla.gnome.org/show_bug.cgi?id=132655: http://bugzilla.gnome.org/show_bug.cgi?id=132655

Revision history for this message
Sebastien Bacher (seb128) wrote :

Somebody know about /dev/pmu ? We just need to not display any message ?

Revision history for this message
Matt Zimmerman (mdz) wrote :

According to the discussion on the sounder mailing list, unprivileged
applications shouldn't be touching /dev/pmu, and so the permissions on it are
appropriate.

http://rince.africaninspace.com/mailman/private/sounder/2004-September/000331.html

So, we need to either suppress the error, or stop trying to open the device entirely

Revision history for this message
Martin Pitt (pitti) wrote :

A related problem: since my battery applet does not work (it always shows 0%). I
tried to modify the permissions of /dev/pmu to 666, but that does not help.

Revision history for this message
Thom May (thombot) wrote :

(In reply to comment #3)
> A related problem: since my battery applet does not work (it always shows 0%). I
> tried to modify the permissions of /dev/pmu to 666, but that does not help.

Nah. you need the apm compat module loaded for the battery stat to work.

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #4)
> Nah. you need the apm compat module loaded for the battery stat to work.

"Me"? I'm supposed to be a newbie user who does not know about modprobe.

I'll file that as a separate bug.

Revision history for this message
Sebastien Bacher (seb128) wrote :

 control-center (1:2.7.1-0ubuntu2) warty; urgency=low
 .
   * debian/patches/08_pmu_fix.patch:
     - removed, so we don't have the pmu warning dialog (Warty: #957).

Revision history for this message
Sebastien Bacher (seb128) wrote :

I don't understand, the string was in the patch which has been removed and I'm
pretty sure it was this patch was faulty (08_pmu_fix.patch).

+ *error = g_error_new_literal (ACME_FBLEVEL_ERROR,
+ ACME_FBLEVEL_ERROR_WRONG_PERMS,
+ _("Wrong permission for '/dev/pmu'
device"));

grep -r "Wrong permission" in the current package source gives nothing ...

Anybody with a ppc box to dig into this ?

Revision history for this message
Matt Zimmerman (mdz) wrote :

On my powerpc desktop (no battery, but I have /dev/pmu), if I start the applet,
it displays no errors and "N/A" next to the icon. i.e., works fine for me. Martin?

Revision history for this message
David D Miller (justdave) wrote :

I still get this on my iBook. I did an apt-get upgrade earlier this afternoon,
and have rebooted since then.

The exact string now is "Permissions on the file /dev/pmu are broken"

root@ibook ~ # grep -rn 'Permissions on the file' /usr/lib
Binary file /usr/lib/control-center/gnome-settings-daemon matches
root@ibook ~ # strings /usr/lib/control-center/gnome-settings-daemon | grep
Permissions
Permissions on the file %s are broken

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #8)
> On my powerpc desktop (no battery, but I have /dev/pmu), if I start the applet,
> it displays no errors and "N/A" next to the icon. i.e., works fine for me.
Martin?

As soon as I load apm_emu (since recently it even gets loaded automatically) the
applet works fine for me, too. But I still get this nasty error box after login.

Revision history for this message
Jamie Wilkinson (jaq-spacepants) wrote :

(In reply to comment #8)
> On my powerpc desktop (no battery, but I have /dev/pmu), if I start the applet,
> it displays no errors and "N/A" next to the icon. i.e., works fine for me.
Martin?

My battstat applet works as expected, but the dialog still appears at login.
(actually, just did an update, i'll re-login and see if anything's changed)

I do have apm_emu loaded (though I did nothing to make that happen)

It's just the dialog, all the applets that read PMU seem to be behaving correctly.

Revision history for this message
Joey Stanford (joey) wrote :

Howdy...

I also get this bug and have fixed it temporarily. It's a problem with GNOME
apparently.

See this thread: http://lists.debian.org/debian-powerpc/2004/06/msg00119.html

My not very pretty fix was to chmod 666 /dev/pmu

Joey

Revision history for this message
Jeff Waugh (jdub) wrote :

I was of the understanding that /dev/pmu was used by gnome-settings-daemon for
handling the brightness setting, which requires write access.

Revision history for this message
Matt Zimmerman (mdz) wrote :

My understanding is that write access to this device allows you to do Very Bad
Things, and so it is not intended to be writable by unprivileged user processes

Revision history for this message
Colin Watson (cjwatson) wrote :

It would be really nice to suppress this error for the Warty release. It's ugly,
it's a FAQ among our powerpc users, and we have no better approach yet.

control-center/gnome-settings-daemon/gnome-settings-multimedia-keys.c is the
file in question. Search for "fblevel_problem_cb".

Revision history for this message
Sebastien Bacher (seb128) wrote :

ok, I'll try to fix it this afternoon

Revision history for this message
Martin Pitt (pitti) wrote :

Matt regards this as release critical, and he asked me to fix that. Taking over...

Revision history for this message
Martin Pitt (pitti) wrote :

Created an attachment (id=444)
quick hack to suppress the message

This is a minimally intrusive patch that just suppresses the dialog by
commenting out three lines of code. The applet still works fine on my G4.

This does not fix the real cause of the problem, but will be enough for Warty.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Looks good

Revision history for this message
Martin Pitt (pitti) wrote :

Created an attachment (id=445)
same hack, but avoids compilation warning

This comments out the char* declaration, too

Revision history for this message
Martin Pitt (pitti) wrote :

Fix for Warty:

control-center (1:2.8.0-0ubuntu5) warty; urgency=low
.
  * debian/patches/20_suppress_pmu_perm_warning.patch:
    - do not show the "Permissions on file /dev/pmu are broken" warning on
      login. (Warty bug #7716)

I leave that open since this does not fix the real cause. Downgrading and
changing target milestone.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Is it feasible to fix this properly for Hoary? If this requires adding a proper
interface to the pmu functionality which is safe for unprivileged users to
access, I don't think it can be on our Hoary agenda.

What is upstream doing?

Revision history for this message
Sebastien Bacher (seb128) wrote :

(In reply to comment #22)

> What is upstream doing?

Basically they are saying "we use the current method for years and we have no
problem with it" so they are probably
not moving on it (but they will probably accept a patch if we explain what's
wrong and what we are changing).

Upstream have an open bug about this, that's probably the right place for a
discussion:
http://bugzilla.gnome.org/show_bug.cgi?id=132655

Revision history for this message
Martin Pitt (pitti) wrote :

Just for the record, Debian has a much better patch, we'll get it when Sebastien
syncs control-center the next time.

Revision history for this message
Sebastien Bacher (seb128) wrote :

bug closed with the sync:

 control-center (1:2.11.2-0ubuntu1) breezy; urgency=low
 .
   * Sync with Debian.
   * New upstream version:
     - fix the theme preview crasher with xorg/composite (Ubuntu: #8199).
   * debian/control.in:
     - build a capplets-dbg package.
     - updated the Build-Depends.
   * debian/patches/06_disable_update_mime_at_install.patch,
     debian/patches/07_disable_update_mime_at_install-2.patch,
     debian/patches/12_sort_entries.patch:
     - works fine with the new version.
   * debian/patches/02_xrdb.patch,
     debian/patches/13_unlink_out_of_date_thumbs.patch,
     debian/patches/14_dont_override_user_removals.patch,
     debian/patches/16_gsd-reaper-no-iopipe.patch,
     debian/patches/17_menu-changes.patch:
     - ubuntu changes.
   * debian/rules:
     - build a capplets-dbg package.
   * debian/watch:
     - updated.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.