No unit for system power saving timeout

Bug #1819904 reported by Jarno Suni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Xfce4 Power Manager
Fix Released
Medium
xfce4-power-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

See the attached screenshot.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: xfce4-power-manager 1.6.1-0ubuntu1
ProcVersionSignature: Ubuntu 4.18.0-16.17~18.04.1-generic 4.18.20
Uname: Linux 4.18.0-16-generic x86_64
NonfreeKernelModules: wl nvidia
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
CurrentDesktop: XFCE
Date: Wed Mar 13 14:02:59 2019
EcryptfsInUse: Yes
InstallationDate: Installed on 2017-01-05 (796 days ago)
InstallationMedia: Xubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
SourcePackage: xfce4-power-manager
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Gre0 (gre0) wrote :

Created attachment 7724
missing 'Minutes' ?

I have made some screenshots but they are in german...I hope the problem is still obvious.

I think there should be 'Minutes' 'Hours' or also something like '1 hour 24 minutes'
In my case i see only a '5' at a width sliding range.

Revision history for this message
In , Gre0 (gre0) wrote :

Created attachment 7725
missing 'Hour' ?

Revision history for this message
In , Gre0 (gre0) wrote :

Created attachment 7726
missing 'hour and ...' ?

Revision history for this message
In , Gre0 (gre0) wrote :

Created attachment 7727
missing 'minutes' at Light-Locker settings

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

Created attachment 8000
underscore separated values

I can confirm this issue.
Not reported here, those values under the sliders are not centered, just when the cursor hovers them, they are shifted to the correct position.
Some sliders are also a bit wider than the other near to it, only after changing their values the width becomes correct.

I made a hacky modification so that values are underscore-separated, see the attached picture. So indeed, GtkSlider seems to be truncating strings on whitespace.

The last gtk2 release (1.4.4), works correctly. So it seems to be a regression caused by the gtk3 port or in gtk3 itself, the minimal supported version is 3.14, maybe it's worth the shot checking how it behaves in 16.06 (gtk 3.18).

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

Created attachment 8003
sample.c

I was able to test xfce4-power-manager from git master with Xubuntu 16.04, with its stock gtk 3.18.9 all looks good, but upgrading to 3.20.8 (via gnome3-team ppa) the glitch starts to manifest.

Some change between those releases introduced a behavior that broke xfce4-power-manager.
Last time I built gtk and installed system wide, it messed lots of things, so I'm not in the mood to bisect.

Some day gtk devs could drop this format-value feature[1], so I think the proposed replacement makes sense (i.e. use labels).

The attached (quick and dirt) sample demonstrates the current broken behavior and what would look like the replacement with plain labels.

1 - https://gitlab.gnome.org/GNOME/gtk/issues/113#note_83187

Revision history for this message
In , Reg-xfce (reg-xfce) wrote :

Similar issue:
$ xfce4-power-manager-settings -V
This is xfce4-power-manager version 1.6.1, running on Xfce 4.12.
Built with GTK+ 3.22.26, linked with GTK+ 3.22.30.

The values displayed for the slider "system-sleep-inactivity-on-battery" are as follows:

Never, 15, 16, ..., 58, 59, One, One, ..., One, 2 hours, 2, ..., 2, 3 hours, 3, ..., 3, 4 hours, 4, ..., 4, 5 hours, 5, 5, ...

I would expect the following values:

Never, 15 minutes, 16 minutes, ..., 59 minutes, One hour, One hour one minute, One hour 2 minutes, ..., One hour 59 minutes, 2 hours, ...

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

Created attachment 8157
WIP Patch

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

*** Bug 15143 has been marked as a duplicate of this bug. ***

Revision history for this message
Jarno Suni (jarnos) wrote :
Changed in xfce4-power-manager:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Simon Steinbeiß (ochosi) wrote :

From my perspective the workaround approach is ok. The only remark I have is that I would
- only apply the provider to the style context of the scale widgets and
- set the label insensitive (gtk_widget_set_insensitive) to mimick the previous style

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

Created attachment 8395
0001-Fix-slider-labels-Bug-14395.patch

(In reply to Simon Steinbeiss from comment #9)
> - only apply the provider to the style context of the scale widgets
Thunar uses gtk_style_context_add_provider_for_screen, so I don't think it's really that bad.

> - set the label insensitive (gtk_widget_set_insensitive) to mimick the
> previous style
Done.

Revision history for this message
In , Gitbot (gitbot) wrote :

Andre Miranda referenced this bugreport in commit 67582a97fc57810cefd78c271aed4660dbd93dfe

Fix slider labels (Bug #14395)

https://git.xfce.org/xfce/xfce4-power-manager/commit?id=67582a97fc57810cefd78c271aed4660dbd93dfe

Revision history for this message
In , Simon Steinbeiß (ochosi) wrote :

Looks good and gets the job done. Thanks for the patch!

Changed in xfce4-power-manager:
status: Confirmed → Fix Released
Revision history for this message
Sean Davis (bluesabre) wrote :

Reportedly fixed in xfce4-power-manager 1.6.2

Changed in xfce4-power-manager (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.