GNU bug report logs - #48265
mate-power-backlight-helper is referred to by store name instead of polkit action (IIUC)

Previous Next

Package: guix;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Thu, 6 May 2021 20:25:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Maxime Devos <maximedevos <at> telenet.be>
Subject: bug#48265: closed (Re: bug#48265: Authentication is needed to run
 mate-power-backlight-helper)
Date: Sun, 29 Jun 2025 01:00:07 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#48265: mate-power-backlight-helper is referred to by store name instead of polkit action (IIUC)

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 48265 <at> debbugs.gnu.org.

-- 
48265: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=48265
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: 宋文武 <iyzsong <at> envs.net>
To: Christopher League <league <at> contrapunctus.net>
Cc: 48265-done <at> debbugs.gnu.org
Subject: Re: bug#48265: Authentication is needed to run
 mate-power-backlight-helper
Date: Sun, 29 Jun 2025 09:05:15 +0800
Christopher League <league <at> contrapunctus.net> writes:

> Hi, after a recent update, I am having the same authentication
> issue with the brightness helper on the Mate desktop:
>
>> Authentication is needed to run
>> /gnu/store/ra8zy...-mate-power-manager-1.28.1/sbin/
>> mate-power-backlight-helper as the super user.
>
> As noted previously on this bug report, the polkit
> org.mate.power.policy file refers to an absolute store path.
>
> But I think ultimately the problem may have to do with the fact that
> mate-power-manager APPEARS TWICE in the system closure:
>
> $ guix gc -R /gnu/store/2zf16...-system | grep mate-power
> /gnu/store/ra8zy...-mate-power-manager-1.28.1
> /gnu/store/a14gf...-mate-power-manager-1.28.1

Hello, this should be fixed with commit b7a8f886f50. Close, thanks.

[Message part 3 (message/rfc822, inline)]
From: Maxime Devos <maximedevos <at> telenet.be>
To: bug-guix <at> gnu.org
Subject: mate-power-backlight-helper is referred to by store name instead of
 polkit action (IIUC)
Date: Thu, 06 May 2021 22:24:43 +0200
[Message part 4 (text/plain, inline)]
Related to: https://issues.guix.gnu.org/22952

On a mate desktop (mate-desktop-service-type).

FN-F9, FN-F10 (binded to ‘decrease brightness’ and ‘increase brightness’):

> Authentication is needed to run '/gnu/store/mp33h4vqdw0scdkjj0v6c3gima9wz8lm-mate-power-manager-1.24.2/sbin/mate-power-backlight-helper' as the super user.

Contents of /etc/polkit-1/actions/org.mate.power.policy:


  [...]
  <icon_name>battery</icon_name>
  <action id="org.mate.power.backlight-helper">
    <!-- SECURITY:
          - A normal active user on the local machine does not need permission
            to change the backlight brightness.
     -->
    <description>Modify the laptop brightness</description>
    <message>Authentication is required to modify the laptop brightness</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/gnu/store/zk4kb4437032swahywmgyzn55b5w5wj8-mate-power-manager-1.24.2/sbin/mate-power-backlight-help>
  </action>
  [...]

FWIW, the following works as expected (no error message), using the store path in .policy:
$ pkexec /gnu/store/zk4kb4437032swahywmgyzn55b5w5wj8-mate-power-manager-1.24.2/sbin/mate-power-backlight-helper --set-brightness=300
Maybe MATE is trying the equivalent of "pkexec /wrong/store/path/mate-power-backlight-helper --etcetera" instead
of referring to the action by name org.mate.power.backlight-helper.

Note the store path is different. Now try something different

$ which mate-power-backlight-helper
> /run/current-system/profile/sbin/mate-power-backlight-helper
$ ls -l /run/current-system/profile/sbin/mate-power-backlight-helper
> /gnu/store/ffqhy4xdpzkg06rlq76zrbwn8v3rqgw9-mate-1.24.1/sbin/mate-power-backlight-helper

Now we have three different store paths so far!

Not sure what the proper way to resolve this, and what causes the three different store paths,
but one way to resolve this would be referring to /run/current-system/profile/sbin/mate-power-backlight-helper
in org.mate.power.policy (untested!).

It looks like there could very well be be similar issues in (unverified):

* /etc/polkit-1/actions/org.gnome.controlcenter.remote-login-helper.policy
* /etc/polkit-1/actions/org.gnome.gnome-system-monitor.policy
* /etc/polkit-1/actions/org.gnome.settings-daemon.plugins.power.policy
* /etc/polkit-1/actions/org.gnome.settings-daemon.plugins.wacom.policy
* grep for /gnu/store/ in /etc/polkit-1/actions/*.policy

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 26 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.