MacBook2,1 brightness control requires root privileges

  • Done
  • quality assurance status badge
Details
6 participants
  • Albin
  • Joshua Branson
  • Ludovic Courtès
  • Marius Bakke
  • pelzflorian (Florian Pelz)
  • zimoun
Owner
unassigned
Submitted by
Albin
Severity
normal
A
A
Albin wrote on 8 Mar 2016 23:50
(address . bug-guix@gnu.org)
56DF5744.6000706@fripost.org
Hi,

I've discovered that the non-working brightness controls for the
MacBook2,1 are due to insufficient permissions.

The first indication of this was that I could change brightness by
running the program redshift with root permissions (`sudo redshift`).

Today I was presented with this dialog box in GNOME 3 after having
pressed one of the brightness-control keys:

"Authentication is needed to run
'/gnu/store/[...]-gnome-settings-daemon-3.18.2/libexec/gsd-backlight-helper'
as the super user.

Administrator
Password [__________]"

I tried to input both the user password and the root password but none
of this this had any effect. When I back into GNOME 3 as root, however,
the brightness controls were working.

Does anyone have a suggestion what I could try to give the various
brightness control programs (for GNOME 3, Xfce, etc.) the required
permissions without having to be logged in as root?

Cheers!

Albin
L
L
Ludovic Courtès wrote on 9 Mar 2016 14:21
Re: bug#22952: MacBook2, 1 brightness control requires root privileges
(name . Albin)(address . albin@fripost.org)
87mvq7dbx0.fsf@gnu.org
Albin <albin@fripost.org> skribis:

Toggle quote (6 lines)
> I've discovered that the non-working brightness controls for the
> MacBook2,1 are due to insufficient permissions.
>
> The first indication of this was that I could change brightness by
> running the program redshift with root permissions (`sudo redshift`).

Interesting. I use a simple window manager (ratpoison), and ‘redshift’
works fine as non-root.

Toggle quote (10 lines)
> Today I was presented with this dialog box in GNOME 3 after having
> pressed one of the brightness-control keys:
>
> "Authentication is needed to run
> '/gnu/store/[...]-gnome-settings-daemon-3.18.2/libexec/gsd-backlight-helper'
> as the super user.
>
> Administrator
> Password [__________]"

This is something Andy is working on:


Looks like we’re almost there. :-)

Ludo’.
J
J
Joshua Branson wrote on 20 Apr 2017 00:23
Macbook2,1 brightness control requires root privileges
(name . 22952@debbugs.gnu.org)(address . 22952@debbugs.gnu.org)
BN6PR10MB1729D14D79AF18A6B09C8615A6180@BN6PR10MB1729.namprd10.prod.outlook.com
I use a Macbook 7,1 and I do not have this issue.

Perhaps this issue is resolved?
L
L
Ludovic Courtès wrote on 20 Apr 2017 10:45
Re: bug#22952: Macbook2, 1 brightness control requires root privileges
(name . Joshua Branson)(address . bransoj@hotmail.com)(name . 22952-done@debbugs.gnu.org)(address . 22952@debbugs.gnu.org)
877f2f4gcw.fsf@gnu.org
Joshua Branson <bransoj@hotmail.com> skribis:

Toggle quote (4 lines)
> I use a Macbook 7,1 and I do not have this issue.
>
> Perhaps this issue is resolved?

Indeed, I believe it was fixed about a year ago with the elogind/polkit
integration in GuixSD.

So I’m closing the bug, please reopen if you think it’s not resolved!

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 5 May 2017 20:57
control message for bug #22952
(address . control@debbugs.gnu.org)
87wp9v168p.fsf@gnu.org
tags 22952 fixed
close 22952
P
P
pelzflorian (Florian Pelz) wrote on 17 Nov 2020 22:32
unarchive 22952
(address . control@debbugs.gnu.org)
20201117213227.nooohiakbb75xgoc@pelzflorian.localdomain
unarchive 22952
P
P
pelzflorian (Florian Pelz) wrote on 17 Nov 2020 22:23
Backlight brightness keys in GDM and MATE require password authentication
(address . 22952@debbugs.gnu.org)
20201117212349.lhhytr4hovctw5e7@pelzflorian.localdomain
I’m reopening this bug because it is very similar to my issue.

When using my Macbook’s keyboard XF86MonBrightnessUp/Down keys to
adjust screen brightness (probably on non-Macbooks too) in GDM or
MATE, I am asked to enter my authentication password to make
gnome-settings-daemon’s libexec/gsd-backlight-helper (or some
equivalent program on MATE) change screen brightness.

This should not be so; gsd-backlight-helper should have PolicyKit, pam
or setuid or whatever.

Regards,
Florian
M
M
Marius Bakke wrote on 18 Nov 2020 22:14
87sg96bc5j.fsf@gnu.org
"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skriver:

Toggle quote (11 lines)
> I’m reopening this bug because it is very similar to my issue.
>
> When using my Macbook’s keyboard XF86MonBrightnessUp/Down keys to
> adjust screen brightness (probably on non-Macbooks too) in GDM or
> MATE, I am asked to enter my authentication password to make
> gnome-settings-daemon’s libexec/gsd-backlight-helper (or some
> equivalent program on MATE) change screen brightness.
>
> This should not be so; gsd-backlight-helper should have PolicyKit, pam
> or setuid or whatever.

gnome-service-type installs a PolicyKit rule for gnome-settings-daemon.

Should the MATE service do the same?

To work around it locally, try adding:

