Changes in xfce4-settings-editor

Um... No... It has been there for quite a while...

In version 4.16, there was a bit of back and forth over the Minimum amount - but that was five minutes, not fifteen.

The user which made successful changes in the gui wrote that they edited the xfpm-settings.ui file (but it was another xfce version and they wanted to expand the rearward range).

But I didn't get it to work. Maybe I made something wrong or it is because 4.18 has other source files than 4.2 and you need to edit other files additionally to settings.ui in 4.18.

I tested now a Zorin 18.1 Lite live session, and I'm really wondering why the power-manager version is not the same version as the xfce4 version.
Xfce4 version is shown as 4.2 and power-manager 4.18 and there are no updates available for the power-manager. I always thought in the current xfce versions the power-manager has the same number as the related xfce4 version. Perhaps that is a Zorin thing.

I downloaded the source package for xfce4 power manager from ubuntu resolute raccoon which is version 4.2 and compiled it on Zorin 18.1 Lite (live session). But I'm not sure if that breaks something.
The slider shows lower values now.

Why didn't Zorin 18.1 Lite port the xfce4-power-manager to 4.2 version when they changed the xfce4 version to a higher version (unlike Xubuntu 24)?

But both versions are not very user-friendly regarding the gui of xfce4-power-manager.
The Power manager version 4.2 has other disadvantages than 4.18 - you can't see higher values than 60 minutes for inactivity time there in the gui, even when you can set them in the settings editor or terminal.

I have set 120 minutes for inactivity time for suspend in the settings editor, but the gui shows 60 minutes which is the highest value there which can be shown by default (whithout making changes in the source code).

Next I'll try to compile xfce4-power-manager 4.2 on Zorin 17 Lite live session to see what happens then and I'll adjust the 60 min to a higher value before I compile it.

Hm...I got errors during configuring. Probably it doesn't work when the xfce4 version is 4.18:
"The required package libxfce4util-1.0 was found on your system, but the installed version (4.18.1) is too old. Please upgrade libxfce4util-1.0 to atleast version 4.19.4, or adjust the PKG_CONFIG_PATH environment variable if you installed the new version of the package in a nonstandard prefix so pkg-config is able to find it."

Do you see "3 minutes" at the slider for the standard, unmodified xfce4-power-manager version 4.18 at tab system?

Yes, and did so on 4.16 and 4.12, as well.
Further, you can independently verify this by looking up Web Images of the same - you can see it is present in 4.16 and 4.12... not just in 4.18 and 4.20.

For the system's autosuspend?

Perhaps because you have a PC. I find it really stupid that the xfce4 settings editor doesn't show the same values as the power manager and there is no note in the settings editor that it can not be synchrronized.

Yes.

Here, 4.12:

4.16 (Display, but system shows it, too. I am using what I can find on the interwebs):

I am at a loss as to why your system seems different... than everyone else.

I don't see on your screenshot values for suspending the system (I'm not talking about the display) after an inactivity time of <15 minutes.

Look...

All I can tell you... is the truth. It has shown the values since 4.12, a decade ago. I used 4.12.
I suggested you do a netsearch. When you questioned my claim, I did a Quick NetSearch For You.
If you are unhappy with what they show... Narrow the search field and verify for yourself.

Further, the XFCE documentation and changelogs archived the existence of this feature in PowerManager > Settings over the course of years, including the 4.16 change in the introduced minimum time (five minutes) which was reverted back to one minute.

The difference between Gnome and XFCE is that on Gnome, it takes a timestamp in seconds. XFCE takes it in minutes since... if you are specifying seconds to sleep, you might have other concerns to address.

I have not found yet a single picture or solutions for that problem besides compiling.
The only thing that bothers me is that it isn't displayed correctly!!! There is a feature that lets you set the suspend time to less than 15 minutes, but it's displayed incorrectly in the GUI of power-manager. In the newer 4.2 version, this affects values greater than 60 minutes.

XFCE is a chaos of screensavers and suspending settings.

I have gathered that you are experiencing this, however, I am not sure that you have accepted that this may be exclusive to your build.
It is not standard XFCE power manager behavior. You are experiencing some kind of bug or file corruption; not a settings inhibition.

I do not know why you are. Or what caused it.

I agree that it is annoying. It is annoying because many distros ship two different applications:
XFCE-Screensaver
and
The PowerManager that is included.

What they are supposed to do is ship one, or ship both but disable one so they do not conflict. Many distro's don't. You end up with both running and they can conflict.
I have never seen them conflict in a way that leads to the GUI displaying incorrectly.
But the PowerManager settings are included in XFCE, whereas XFCE-Screensaver is a separate application.

XFCE-Screensaver was actually an independent fork of MATE-Screensaver, that Sean later absorbed it into XFCE and became its maintainer.

