Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] gdm fails to change screen brightness
@ 2024-02-22 12:18 mayhair
  2024-02-22 21:43 ` chrysos349
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: mayhair @ 2024-02-22 12:18 UTC (permalink / raw)
  To: ml

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

New issue by mayhair on void-packages repository

https://github.com/void-linux/void-packages/issues/48876

Description:
### Is this a new report?

Yes

### System Info

Void 6.6.17_1 x86_64 GenuineIntel uptodate FFFFFFFFF

### Package(s) Affected

gdm-44.1_2

### Does a report exist for this bug with the project's home (upstream) and/or another distro?

_No response_

### Expected behaviour

It is possible to change the screen brightness via GDM, either by using the brightness keys or the graphical slider.

### Actual behaviour

Pressing the brightness keys or using the slider does nothing, graphically. It does output an error similar to this to socklog:
```
2024-02-22T09:17:48.62989 authpriv.crit: Feb 22 14:17:48 pkexec[2028]: gdm: The value for the SHELL variable was not found in the /etc/shells file [USER=root] [TTY=unknown] [CWD=/var/lib/gdm] [COMMAND=/usr/libexec/gsd-backlight-helper /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight 80]
```
This is peculiar, because executing the same command (`/usr/libexec/gsd-backlight-helper /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight [brightness]`) within an interactive shell works with no problems.

### Steps to reproduce

When GDM is set as the display manager, make sure you are logged out.
Then try to change the brightness, either by pressing the brightness keys or by clicking the top-right corner and adjusting the brightness slider.

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

* Re: gdm fails to change screen brightness
  2024-02-22 12:18 [ISSUE] gdm fails to change screen brightness mayhair
@ 2024-02-22 21:43 ` chrysos349
  2024-02-23  4:56 ` mayhair
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: chrysos349 @ 2024-02-22 21:43 UTC (permalink / raw)
  To: ml

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

New comment by chrysos349 on void-packages repository

https://github.com/void-linux/void-packages/issues/48876#issuecomment-1960368147

Comment:
In my case, `gdm` behaves the same. So what? Log in, and THEN change the brightness.

I'm not sure this is a bug. 

Of course, if you insist on being able to change the brightness BEFORE logging in, run this command, and restart.

``` bash
$ sudo chsh -s /bin/bash gdm
```

P.S. `pkexec` complains, because by default, `gdm` user has `/sbin/nologin` as its shell (run `grep gdm /etc/passwd` to confirm), which is not in `/etc/shells`. the command above changes the default shell of `gdm` user to `/bin/bash`.

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

* Re: gdm fails to change screen brightness
  2024-02-22 12:18 [ISSUE] gdm fails to change screen brightness mayhair
  2024-02-22 21:43 ` chrysos349
@ 2024-02-23  4:56 ` mayhair
  2024-02-23  4:56 ` mayhair
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mayhair @ 2024-02-23  4:56 UTC (permalink / raw)
  To: ml

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

New comment by mayhair on void-packages repository

https://github.com/void-linux/void-packages/issues/48876#issuecomment-1960732702

Comment:
Yeah, changing the gdm user's shell to `/bin/sh` fixes the issue.

> I'm not sure this is a bug.
I'm not sure that this is NOT a bug. GDM has a built-in brightness slider, that logged an error when I tried to use it.

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

* Re: gdm fails to change screen brightness
  2024-02-22 12:18 [ISSUE] gdm fails to change screen brightness mayhair
  2024-02-22 21:43 ` chrysos349
  2024-02-23  4:56 ` mayhair
@ 2024-02-23  4:56 ` mayhair
  2024-02-23  4:58 ` mayhair
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mayhair @ 2024-02-23  4:56 UTC (permalink / raw)
  To: ml

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

New comment by mayhair on void-packages repository

https://github.com/void-linux/void-packages/issues/48876#issuecomment-1960732702

Comment:
Yeah, changing the gdm user's shell to `/bin/sh` fixes the issue.

> I'm not sure this is a bug.

I'm not sure that this is NOT a bug. GDM has a built-in brightness slider, that logged an error when I tried to use it.

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

* Re: gdm fails to change screen brightness
  2024-02-22 12:18 [ISSUE] gdm fails to change screen brightness mayhair
                   ` (2 preceding siblings ...)
  2024-02-23  4:56 ` mayhair
@ 2024-02-23  4:58 ` mayhair
  2024-02-24 11:51 ` ahesford
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mayhair @ 2024-02-23  4:58 UTC (permalink / raw)
  To: ml

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