(simple-service 'gsd-polkit polkit-service-type
(list gnome-settings-daemon))

to the (services ...) section of your system configuration.
-----BEGIN PGP SIGNATURE-----

iQFDBAEBCgAtFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl+1jrkPHG1hcml1c0Bn
bnUub3JnAAoJEKKgbfKjOlT6ZIoIAKo+/4HJ/BXLK2emRgOVr3c/66Wtr4zZSKZr
caw2k3AYoRiLUix+j3C+EpC5LqSrW5atdCAK7X5bSOhBfkCsOYh7SeyrUaktHd0v
pIYQ8OmaEkg6w7e+1nSYKlJdJNMKHSoXsQdOsbiow6BhrVuioxn5laIIrQkCfD4n
P61jIxiGp/25GvQIsFYwuh4Lke6uA5TEJPfambUP8I3QLYX/NQ5b2F21f2OShNg4
xAmHIOHc102uGwmhvDvqkflzMO1ZoyagHh00SF29gbSis4O93nzpJOa8h0Pl2M4F
3/olkTJ4xLRzQBcY1xaVEpgiGSVaoDlNiDntA39XsDvPZgcsVps=
=RrV4
-----END PGP SIGNATURE-----

P
P
pelzflorian (Florian Pelz) wrote on 19 Nov 2020 19:39
(name . Marius Bakke)(address . marius@gnu.org)(address . 22952@debbugs.gnu.org)
20201119183929.gsxe3rv5fehrwen5@pelzflorian.localdomain
On Wed, Nov 18, 2020 at 10:14:32PM +0100, Marius Bakke wrote:
Toggle quote (7 lines)
> To work around it locally, try adding:
>
> (simple-service 'gsd-polkit polkit-service-type
> (list gnome-settings-daemon))
>
> to the (services ...) section of your system configuration.

Thank you. You are correct for GDM. Adding this fixes changing the
backlight in GDM. Perhaps the GDM service should extend the polkit
service like that. It also does not conflict with adding a
gnome-service-type.

MATE still complains. Without changing services, normally both on the
first log-in to MATE and on subsequent log-ins, when pressing the keys
to change the backlight, a message window still tells me that
/gnu/store/5kmmwc9q23lihpy3nv2knbvsr9qv2aln-mate-power-manager-1.24.2/sbin/mate-power-backlight-helper
needs to be authenticated as the super user; I need to enter the
password.

Only with gnome-service-type and when not removing the GDM service,
after GDM (which uses the gsd), on the first log-in to the MATE
desktop, the backlight keys do nothing at all. When I try to log out,
it says Power Manager is not responding. When I force the log-out
despite the Power Manager, then log back in, I again get the message
each time I press the backlight keys.

I added:

(simple-service 'mate-power-polkit polkit-service-type
(list mate-power-manager))

It does not work.

Regards,
Florian
Z
Z
zimoun wrote on 5 Jan 2022 00:46
Re: bug#22952: MacBook2, 1 brightness control requires root privileges
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)
86tuej9i8h.fsf_-_@gmail.com
Hi,

I am doing triage of old bug and I hit this one [1]. Is it still happening?



On Thu, 19 Nov 2020 at 19:39, "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> wrote:
Toggle quote (35 lines)
> On Wed, Nov 18, 2020 at 10:14:32PM +0100, Marius Bakke wrote:

>> To work around it locally, try adding:
>>
>> (simple-service 'gsd-polkit polkit-service-type
>> (list gnome-settings-daemon))
>>
>> to the (services ...) section of your system configuration.
>
> Thank you. You are correct for GDM. Adding this fixes changing the
> backlight in GDM. Perhaps the GDM service should extend the polkit
> service like that. It also does not conflict with adding a
> gnome-service-type.
>
> MATE still complains. Without changing services, normally both on the
> first log-in to MATE and on subsequent log-ins, when pressing the keys
> to change the backlight, a message window still tells me that
> /gnu/store/5kmmwc9q23lihpy3nv2knbvsr9qv2aln-mate-power-manager-1.24.2/sbin/mate-power-backlight-helper
> needs to be authenticated as the super user; I need to enter the
> password.
>
> Only with gnome-service-type and when not removing the GDM service,
> after GDM (which uses the gsd), on the first log-in to the MATE
> desktop, the backlight keys do nothing at all. When I try to log out,
> it says Power Manager is not responding. When I force the log-out
> despite the Power Manager, then log back in, I again get the message
> each time I press the backlight keys.
>
> I added:
>
> (simple-service 'mate-power-polkit polkit-service-type
> (list mate-power-manager))
>
> It does not work.

Especially, many things had been improved since 2020. :-)

Let close it or provide more details for fixing it. ;-)


Cheers,
simon
P
P
pelzflorian (Florian Pelz) wrote on 6 Jan 2022 13:30
(name . zimoun)(address . zimon.toutoune@gmail.com)
20220106123052.ouhb25hx55tsfd2m@pelzflorian.localdomain
On Wed, Jan 05, 2022 at 12:46:54AM +0100, zimoun wrote:
Toggle quote (2 lines)
> I am doing triage of old bug and I hit this one [1]. Is it still happening?

Thank you for asking again. All is fixed and no password gets asked
when using brightness keys on my same Macbook on GNOME/GDM nor
MATE/SDDM. I cannot test the original poster’s Redshift even after
adding it to the geoclue-service-type applications because I lack WiFi
hardware.

Closing.

Regards,
Florian
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 22952@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 22952
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch