unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Authentication prompt when changing brightness
@ 2019-10-07 13:25 David Wilson
  2019-10-07 15:10 ` Jesse Gibbons
  0 siblings, 1 reply; 7+ messages in thread
From: David Wilson @ 2019-10-07 13:25 UTC (permalink / raw)
  To: help-guix

Hi all,

This is my first attempt at setting up Guix on my machine, so please forgive me if I've missed anything obvious here. I've noticed that any time a process tries to set the backlight brightness of my laptop, a root authentication prompt appears:

https://imgur.com/a/vlB7UtN

I've seen this both when using xfce4-power-manager and inexplicably on the GDM login screen when I didn't even press a brightness key. It definitely seems like some policy configuration isn't set up correctly but I'm not exactly sure how to correct it.

I've configured my machine to use only the XFCE desktop environment but in practice I'm actually using a custom .xsession to launch Emacs with EXWM as my window manager. I believe I also saw it when running in XFCE but I can't repro it now due to a separate issue with xfwm crashing when XFCE starts up.

Here's my current system configuration if it helps:

https://github.com/daviwil/dotfiles/blob/23743190b8f744f89a8a43da6180576638246f72/guix/systems/zerocool.scm

I'm sure this must be a simple configuration issue so any help would be very much appreciated!

Thanks!

David

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Authentication prompt when changing brightness
  2019-10-07 13:25 Authentication prompt when changing brightness David Wilson
@ 2019-10-07 15:10 ` Jesse Gibbons
  2019-10-07 23:55   ` David Wilson
  0 siblings, 1 reply; 7+ messages in thread
From: Jesse Gibbons @ 2019-10-07 15:10 UTC (permalink / raw)
  To: David Wilson, help-guix

On Mon, 2019-10-07 at 06:25 -0700, David Wilson wrote:
> Hi all,
> 
> This is my first attempt at setting up Guix on my machine, so please
> forgive me if I've missed anything obvious here. I've noticed that any
> time a process tries to set the backlight brightness of my laptop, a root
> authentication prompt appears:
> 
> https://imgur.com/a/vlB7UtN
> 
> I've seen this both when using xfce4-power-manager and inexplicably on the
> GDM login screen when I didn't even press a brightness key. It definitely
> seems like some policy configuration isn't set up correctly but I'm not
> exactly sure how to correct it.
> 
> I've configured my machine to use only the XFCE desktop environment but in
> practice I'm actually using a custom .xsession to launch Emacs with EXWM
> as my window manager. I believe I also saw it when running in XFCE but I
> can't repro it now due to a separate issue with xfwm crashing when XFCE
> starts up.
> 
> Here's my current system configuration if it helps:
> 
> https://github.com/daviwil/dotfiles/blob/23743190b8f744f89a8a43da618057663
> 8246f72/guix/systems/zerocool.scm
> 
> I'm sure this must be a simple configuration issue so any help would be
> very much appreciated!
> 
> Thanks!
> 
> David
I have a similar problem. I see an authentication box when I try to adjust
screen brightness on the gdm screen, but not when logged into gnome. Does
this happen when you are logged in?

Just a guess, perhaps the "gdm" user can be added to the "video" group? I'm
not sure how to do that in the system configuration though.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Authentication prompt when changing brightness
  2019-10-07 15:10 ` Jesse Gibbons
@ 2019-10-07 23:55   ` David Wilson
  2019-10-08  0:18     ` Vagrant Cascadian
  0 siblings, 1 reply; 7+ messages in thread
From: David Wilson @ 2019-10-07 23:55 UTC (permalink / raw)
  To: Jesse Gibbons, help-guix

> I have a similar problem. I see an authentication box when I try to adjust
> screen brightness on the gdm screen, but not when logged into gnome. Does
> this happen when you are logged in?

Yeah, it happens when I'm logged in to a custom .xsession where I'm using Emacs as my window manager.  I installed GNOME to see whether the problem exists there and it turns out that everything works fine when logged in to a GNOME session.

Should I be able to use "brightnessctl" without sudo if I'm in the "video" group?  Looks like I'm not able to:

---
λ brightnessctl set 200
Can't modify brightness: Permission denied

You should run this program with root privileges.
Alternatively, get write permissions for device files.
---

Thanks!

David

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Authentication prompt when changing brightness
  2019-10-07 23:55   ` David Wilson
@ 2019-10-08  0:18     ` Vagrant Cascadian
  2019-10-08 22:52       ` David Wilson
  0 siblings, 1 reply; 7+ messages in thread
From: Vagrant Cascadian @ 2019-10-08  0:18 UTC (permalink / raw)
  To: David Wilson, Jesse Gibbons, help-guix

[-- Attachment #1: Type: text/plain, Size: 790 bytes --]

On 2019-10-07, David Wilson wrote:
> Should I be able to use "brightnessctl" without sudo if I'm in the
> "video" group?  Looks like I'm not able to:
>
> ---
> λ brightnessctl set 200
> Can't modify brightness: Permission denied
>
> You should run this program with root privileges.
> Alternatively, get write permissions for device files.

You have to configure the udev rule in your system configuration; using
the rules shipped with the brightnessctl package works:

  (udev-configuration (inherit config)
					(rules (cons brightnessctl
								 (udev-configuration-rules config)))))

Which I pretty much took straight from the udev rule for android devices
in the manual:

  https://guix.gnu.org/manual/en/html_node/Base-Services.html


live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Authentication prompt when changing brightness
  2019-10-08  0:18     ` Vagrant Cascadian
@ 2019-10-08 22:52       ` David Wilson
  2019-10-14 16:55         ` Maxim Cournoyer
  0 siblings, 1 reply; 7+ messages in thread
From: David Wilson @ 2019-10-08 22:52 UTC (permalink / raw)
  To: Vagrant Cascadian, Jesse Gibbons, help-guix


On Mon, Oct 7, 2019, at 5:18 PM, Vagrant Cascadian wrote:
> 
> You have to configure the udev rule in your system configuration; using
> the rules shipped with the brightnessctl package works:
> 
>   (udev-configuration (inherit config)
> 					(rules (cons brightnessctl
> 								 (udev-configuration-rules config)))))
> 

Thank you Vagrant, that led me down the correct path!  I was able to use your suggestion plus a udev config snippet I found in Pierre Neidhardt's Guix config to get backlight controls to work:

https://gitlab.com/ambrevar/dotfiles/blob/master/.config/guix/system/default.scm#L22-30

Regarding xfce4-power-manager's inability to control the backlight, I believe that its polkit policy file has not been picked up by the polkit-service such that it doesn't end up in /etc/polkit-1/actions where it belongs.  I'm looking into submitting a patch to correct this behavior so that future Guixers aren't confounded by that issue as I was.

Thanks!

David

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Authentication prompt when changing brightness
  2019-10-08 22:52       ` David Wilson
@ 2019-10-14 16:55         ` Maxim Cournoyer
  2019-10-15 12:49           ` David Wilson
  0 siblings, 1 reply; 7+ messages in thread
From: Maxim Cournoyer @ 2019-10-14 16:55 UTC (permalink / raw)
  To: David Wilson; +Cc: Vagrant Cascadian, help-guix, Jesse Gibbons

"David Wilson" <david@daviwil.com> writes:

> On Mon, Oct 7, 2019, at 5:18 PM, Vagrant Cascadian wrote:
>> 
>> You have to configure the udev rule in your system configuration; using
>> the rules shipped with the brightnessctl package works:
>> 
>>   (udev-configuration (inherit config)
>> 					(rules (cons brightnessctl
>> 								 (udev-configuration-rules config)))))
>> 
>
> Thank you Vagrant, that led me down the correct path!  I was able to
> use your suggestion plus a udev config snippet I found in Pierre
> Neidhardt's Guix config to get backlight controls to work:
>
> https://gitlab.com/ambrevar/dotfiles/blob/master/.config/guix/system/default.scm#L22-30
>
> Regarding xfce4-power-manager's inability to control the backlight, I
> believe that its polkit policy file has not been picked up by the
> polkit-service such that it doesn't end up in /etc/polkit-1/actions
> where it belongs.  I'm looking into submitting a patch to correct this
> behavior so that future Guixers aren't confounded by that issue as I
> was.
>
> Thanks!
>
> David

Thanks for looking into it, David!

Maxim

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Authentication prompt when changing brightness
  2019-10-14 16:55         ` Maxim Cournoyer
@ 2019-10-15 12:49           ` David Wilson
  0 siblings, 0 replies; 7+ messages in thread
From: David Wilson @ 2019-10-15 12:49 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Vagrant Cascadian, help-guix, Jesse Gibbons

On Mon, Oct 14, 2019, at 9:55 AM, Maxim Cournoyer wrote:
> 
> Thanks for looking into it, David!
> 

My pleasure!  I've sent a patch to guix-patches to fix this issue in the XFCE service:

https://lists.gnu.org/archive/html/guix-patches/2019-10/msg00348.html

Thanks again to Jesse and Vagrant for their help!

David

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-10-15 12:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-07 13:25 Authentication prompt when changing brightness David Wilson
2019-10-07 15:10 ` Jesse Gibbons
2019-10-07 23:55   ` David Wilson
2019-10-08  0:18     ` Vagrant Cascadian
2019-10-08 22:52       ` David Wilson
2019-10-14 16:55         ` Maxim Cournoyer
2019-10-15 12:49           ` David Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).