Skip to content

Backlight change on idle effectively broken? #418

@Alanon202

Description

@Alanon202
Context

I’m building out a Wayland system and slowly migrating from Openbox, so Labwc and some LXQt utilities were the natural way to go. LXQt Power Manager seems like the most robust solution currently available on Wayland, so I opted to use it in my laptop setup. I was trying to configure the system to decrease brightness after 3 minutes of inactivity, after which the system would suspend or lock after 15 minutes of inactivity, when I encountered this issue. It may not be a bug per se, but I was unable to find any information about the intended usage so I decided to write it out.

Current Behavior

The option is called "Backlight Change on Idle", but a polkit prompt is always initiated for any brightness change to happen? Presumably, if the computer is idle, it makes no sense that the user would suddenly enter their password to elevate privileges and decrease the screen brightness, because doing so would simultaneously break the idle state?

Alternatively, if the system is indeed idle, and the user is not there to enter the password, we’re left with a system password prompt in the middle of the screen? This then seems to break all subsequent events in the chain until the password prompts are cancelled or satisfied.

Steps to Reproduce

For example, I set the backlight to change to something like 5% after 30 seconds of inactivity, and the system to suspend after 50 seconds in idle state.

The password prompt will appear after 30 seconds and inhibit the suspend timer presumably forever. Only after canceling the password prompt will the system immediately suspend.

Alternatively, when you disable the backlight and leave the suspend after 50 seconds engaged, it will work every time.

This makes the backlight feature as-is practically unusable alongide any other configuration option, and it isn’t particularly useful by itself due to constant password prompting.

(I’ve tried the same thing in both a labwc session and with lxqt-wayland-session set up for use with labwc and the behaviour is the same.)

Expected Behavior

I would expect there to not to be a password prompt, i.e. the program should figure out how to not ask the user for elevated privileges to access brightness settings and simply change them as per the user setting, not breaking any idle states in the process.

If I’m correct, for all intents and purposes this setting makes no sense unless the user is not prompted for their password? However, I could find no way to achieve this?

Possible Solution

I already use udev rules that assign special permissions to the video usergroup and related brightness files. They enable the likes of waybar and some bash scripts to write brightness values with no elevated privileges for any user in the video group. I’m currently using acpilight, which is an xbacklight compatible ACPI-based solution, which works fine on X11 and Wayland alike, but lxqt-powermanagement seems to ignore this no matter what I try.

I’ve tried chgrp video and chmod g+x on all of the lxqt-backlight_backend files hoping that this would eliminate the prompt and also exeprimented with some polkit settings to no avail. No matter what I do, the polkit authentication is triggered.

Is there a different way to achieve this, or is something misconfigured on my end?

System Information

I’m using a fully up-to-date Arch Linux with the latest kernel, all the latest updates in a Wayland session with labwc as my compositor. As far as LXQt components are concerned, I use only lxqt-powermanagement and its dependencies from the extra repository and log into labwc using ly.

  • Distribution & Version: ArcoLinux
  • Kernel: 6.12.1-arch1-1
  • Qt Version: qt6-base 6.8.0-1
  • liblxqt Version: 2.1.0-1
  • lxqt-build-tools Version: 2.1.0-1
  • Package version: 2.1.0-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions