Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-07-23 18:09:55

ngc3o34
Member
Registered: 2021-07-23
Posts: 7

Backlight control

Hi. I cannot change screen brightness either with function keys or slider in power manager widget.
I'm on Ubuntu 21.04. Handle-brightness-keys - enabled.
Done some digging but cannot make sense of it. Please help.

$ xfce4-power-manager --dump
---------------------------------------------------
       Xfce power manager version 4.16.0
With policykit support
With network manager support
---------------------------------------------------
Can suspend: True
Can hibernate: False
Authorized to suspend: True
Authorized to hibernate: False
Authorized to shutdown: True
Has battery: True
Has brightness panel: True
Has power button: True
Has hibernate button: True
Has sleep button: True
Has battery button: True
Has LID: True
$ ls /sys/class/backlight
amdgpu_bl0 -> ../../devices/pci0000:00/0000:00:08.1/0000:05:00.0/backlight/amdgpu_bl0
ideapad -> ../../devices/pci0000:00/0000:00:14.3/PNP0C09:00/VPC2004:00/backlight/ideapad
$ lspci -vnn | grep -A10 VGA
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117M [GeForce GTX 1650 Ti Mobile] [10de:1f95] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: Lenovo TU117M [GeForce GTX 1650 Ti Mobile] [17aa:3a44]
	Flags: bus master, fast devsel, latency 0, IRQ 82, IOMMU group 9
	Memory at d0000000 (32-bit, non-prefetchable) [size=16M]
	Memory at fc80000000 (64-bit, prefetchable) [size=256M]
	Memory at fc90000000 (64-bit, prefetchable) [size=32M]
	I/O ports at 4000 [size=128]
	Expansion ROM at d1080000 [virtual] [disabled] [size=512K]
	Capabilities: <access denied>
	Kernel driver in use: nvidia
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
--
05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir [1002:1636] (rev c6) (prog-if 00 [VGA controller])
	Subsystem: Lenovo Renoir [17aa:3a44]
	Flags: bus master, fast devsel, latency 0, IRQ 65, IOMMU group 6
	Memory at fca0000000 (64-bit, prefetchable) [size=256M]
	Memory at fcb0000000 (64-bit, prefetchable) [size=2M]
	I/O ports at 1000 [size=256]
	Memory at d1500000 (32-bit, non-prefetchable) [size=512K]
	Capabilities: <access denied>
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

/sys/class/backlight/ideapad/brightness
value changes by fn keys, but not brightness

$ cat /usr/share/X11/xorg.conf.d/10-amdgpu.conf
ection "OutputClass"
	Identifier "AMDgpu"
	MatchDriver "amdgpu"
	Driver "amdgpu"
EndSection

journal contains warning:
amdgpu 0000:05:00.0: amdgpu: Unsupported power profile mode 0 on RENOIR

$ pkaction -v | grep -A12 backlight
org.x.xf86-video-intel.backlight-helper:
  description:       Modify lcd panel brightness
  message:           Authentication is required to modify the lcd panel brightness
  vendor:            The X.Org project
  vendor_url:        https://01.org/linuxgraphics/community/xf86-video-intel
  icon:              brightness
  implicit any:      no
  implicit inactive: no
  implicit active:   yes
  annotation:        org.freedesktop.policykit.exec.path -> /usr/lib/xserver-xorg-video-intel/xf86-video-intel-backlight-helper

org.xfce.mousepad:
  description:       Run Mousepad as root
  message:           Authentication is required to run Mousepad as root.
  vendor:            Mousepad
  vendor_url:        https://xfce.org/
  icon:              org.xfce.mousepad
  implicit any:      no
  implicit inactive: auth_admin
  implicit active:   auth_admin
  annotation:        org.freedesktop.policykit.exec.path -> /usr/bin/mousepad
  annotation:        org.freedesktop.policykit.exec.allow_gui -> true
--
org.xfce.power.backlight-helper:
  description:       Modify the laptop display brightness
  message:           Authentication is required to modify the laptop display brightness
  vendor:            XFCE Power Manager
  vendor_url:        http://goodies.xfce.org/projects/applications/xfce4-power-manager
  icon:              battery
  implicit any:      no
  implicit inactive: no
  implicit active:   yes
  annotation:        org.freedesktop.policykit.exec.path -> /usr/sbin/xfpm-power-backlight-helper

