Please help debug a display backlight problem. When I upgraded my Panasonic CF-19 to buster, the backlight adjustment keys quit working. I have downgraded back to stretch. Before I try buster again, I would like to understand how the backlighting adjustment works. Looking at the list archive, found info on the kernel end of this process. Also on the user interface end, although mine is a little different since I am using xfce. Can anyone tell me what should be happening in between?

On the kernel end of things, that seems to work both in stretch and buster. For example, I can change the intensity using the command:
  # echo 400 > /sys/class/backlight/intel_backlight/brightness
which for the CF-19, '400' results in roughly 10% of full brightness. The CF-19's backlight is really powerful, so 400 is about right for indoor use.

On the user interface end, the laptop provides two sets of backlight keys: one pair on the keyboard and one pair on the front edge of the cabinet. xfce provides a "power manager" plugin that includes a slider so you can use a mouse to adjust screen brightness. Just like the keys, the slider works in stretch but has no effect in buster.

In the category of configuration, xfce provides a control panel, also called "Power Manager". Nearly all the settings have to do with sleep, but it also provides "Handle display brightness keys". That defaults to enabled. If I disable it, the keys don't do anything, but the slider provided by the brightness manager plugin still works. So I turned the "Handle display brightness keys" back on.

The final user interface feature is a plugin that displays notifications of various events. Normally, this seems like eye candy. Why do you need a dialog for something obvious like the backlight brightness? But with my problems, maybe the notifications plugin is useful for debugging. The notifications plugin seems to report the brightness level you select with the keys and slider, as opposed to the actual brightness.

Digging deeper, xfce provides a daemon, also named "power_manager". The documentation on the xfce web site says, for debugging purposes, you can stop the daemon and then run it as an ordinary command:
 # xfce4-power-manager -q
 # xfce4-power-manager --no-daemon --debug
The web site doesn't say much about interpreting the debug messages, but it does describe how to tell if Policy Kit is blocking the daemon. I don't seem to be having that problem. Anyhow, a typical set of messages for a button push (either stretch or buster) is:
  TRACE[xfpm-button.c:118] xfpm_button_filter_x_events(): Key press:
     ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
  TRACE[xfpm-backlight.c:188] xfpm_backlight_show(): Level 584
  TRACE[xfpm-manager.c:368] xfpm_manager_button_pressed_cb(): Received
    button press event: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)

I also tried looking in the system logs:
 # journalctl -f
A typical set of messages (stretch or buster) for a button press is:
  Aug 09 08:59:34 tough2 pkexec[29498]: pam_unix(polkit-1:session):
    session opened for user root by (uid=1000)
  Aug 09 08:59:34 tough2 pkexec[29498]: farrier: Executing command
    [USER=root] [TTY=unknown] [CWD=/home/farrier]
  [COMMAND=/usr/sbin/xfpm-power-backlight-helper --set-brightness 315]

Turns out xfpm-power-backlight-helper is another application provided by xfce. According to its man page, it's function is to "control the brightness from the command line." I tried that, hoping to view any error messages. It will let me do things like read the current brightness setting. However, even as root, I can't control the brighness:
 # xfpm-power-backlight-helper --set-brightness 315
   This program must only be run through pkexec

I don't know where to go from here. All these messages look similar in stretch versus buster. I think something is intervening between xfpm-power-backlight-helper and the kernel. But what is it, and how can I examine what it is doing?

I should also mention, upgrading to buster also causes some problems with sleep. Is hard to descibe, usually works okay but not always. There has been some recent traffic on debian-xfce regarding sleep. So, once I figure out how to describe that problem, I may post a request on that mailing list. But I thought I should at least mention the sleep problem here in case it is related to backlight.

Thank you for your consideration.

Reply via email to