New comment by mayhair on void-packages repository

https://github.com/void-linux/void-packages/issues/48876#issuecomment-1960732702

Comment:
Yeah, changing the gdm user's shell to `/bin/sh` fixes the issue.

> I'm not sure this is a bug.

I'm not sure that this is NOT a bug. GDM has a built-in brightness slider, that logged an error when I tried to use it (as I have explained before).

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

* Re: gdm fails to change screen brightness
  2024-02-22 12:18 [ISSUE] gdm fails to change screen brightness mayhair
                   ` (3 preceding siblings ...)
  2024-02-23  4:58 ` mayhair
@ 2024-02-24 11:51 ` ahesford
  2024-02-24 11:56 ` ahesford
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ahesford @ 2024-02-24 11:51 UTC (permalink / raw)
  To: ml

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

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/issues/48876#issuecomment-1962338058

Comment:
It would probably be better to add `/sbin/nologin` to `/etc/shells` than to give the `gdm` user a real shell.

I recommend making the backlight files writable by some particular group (`video` is a common choice) and add `gdm` to that group. This might avoid the privilege escalation entirely and stop pkexec from complaining.

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

* Re: gdm fails to change screen brightness
  2024-02-22 12:18 [ISSUE] gdm fails to change screen brightness mayhair
                   ` (4 preceding siblings ...)
  2024-02-24 11:51 ` ahesford
@ 2024-02-24 11:56 ` ahesford
  2024-02-25  3:44 ` [ISSUE] [CLOSED] " ahesford
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ahesford @ 2024-02-24 11:56 UTC (permalink / raw)
  To: ml

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

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/issues/48876#issuecomment-1962338058

Comment:
I recommend making the backlight files writable by some particular group (`video` is a common choice) and add `gdm` to that group. This might avoid the privilege escalation entirely and stop pkexec from complaining.

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

* Re: [ISSUE] [CLOSED] gdm fails to change screen brightness
  2024-02-22 12:18 [ISSUE] gdm fails to change screen brightness mayhair
                   ` (5 preceding siblings ...)
  2024-02-24 11:56 ` ahesford
@ 2024-02-25  3:44 ` ahesford
  2024-02-25  3:44 ` ahesford
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ahesford @ 2024-02-25  3:44 UTC (permalink / raw)
  To: ml

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

Closed issue by mayhair on void-packages repository

https://github.com/void-linux/void-packages/issues/48876

Description:
### Is this a new report?

Yes

### System Info

Void 6.6.17_1 x86_64 GenuineIntel uptodate FFFFFFFFF

### Package(s) Affected

gdm-44.1_2

### Does a report exist for this bug with the project's home (upstream) and/or another distro?

_No response_

### Expected behaviour

It is possible to change the screen brightness via GDM, either by using the brightness keys or the graphical slider.

### Actual behaviour

Pressing the brightness keys or using the slider does nothing, graphically. It does output an error similar to this to socklog:
```
2024-02-22T09:17:48.62989 authpriv.crit: Feb 22 14:17:48 pkexec[2028]: gdm: The value for the SHELL variable was not found in the /etc/shells file [USER=root] [TTY=unknown] [CWD=/var/lib/gdm] [COMMAND=/usr/libexec/gsd-backlight-helper /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight 80]
```
This is peculiar, because executing the same command (`/usr/libexec/gsd-backlight-helper /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight [brightness]`), as root and within an interactive shell works with no problems.

### Steps to reproduce

When GDM is set as the display manager, make sure you are logged out.
Then try to change the brightness, either by pressing the brightness keys or by clicking the top-right corner (where the Wi-Fi and battery symbols are) and adjusting the brightness slider.

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

* Re: gdm fails to change screen brightness
  2024-02-22 12:18 [ISSUE] gdm fails to change screen brightness mayhair
                   ` (6 preceding siblings ...)
  2024-02-25  3:44 ` [ISSUE] [CLOSED] " ahesford
@ 2024-02-25  3:44 ` ahesford
  2024-02-25 14:56 ` mayhair
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ahesford @ 2024-02-25  3:44 UTC (permalink / raw)
  To: ml

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

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/issues/48876#issuecomment-1962802324

Comment:
This is a consequence of configuration choices made in the `gdm` package. While some users may want the brightness slider to work out of the box, other users may not want the `gdm` user to be assigned a valid login shell or may wish to restrict access to brightness. Some configuration may be necessary to get some software features to work as expected.

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

* Re: gdm fails to change screen brightness
  2024-02-22 12:18 [ISSUE] gdm fails to change screen brightness mayhair
                   ` (7 preceding siblings ...)
  2024-02-25  3:44 ` ahesford