org.xfce.power.xfce4-pm-helper:
  description:       Suspend or hibernate the system
  message:           Authentication is required to place the system in suspend or hibernate mode
  vendor:            XFCE Power Manager
  vendor_url:        http://goodies.xfce.org/projects/applications/xfce4-power-manager
  icon:              battery
  implicit any:      auth_admin
  implicit inactive: auth_admin
  implicit active:   yes
  annotation:        org.freedesktop.policykit.exec.path -> /usr/sbin/xfce4-pm-helper
$ xfce4-power-manager --no-daemon --debug
** (xfce4-power-manager:2347): WARNING **: 00:10:40.161: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.freedesktop.PowerManagement': no such name


** (xfce4-power-manager:2347): WARNING **: 00:10:40.161: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.xfce.PowerManager': no such name

TRACE[xfpm-main.c:210] xfpm_start(): Starting the power manager
TRACE[xfpm-xfconf.c:679] xfpm_xfconf_init(): lock screen TRUE
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for critical-power-level
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for show-brightness-popup
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-exponential
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for hibernate-button-action
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for sleep-button-action
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for battery-button-action
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for lid-action-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for lid-action-on-battery
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-slider-min-level
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-sleep-mode
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for inactivity-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for inactivity-on-battery
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for network-manager-sleep
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-power-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-suspend-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-hibernate-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for heartbeat-command

(xfce4-power-manager:2347): GLib-GObject-WARNING **: 00:10:40.188: ../../../gobject/gsignal.c:2614: signal 'Changed' is invalid for instance '0x55922e022130' of type 'GDBusProxy'
TRACE[xfpm-polkit.c:284] xfpm_polkit_init_data(): Using unix session polkit subject
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2347>, 'start-time': <uint64 167312>}), 'org.freedesktop.login1.power-off', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.power-off is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2347>, 'start-time': <uint64 167312>}), 'org.freedesktop.login1.reboot', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.reboot is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2347>, 'start-time': <uint64 167312>}), 'org.freedesktop.login1.suspend', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2347>, 'start-time': <uint64 167312>}), 'org.freedesktop.login1.hibernate', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=FALSE
TRACE[xfpm-power.c:930] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_ADP0
TRACE[xfpm-power.c:889] xfpm_power_add_device(): 'line-power' device added
TRACE[xfpm-power.c:930] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power.c:889] xfpm_power_add_device(): 'battery' device added
TRACE[xfpm-power.c:898] xfpm_power_add_device(): Battery device type 'battery' detected at: /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 124 : ((XfpmButtonKey) BUTTON_POWER_OFF)

(xfce4-power-manager:2347): xfce4-power-manager-WARNING **: 00:10:40.278: could not map keysym 1008ffa8 to keycode

TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 213 : ((XfpmButtonKey) BUTTON_HIBERNATE)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 150 : ((XfpmButtonKey) BUTTON_SLEEP)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 233 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 232 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 244 : ((XfpmButtonKey) BUTTON_BATTERY)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 238 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_UP)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 237 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_DOWN)
TRACE[xfpm-power.c:930] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/mouse_dev_E6_F0_49_CE_56_07
TRACE[xfpm-power.c:889] xfpm_power_add_device(): 'mouse' device added
TRACE[xfpm-power.c:898] xfpm_power_add_device(): Battery device type 'mouse' detected at: /org/freedesktop/UPower/devices/mouse_dev_E6_F0_49_CE_56_07
TRACE[xfpm-power.c:210] xfpm_power_check_polkit_auth(): using logind suspend backend
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2347>, 'start-time': <uint64 167312>}), 'org.freedesktop.login1.suspend', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2347>, 'start-time': <uint64 167312>}), 'org.freedesktop.login1.hibernate', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=FALSE
TRACE[xfpm-power.c:1446] xfpm_update_blank_time(): Prev Timeout: 300 / New Timeout: 600
TRACE[xfpm-power.c:1446] xfpm_update_blank_time(): Prev Timeout: 600 / New Timeout: 0
TRACE[xfpm-manager.c:645] xfpm_manager_inhibit_sleep_systemd(): Inhibiting systemd sleep: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch

** (xfce4-power-manager:2347): WARNING **: 00:10:40.302: could not get output property
xfce4-power-manager-Message: 00:10:40.332: Set kernel brightness switch to 0
TRACE[xfpm-backlight.c:262] xfpm_backlight_brightness_on_ac_settings_changed(): Alarm on ac timeout changed 9
TRACE[xfpm-backlight.c:283] xfpm_backlight_brightness_on_battery_settings_changed(): Alarm on battery timeout changed 9

(xfce4-power-manager:2347): xfce4-power-manager-WARNING **: 00:10:40.336: Failed to get keyboard max brightness level : GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.UPower.KbdBacklight” on object at path /org/freedesktop/UPower/KbdBacklight
TRACE[xfpm-button.c:114] xfpm_button_filter_x_events(): Key press: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-backlight.c:185] xfpm_backlight_show(): Level 10
TRACE[xfpm-manager.c:365] xfpm_manager_button_pressed_cb(): Received button press event: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-button.c:114] xfpm_button_filter_x_events(): Key press: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-backlight.c:185] xfpm_backlight_show(): Level 12
TRACE[xfpm-manager.c:365] xfpm_manager_button_pressed_cb(): Received button press event: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-button.c:114] xfpm_button_filter_x_events(): Key press: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-backlight.c:185] xfpm_backlight_show(): Level 14
TRACE[xfpm-manager.c:365] xfpm_manager_button_pressed_cb(): Received button press event: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-inhibit.c:462] xfpm_inhibit_get_inhibitors(): Get Inhibitors message received
TRACE[xfpm-inhibit.c:305] xfpm_inhibit_get_inhibit_list(): entering xfpm_inhibit_get_inhibit_list
TRACE[xfpm-main.c:68] xfpm_quit_signal(): sig 2
TRACE[xfpm-manager.c:937] xfpm_manager_stop(): Stopping
TRACE[xfpm-manager.c:262] xfpm_manager_quit(): Exiting
xfce4-power-manager-Message: 00:11:14.253: Restored brightness switch value to: 1

(xfce4-power-manager:2347): Gtk-WARNING **: 00:11:14.253: A floating object was finalized. This means that someone
called g_object_unref() on an object that had only a floating
reference; the initial floating reference is not owned by anyone
and must be removed with g_object_ref_sink().

(xfce4-power-manager:2347): Gtk-WARNING **: 00:11:14.253: A floating object was finalized. This means that someone
called g_object_unref() on an object that had only a floating
reference; the initial floating reference is not owned by anyone
and must be removed with g_object_ref_sink().
TRACE[xfpm-polkit.c:241] xfpm_polkit_free_data(): Destroying Polkit data

pkexec /usr/sbin/xfpm-power-backlight-helper --set-brightness 200
doesn't change brightness

echo 150 | sudo tee /sys/class/backlight/amdgpu_bl0/brightness
this one does

Tried
reinstalling xfce4-power-manager and policykit-1
different GRUB options

Offline

#2 2021-07-23 18:33:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Backlight control

ngc3o34 wrote:

different GRUB options

Which ones did you try? Did any of them end up with only one backlight interface (one entry in /sys/class/backlight)?

Assuming you have an ideapad, this might be useful info. In that case, a newer kernel version solved the problem

Last entry here, which has a Ryzen Renior like you I believe, got it to work by blacklisting the thinkpad_acpi module.

What is the make/model of your notebook?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2021-07-24 08:38:02

ngc3o34
Member
Registered: 2021-07-23
Posts: 7

Re: Backlight control

Hello ToZ
Couple things like "acpi_backlight=vendor". Don't actually know what those do.
thinkpad_acpi - It wasn't loaded. Blacklisted just in case. Didn't help.
Kernel is 5.11.0-25 which is affected. Here https://gitlab.freedesktop.org/drm/amd/-/issues/1438 they found the bug and it is fixed in 5.11.7. So looks like my options either to patch current kernel or wait till October for next Ubuntu release.

$ sudo lshw
description: Notebook
product: 82EY (LENOVO_MT_82EY_BU_idea_FM_IdeaPad Gaming 3 15ARH05)
vendor: LENOVO
version: IdeaPad Gaming 3 15ARH05

- Edit -

$ cat /proc/version_signature
Ubuntu 5.11.0-25.27-generic 5.11.22

Last number is mainline kernel which Ubuntu kernel is based on... so I just added GRUB_CMDLINE_LINUX="amdgpu.backlight=0" and it works!

Thanks a lot smile

Offline

Board footer

Powered by FluxBB