Skip to main content
Topic: Xfce4-power-manager works weirdly after udev upgrade (Read 2076 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Xfce4-power-manager works weirdly after udev upgrade

So, I finally upgraded my system and obtained the new version of udev by potteringware inc. I was expecting troubles with wifi as some other people, but wifi seems to be working okay, just the device name was changed.

But now xfce4-power-manager doesn't show its image in the system tray (see screenshot; the empty space in the tray is where the battery icon should be). I use openbox + tint2, no xfce4 session or settings daemon or whatever, and until now everything worked without any issue. I experienced this bug in Void, but I figured out that it was caused by the absence of the upower package (in Void, xfce4-power-manager is not dependent on upower, which is a bit of mistake). So, this bug was caused by the fact that xfce4-power-manager wasn't able to find certain power devices, which upower service provides to it. Here in Artix I always had upower installed, ofc, because package dependencies are specified wisely here.

The second thing is, the backlight-openrc daemon ceased to work and it no longer restores the screen brightness which I keep around 95% (see screenshot, it's 100% after reboot). EDIT: but perhaps it's again bugged xfce4-power-manager who messes up the screen brightness.

I use Dell Inspiron 5558 laptop, my system bus is:
Code: [Select]
$ lspci | grep SMBus
00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03)

Re: Xfce4-power-manager works weirdly after udev upgrade

Reply #1
The second thing is, the backlight-openrc daemon ceased to work and it no longer restores the screen brightness which I keep around 95% (see screenshot, it's 100% after reboot). EDIT: but perhaps it's again bugged xfce4-power-manager who messes up the screen brightness.

As I don't need a power-manager:
Code: [Select]
sudo pacman -Sy acpilight
(a backward-compatibile xbacklight replacement)

Then, create 4 or 5 launchers in a toolbar
xbacklight = 1
xbacklight = 10
xbacklight = 50
xbacklight = 100

Run one of these commands at startup (autostart) to obtain the desired brightness.

Re: Xfce4-power-manager works weirdly after udev upgrade

Reply #2
Thank you, it's a viable option.

There is a third way to control the screen brightness, though. You see, I use redshift, and with redshift you can automatically control the screen brightness (and do this separately for day and night). But I don't use it because I don't need. Well, I didn't need. Nevertheless, the power manager does in general a bit more than mere brightness control.

It seems that kernel initializes the SMBus correctly:
Code: [Select]
$ sudo dmesg | grep 00:1f.3
[    0.269155] pci 0000:00:1f.3: [8086:9ca2] type 00 class 0x0c0500
[    0.269171] pci 0000:00:1f.3: reg 0x10: [mem 0xf7318000-0xf73180ff 64bit]
[    0.269190] pci 0000:00:1f.3: reg 0x20: [io  0xf040-0xf05f]
[    8.755485] i801_smbus 0000:00:1f.3: SPD Write Disable is set
[    8.755527] i801_smbus 0000:00:1f.3: SMBus using PCI interrupt

And also it correctly identifies that the battery is off:
Code: [Select]
$ sudo dmesg | grep -i battery
[    0.576492] battery: ACPI: Battery Slot [BAT0] (battery absent)

So, xfce4-PM should display a picture in the tray for an empty battery, but it doesn't. When I start it via the terminal, it writes a lot of nonsense:
Code: [Select]
** (xfce4-power-manager:2582): WARNING **: 16:08:34.279: 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:2582): WARNING **: 16:08:34.280: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.xfce.PowerManager': no such name


(xfce4-power-manager:2582): xfce4-power-manager-WARNING **: 16:08:34.283: Unable to connect to session manager : Verbindung zur Sitzungsverwaltung fehlgeschlagen: SESSION_MANAGER environment variable not defined

(xfce4-power-manager:2582): GLib-GObject-WARNING **: 16:08:34.505: ../glib/gobject/gsignal.c:2614: signal 'Changed' is invalid for instance '0x5566a23628e0' of type 'GDBusProxy'

(xfce4-power-manager:2582): xfce4-power-manager-WARNING **: 16:08:34.544: could not map keysym 1008ffa8 to keycode


(xfce4-power-manager:2582): xfce4-power-manager-WARNING **: 16:08:34.556: It seems the kernel brightness switch handling value was not restored properly on exit last time, xfce4-power-manager will try to restore it this time.

(xfce4-power-manager:2582): xfce4-power-manager-WARNING **: 16:08:34.557: Unable to set the kernel brightness switch parameter to 0.

(xfce4-power-manager:2582): xfce4-power-manager-WARNING **: 16:08:34.724: ../panel-plugins/power-manager-plugin/power-manager-button.c:858: invalid property id 2 for "show-panel-label" of type 'GParamInt' in 'PowerManagerButton'

(xfce4-power-manager:2582): xfce4-power-manager-WARNING **: 16:08:34.724: ../panel-plugins/power-manager-plugin/power-manager-button.c:858: invalid property id 3 for "presentation-mode" of type 'GParamBoolean' in 'PowerManagerButton'

(xfce4-power-manager:2582): xfce4-power-manager-WARNING **: 16:08:34.724: ../panel-plugins/power-manager-plugin/power-manager-button.c:858: invalid property id 4 for "show-presentation-indicator" of type 'GParamBoolean' in 'PowerManagerButton'

(xfce4-power-manager:2582): Gtk-CRITICAL **: 16:08:34.785: gtk_icon_theme_has_icon: assertion 'icon_name != NULL' failed

(xfce4-power-manager:2582): Gtk-CRITICAL **: 16:08:34.797: gtk_status_icon_set_from_icon_name: assertion 'icon_name != NULL' failed

That's its usual whining, it writes the same in Debian (where it works correctly) except for the last two strings related to icons. So, for some reason, it has icon_name == NULL somewhere in its entrails. Thus, the question is, why this happens and how to make the manager happy.

Re: Xfce4-power-manager works weirdly after udev upgrade

Reply #3
There is a third way to control the screen brightness, though. You see, I use redshift, and with redshift you can automatically control the screen brightness (and do this separately for day and night).
Very interesting !
A few days ago I was looking for this kind of app and didn't know if it exists. But for my laptop I don't see the need for it at the moment.
And since I took out the batteries, I uninstalled xfce4-power-manager.

Re: Xfce4-power-manager works weirdly after udev upgrade

Reply #4
Very interesting !
A few days ago I was looking for this kind of app and didn't know if it exists. But for my laptop I don't see the need for it at the moment.
And since I took out the batteries, I uninstalled xfce4-power-manager.
That's not the primary goal of redshift. It is used mainly for reducing the blue light of the screen during the nighttime, which makes it easier for your eyes and reduces eye strain as well. But this somewhat distorts colors which may be inappropriate for you, since, according to your youtube channel, you work with graphics.

I know that I can replace xfce4-power-manager with acpid and laptop-mode-tools, and I can also add a battery indicator to tint2 itself, but I've been using this power manager for years now, and everything used to be OK.

Re: Xfce4-power-manager works weirdly after udev upgrade

Reply #5
That's not the primary goal of redshift. It is used mainly for reducing the blue light of the screen during the nighttime, which makes it easier for your eyes and reduces eye strain as well. But this somewhat distorts colors which may be inappropriate for you, since, according to your youtube channel, you work with graphics.
Ah OK. I went to the site http://jonls.dk/redshift/
I prefer to reduce the brightness when reading text on a white background. And there my icons to adjust the brightness are very practical.

Quote
I know that I can replace xfce4-power-manager with acpid and laptop-mode-tools, and I can also add a battery indicator to tint2 itself, but I've been using this power manager for years now, and everything used to be OK.
Yes I understand.
I just offered my little "cooking recipe" to get around part of the problem you are currently having with Xfce4-power-manager.

Re: Xfce4-power-manager works weirdly after udev upgrade

Reply #6
I know this is a bit late, but were you able to get backlight-openrc working? My computer hasn't been saving the screen brightness after I restart it. Was able to set a udev rule to set the backlight level at boot, though.

Re: Xfce4-power-manager works weirdly after udev upgrade

Reply #7
I know this is a bit late, but were you able to get backlight-openrc working? My computer hasn't been saving the screen brightness after I restart it. Was able to set a udev rule to set the backlight level at boot, though.
No.
backlight-openrc is installed but does not restore brightness setting on restart. I haven't tried to make it work.
This is why I am using acpilight (see above).

I just retested xorg-xbacklight, but it doesn't seem to work:
Code: [Select]
xbacklight -get
No outputs have backlight property

Re: Xfce4-power-manager works weirdly after udev upgrade

Reply #8
I see. Thank you for responding back.
What's interesting is that I switched to linux-lts yesterday, and the issue I was dealing with changed. Originally, when I would boot up my computer, the login screen would come in completely dimmed. Now the login screen is fine, but after I login the screen's at 100% brightness, whether or not I have backlight-openrc enabled. I guess the best thing we can do unless someone is able to figure what's wrong with the Power Manager (assuming that's the problem) is to do what you two and I did and use other programs and system settings to take care of it.