@ 2024-02-25 14:56 ` mayhair
  2024-02-25 14:57 ` mayhair
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mayhair @ 2024-02-25 14:56 UTC (permalink / raw)
  To: ml

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

New comment by mayhair on void-packages repository

https://github.com/void-linux/void-packages/issues/48876#issuecomment-1962965831

Comment:
> This is a consequence of configuration choices made in the `gdm` package. While some users may want the brightness slider to work out of the box, other users may not want the `gdm` user to be assigned a valid login shell or may wish to restrict access to brightness. Some configuration may be necessary to get some software features to work as expected.

Could the steps to let gdm change the brightness at least be listed in the Void Docs? There isn't really any clearly documented way to enable it otherwise.

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

* Re: gdm fails to change screen brightness
  2024-02-22 12:18 [ISSUE] gdm fails to change screen brightness mayhair
                   ` (8 preceding siblings ...)
  2024-02-25 14:56 ` mayhair
@ 2024-02-25 14:57 ` mayhair
  2024-02-25 14:57 ` mayhair
  2024-02-25 15:10 ` mayhair
  11 siblings, 0 replies; 13+ messages in thread
From: mayhair @ 2024-02-25 14:57 UTC (permalink / raw)
  To: ml

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

New comment by mayhair on void-packages repository

https://github.com/void-linux/void-packages/issues/48876#issuecomment-1962965831

Comment:
> This is a consequence of configuration choices made in the `gdm` package. While some users may want the brightness slider to work out of the box, other users may not want the `gdm` user to be assigned a valid login shell or may wish to restrict access to brightness. Some configuration may be necessary to get some software features to work as expected.

Could the steps to let gdm change the brightness at least be listed in the Void Docs? These steps wouldn't really be clearly documented otherwise.

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

* Re: gdm fails to change screen brightness
  2024-02-22 12:18 [ISSUE] gdm fails to change screen brightness mayhair
                   ` (9 preceding siblings ...)
  2024-02-25 14:57 ` mayhair
@ 2024-02-25 14:57 ` mayhair
  2024-02-25 15:10 ` mayhair
  11 siblings, 0 replies; 13+ messages in thread
From: mayhair @ 2024-02-25 14:57 UTC (permalink / raw)
  To: ml

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

New comment by mayhair on void-packages repository

https://github.com/void-linux/void-packages/issues/48876#issuecomment-1962965831

Comment:
> This is a consequence of configuration choices made in the `gdm` package. While some users may want the brightness slider to work out of the box, other users may not want the `gdm` user to be assigned a valid login shell or may wish to restrict access to brightness. Some configuration may be necessary to get some software features to work as expected.

Could the steps to let gdm change the brightness at least be stated in the Void Docs? These steps wouldn't really be clearly documented otherwise.

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

* Re: gdm fails to change screen brightness
  2024-02-22 12:18 [ISSUE] gdm fails to change screen brightness mayhair
                   ` (10 preceding siblings ...)
  2024-02-25 14:57 ` mayhair
@ 2024-02-25 15:10 ` mayhair
  11 siblings, 0 replies; 13+ messages in thread
From: mayhair @ 2024-02-25 15:10 UTC (permalink / raw)
  To: ml

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

New comment by mayhair on void-packages repository

https://github.com/void-linux/void-packages/issues/48876#issuecomment-1962965831

Comment:
> This is a consequence of configuration choices made in the `gdm` package. While some users may want the brightness slider to work out of the box, other users may not want the `gdm` user to be assigned a valid login shell or may wish to restrict access to brightness. Some configuration may be necessary to get some software features to work as expected.

Since it isn't obvious how to let gdm change the brightness, could the necessary steps be at least listed in the Void Docs?

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

end of thread, other threads:[~2024-02-25 15:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22 12:18 [ISSUE] gdm fails to change screen brightness mayhair
2024-02-22 21:43 ` chrysos349
2024-02-23  4:56 ` mayhair
2024-02-23  4:56 ` mayhair
2024-02-23  4:58 ` mayhair
2024-02-24 11:51 ` ahesford
2024-02-24 11:56 ` ahesford
2024-02-25  3:44 ` [ISSUE] [CLOSED] " ahesford
2024-02-25  3:44 ` ahesford
2024-02-25 14:56 ` mayhair
2024-02-25 14:57 ` mayhair
2024-02-25 14:57 ` mayhair
2024-02-25 15:10 ` mayhair

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 NNTP newsgroup(s).