I'm at a loss. Everywhere else I tested it, it was the same. Other laptop, new user, distrosea...I'll check my LM XFCE laptop later if it is the same there.
(Edit: It is the same issue on LM 21 XFCE. When I entered
xfce4-power-manager --version
to check the version, there was shown
"Xfce Power Manager 4.18.1
Part of the Xfce Goodies Project...").

I always thought my settings in power manager are reset as soon as I open it (after I made changes in settings editor). Now I know they are just not displayed.

Perhaps there are some conflicts. I already have disabled the external xfce screensaver on Zorin to avoid problems.
There is no general problem with synchronization. Inactivity times and values that fall within the power manager's normal range are displayed correctly when they are changed in the settings editor. For me, the code of the settings.ui of 4.18 power-manager looks as if it does not show values below 15.

The xfce docs site for the power manager shows:
"System Power Saving
Put system to sleep when inactive for — Sets the duration of inactivity before the specified sleep mode is entered. The minimum duration you can set with the slider is 15 minutes."

<object class="GtkAdjustment" id="system-sleep-inactivity-on-ac-adjustment">
    <property name="lower">14</property>
    <property name="upper">370</property>

(14 is disabled=never)

I'm not convinced that this is a bug that only occurs on my system. It's designed that way on purpose and it is hard-coded. In 4.2, the range of the slider is from 0 to 60, and all values outside that range are not displayed.
I think all users who can see any custom values they set in power manager, e.g. from 0 to 500, have a modified, self compiled version.

It's surprising that there are nearly no reports of this bug and that nobody seems to be bothered by it.

1 Like

@wsmather

Would you please do me a favor and check on your Zorin 18 Lite computer what appears under Settings > Power Manager > System when you enter the following command in the terminal:

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-ac -s 5

and take a screenshot of the power-manager window, tab system - plugged in/on ac and post it here?

You can change the slider back afterwards to the value you had set before for the time on ac.

Edit: @wsmather, the matter has been resolved in the meantime, so I no longer need your help.

I am on:

xfce4-power-manager --version
Xfce Power Manager 4.20.0

@Forpli, it looks like we are both right, actually.
What is important to you: Is that you are.
XFCE 4.20 did bring a change to how that value is displayed.

And, this means that you are correct, and I was wrong, this is not a bug that only you are experiencing.

Yes, the value is shown beneath the slider. But, if you set it to a time below fifteen minutes on 4.18, it will not display that time and show "Never", just as you said.
Shown in this Bug Report:

And you showed the same above.

Where my bias is: I do not tend to just install a distro and use it.
I use the higher XFCE repository and have for a long time.

sudo add-apt-repository ppa:xubuntu-dev/experimental

Which shows:

apt policy xfce4-power-manager ─╯
xfce4-power-manager:
Installed: 4.20.0-1~bpo24.04
Candidate: 4.20.0-1~bpo24.04

This might save you a headache. Use the Dev PPA, then

sudo apt install xfce4-power-manager xfce4-power-manager-data

If you prefer to safely upgrade the entire desktop:

sudo apt install --reinstall xfce4 xfce4-goodies

to up your system to 4.20 which has that fixed.

1 Like

I took a look at the experimental xubuntu dev ppa yesterday, but there is no xfce4 version available for jammy, only for noble.

Ah, you are right. It moves upward incrementally...
So much for making it easy. I need to get some work done right now, but will look at a wrapper for you in a bit.
That way, you can just install and be done.

My overconfidence, skim reading led you on an unnecessary chase in this thread.
I am sorry about that.

1 Like

No problem, I'll use the normal xfce4 4.18 version of xfpm on my system.
I just wondered if that could be changed easily, and that is not possible because it is hard-coded.

I'm more interested how I could change the original 4.18 version in a test in a live session so that it can show the values and to learn a bit more about compiling.

What do I need to change here so that for 0 and 14 is shown "never" and for other values the minutes or hour?

I tried to set
if ( value = 14 )
and kept the other ones, but then all values in the slider were shown as "never"

Maybe try:

if ( value < 1 )
    return g_strudup (_("Never"));

When I understand Your Picture right, it shows Never when the Value is 14 or below.

1 Like

Changing the line to

if ( value < 1 )
    return g_strudup (_("Never"));

did not make what I wanted to see. The slider started with 14.

In that very old commit they change the xfpm-settings.ui, the xfpm-settings.c and xfpm-manager.c files.

I tried to change the lines in my files similar as in the attachment but without success. But I'm sure now that it is not enough in 4.18 to edit only xfpm-settings.ui because of the code which sets 14 minutes as the value for disabled system-sleep. I suspect, in 4.2 you can easier change things to extend the normal range of the slider higher than 60.

Perhaps I need to adjust that line at xfpm-settings.c, too?

val = xfconf_channel_get_uint (channel, XFPM_PROPERTIES_PREFIX ON_BATTERY_INACTIVITY_TIMEOUT, 14);
  gtk_range_set_value (GTK_RANGE (inact_timeout), val);

I'm not quite sure what I have to do to clean up after a compiling test to remove everything I installed before. Perhaps the new tests didn't start with fresh files.
I used "sudo make uninstall" and "make clean", removed the extracted xfce4 power manager folder and logged out, but I don't know if that is enough.

I also tried to configure xfpm with prefix home, but then the power manager was not shown in the settings app and I had to start it manually with clicking on the binary files with the cogwheel icon in my user's home directory. You must know a lot about codes to understand that...To me, it is difficult to find out how I can change the xfpm's behavior.

I'll try it with this commit:

I don't understand why it was reverted at the same day it was published (16.1.2024). Did it make problems?

I had already edited all those four files in my last trial, but not changed all lines this way.

Edit:
I don't know what I'm doing wrong. It just won't work. The slider still starts with 14.