If anyone else is dealing with this problem, here's the link to the Arch Wiki article that I used to solve it:

https://wiki.archlinux.org/title/Backlight#ACPI

Re: Xfce4-power-manager works weirdly after udev upgrade

Reply #9
Sorry for a kind of necroposting, but the problem still exists. The issue is not in udev (I've tried installing eudev 3.2.10 from AUR for no effect). The roots of this problem lie deeper. When I run upower -d it doesn't show the icon name for the battery:
Code: [Select]
Device: /org/freedesktop/UPower/devices/line_power_AC
  native-path:          AC
  power supply:         yes
  updated:              Mo 01 Nov 2021 16:00:33 MSK (985 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    warning-level:       none
    online:              yes
    icon-name:          'ac-adapter-symbolic'

Device: /org/freedesktop/UPower/devices/DisplayDevice
  power supply:         no
  updated:              Mo 01 Nov 2021 16:00:33 MSK (985 seconds ago)
  has history:          no
  has statistics:       no
  unknown
    warning-level:       none
    percentage:          0%
    icon-name:          ''

Daemon:
  daemon-version:  0.99.13
  on-battery:      no
  lid-is-closed:   no
  lid-is-present:  yes
  critical-action: HybridSleep

The problem is although not even in upower or upowerd, the thing is, there is no battery module in Artix kernels at all except for linux-hardened (from Arch, I suppose)!
Code: [Select]
$ pacman -Fx acpi/battery.ko
usr/lib/modules/5.14.14-hardened1-1-hardened/kernel/drivers/acpi/battery.ko.zst ist in extra/linux-hardened 5.14.14.hardened1-1 enthalten

This is the module which is loaded by default in my Void and Debian installations where everything works fine. But where is it in Artix kernels?

 

Re: Xfce4-power-manager works weirdly after udev upgrade

Reply #11
Ah, thanks.

As of now, I've built a new desktop rig and work from it, so my old laptop is in less use. I still don't know what caused this minor but somewhat annoying issue, perhaps it's an Xfce PM bug (I've read on the internet, people complain here and there). Maybe I'll try a fresh Artix install on my laptop.