Changes in xfce4-settings-editor

I wanted to change some values in the xfce4 power manager for a test.

By default, in the normal settings app of xfce4, the lowest value for inactivity on battery or ac is 15 (or never).
In the xfce4-settings-manager you can change these values to a lower value as e.g. 10 and you get no error.
The terminal output when running

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-battery

shows the right value of 10, too.

But in the settings app always is always shown "never" for inactivity on battery when you have set the value lower than 15.

Why? Is the setting locked and not allowed and all values below 15 ignored?

The system goes into suspend after the inactivity time I have set, e.g. after 10 minutes, although in the xfce4 settings manager app is shown "never".

What can I do that the normal settings app shows the correct value which is set?

My Guess would be that the Option doesn't exist in the normal Settings App and the ''custom'' Value interferes. So, it takes the lower Value of the Setting which is ''Never'' because it is there the only available one.

To change that, I guess, You have to change the Code of the Program. Maybe @Aravisian can give You the Info.

2 Likes

I found this related problem regarding a later xfce version (4.2). It seems you would have to change it in the source code and compile it with the new values (e.g. set the lowest value for inactivity to 5).
That's too complicated.

It's good to know that you can set lower values, but that they are not shown correctly in the normal settings app and are reset when you move the slider.

Perhaps the source file would look similar for power manager of xfce 4.18 (with other values):

That is the file for xfce 4.18, lines 232 ff

Interesting: In the commits, there's a back-and-forth pattern of changes that affected the lowest value for the inactivity time: 15, 5, 0, 15...

1 Like

I'm curious about how to allow more values in the UI, so I tried compiling xfce4-power-manager in a live session. Unfortunately, I don't see any changes. What am I doing wrong?

I installed all needed packages with

sudo apt install build-essential meson libupower-glib-dev xfce4-dev-tools
sudo apt build-dep xfce4-power-manager

I had to add source code to my sources in Software&Updates.

I uninstalled xfce4-power-manager. Then I downloaded a tarball from Launchpad xfce4-power-manager_4.18.3.orig.tar.bz2 (because gitlab was offline), extracted it and went to the file data > interfaces > xfpm-settings.ui and changed the value in the lines 233 and 241 "lower" from 14 to 4.
Then I followed the README

./configure
make 
sudo make install

and it seemed to have worked.
I logged out and back in and opened the settings app > power manager and was asked if I want to run it.

I'm not sure if something is missing? In the folder where I edited the file were some makefiles, too. Do I first need to compile something there?

Did You checked the Version from Your Power Manager? Only to be sure that it is really the one You wanted.

No, I haven't checked that. I didn't know which package (there were three in launchpad) to choose. It is a bit complicated because although Zorin 17 Lite is based on Ubuntu 22.04 it uses xfce4 4.18 and not 4.16 which is used in ubuntu jammy. So I fetched a 4.18 package for ubuntu noble with the most MiB (because the others were just KiB).

I don't know if that was right.
I ran

sudo make uninstall

now, and that seemed to have removed the compiled xfce4 power manager. No icon for power management is shown now in the settings app. That's good.

When I install xfce4 power manager via apt, it is version 4.18.3-2.

I tried to edit the file xfpm-settings_ui.h, too, which is in the same folder, but it didn't help.

Hm, I noticed something. When I remove these lines from xfpm-xconf.c at folder src

/**
   * XfpmXfconf::inactivity-on-ac
   **/
  g_object_class_install_property (object_class,
                                   PROP_IDLE_ON_AC,
                                   g_param_spec_uint (ON_AC_INACTIVITY_TIMEOUT,
                                                      NULL, NULL,
                                                      0,
                                                      G_MAXUINT,
                                                      14,
                                                      G_PARAM_READWRITE));

  /**
   * XfpmXfconf::inactivity-on-battery
   **/
  g_object_class_install_property (object_class,
                                   PROP_IDLE_ON_BATTERY,
                                   g_param_spec_uint (ON_BATTERY_INACTIVITY_TIMEOUT,
                                                      NULL, NULL,
                                                      0,
                                                      G_MAXUINT,
                                                      14,
                                                      G_PARAM_READWRITE));

I can move the slider below 15 and xfce4-settings-editor shows the right values 14,13,12,11...during moving the slider to the left side, but the normal xfce4-power-manager app always shows "never". The span is bigger then.
14 seems to be in 4.18 the value which is the default for "never".
But I don't understand what I'm doing here. I want to find out why it does not show the correct values in the slider but "never".