Bug 199166 - sysutils/xfce4-power-manager: allocates ALL memory
Summary: sysutils/xfce4-power-manager: allocates ALL memory
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Martin Wilke
Depends on:
Reported: 2015-04-04 20:29 UTC by Thomas E. Spanjaard
Modified: 2017-12-17 07:13 UTC (History)
10 users (show)

See Also:
bugzilla: maintainer-feedback? (xfce)

Patch to update sysutils/xfce4-power-manager to 1.5.1 (3.01 KB, patch)
2015-06-08 16:12 UTC, Olivier Duchateau
no flags Details | Diff
xfce4-power-manager --debug (7.55 KB, text/plain)
2015-06-10 21:58 UTC, palik
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas E. Spanjaard 2015-04-04 20:29:34 UTC
If I start up xfce4, xfce4-power-manager starts eating all memory, swap, and then dies when it can't allocate anymore:

id 1098 (xfpm-power-backligh), uid 1001, was killed: out of swap space

For clarity, I don't even have a backlight, this is a regular desktop system.

This is rather annoying as xfce4-power-manager is required to be able to log out of xfce4 (or at least, with it uninstalled I seem to be unable to log out).

FreeBSD dopefish.deep.deepslack.eu 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r280268: Thu Mar 19 22:30:33 UTC 2015 tgen@dopefish.deep.deepslack.eu:/usr/obj/usr/home/tgen/Work/FreeBSD-HEAD/sys/DOPEFISH  amd64

xfce4-power-manager version: xfce4-power-manager-1.4.4
Comment 1 Olivier Duchateau freebsd_committer 2015-04-05 17:38:15 UTC
(In reply to Thomas E. Spanjaard from comment #0)

xfce4-power-manager is not required to log out your session. It manages power consumption.
How your Xfce session is started?
Comment 2 Lev A. Serebryakov freebsd_committer 2015-04-11 20:14:27 UTC
I have same problem on old Sony Vaio laptop with current system.

Session is started by slim login manager via xfce.desktop file ("startxfce4")

Before latest update it worked. Ok, I could not change backlight, but it didn't spent ~5 minutes tharshing my HDD with swapping.
Comment 3 palik 2015-06-01 15:21:09 UTC
Same issue started to occur occasionally on my HP Folio 9470m in last time.

Name           : xfce4-power-manager
Version        : 1.5.0
Installed on   : Thu May 28 18:23:50 CEST 2015

uname -a
FreeBSD pa-hpbook 11.0-CURRENT FreeBSD 11.0-CURRENT #1 r264145: Sat Apr  5 21:20:21 CEST 2014     palik@pa-hpbook:/usr/obj/usr/src/sys/MYIPSEC  amd64



pid 1873 (xfpm-power-backligh), uid 1001, was killed: out of swap space
pid 1443 (Xorg), uid 0, was killed: out of swap space
Comment 4 Olivier Duchateau freebsd_committer 2015-06-06 14:28:11 UTC
Someone can test sysutils/xfce4-power-manager with sysutils/upower > 0.99.0 [1]?
(I'm using upower 0.99.2, and I can't find why CPU increases.)

Users of FreeBSD current, may I have output of sysctl -a | grep hw.acpi.video?

[1] bug #200541
Comment 5 Olivier Duchateau freebsd_committer 2015-06-08 16:11:05 UTC
New release 1.5.1 is available in Xfce repository. If someone can test it (debug symbols are set).

Before update sysutils/xfce4-power-manager:

1. kill xfce4-power-manager daemon
2. Update sysutils/upower (bug #200541)
3. Apply patch, in order to update sysutils/xfce4-power-manager

Then run xfce4-power-manager daemon (with debug option):

xfce4-power-manager --debug

If CPU increases, please send output.

Note: Since this release, there's hidden option for panel plugin.

By default next to icon, a label is displayed (it shows percentage and remaining time)

To hide this label, new property /xfce4-power-manager/show-panel-label must be created:

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/show-panel-label -n -t int -s 0

Possible values are:
* 0 -> don't show label
* 1 -> displays only percentage
* 2 -> displays only remaining time
* 3 -> displays percentage and remaining time (default value)
Comment 6 Olivier Duchateau freebsd_committer 2015-06-08 16:12:30 UTC
Created attachment 157536 [details]
Patch to update sysutils/xfce4-power-manager to 1.5.1

Patch to update sysutils/xfce4-power-manager 1.5.1 with debug symbols.
Comment 7 palik 2015-06-10 21:35:26 UTC
(In reply to Olivier Duchateau from comment #4)


> sysctl -a | grep hw.acpi.video
no output
Comment 8 palik 2015-06-10 21:53:52 UTC
(In reply to Olivier Duchateau from comment #5)
> If CPU increases, please send output.
CPU works OK, but the message "was killed: out of swap space" still there.
Comment 9 palik 2015-06-10 21:58:44 UTC
Created attachment 157624 [details]
xfce4-power-manager --debug

Comment 10 Sean Bruno freebsd_committer 2015-06-18 01:31:11 UTC
Unpatched, mine is currently using:

 1072 sbruno        2  21    0   177M 25876K select  3   2:23   0.00% xfce4-power-manager

How long do I need to let this run?
Comment 11 Tiago Mello 2015-08-12 13:31:15 UTC
I see the same issue on: Thinkpad T420 (4180LVP)
Comment 12 Kevin Zheng 2016-04-30 16:43:38 UTC
I'm noticing a memory leak with xfce4-power-manager-1.6.0, too. I have upower-0.99.3 installed. Hardware is a ThinkPad T420, no backlight available.

--- uname -a ---
FreeBSD foxtrot.*** 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 02:10:02 UTC 2016     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

--- .xinitrc ---
xset b off
exec startxfce4 --with-ck-launch

Perhaps a red herring, but with the notification icon initially on, turning it off in the preferences gives this message when running with --debug:

TRACE[xfpm-manager.c:721] xfpm_manager_tray_update_icon(): updating icon
TRACE[xfpm-manager.c:705] xfpm_manager_tray_update_tooltip(): updating tooltip
TRACE[xfpm-xfconf.c:203] xfpm_xfconf_property_changed_cb(): Property modified: /xfce4-power-manager/show-tray-icon

(xfce4-power-manager:12802): Gtk-WARNING **: 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().
Comment 13 Kevin Zheng 2016-05-04 20:54:29 UTC
It looks like this memory leak only occurs when the system tray icon is enabled. Turning it off works around the memory leak for me. Can other people confirm this?
Comment 14 Kevin Zheng 2016-05-11 07:30:18 UTC
Apparently this issue has been traced upstream to glib:
Comment 15 Rene Ladan freebsd_committer 2017-03-19 13:45:41 UTC
maintainer reset
Comment 16 Martin Wilke freebsd_committer 2017-04-10 14:40:01 UTC

Is the problem still existing with the current ports tree?
Comment 17 Guido Falsi freebsd_committer 2017-09-28 10:02:03 UTC
Is this still a problem? The power manager has been updated to 1.6.0 in the while.

If I get no feedback in a few days I'm going to close the issue.

Comment 18 Kevin Zheng 2017-09-28 16:12:28 UTC
(In reply to Guido Falsi from comment #17)
Not for me.
Comment 19 Guido Falsi freebsd_committer 2017-09-28 17:36:18 UTC
(In reply to Kevin Zheng from comment #18)
> (In reply to Guido Falsi from comment #17)
> Not for me.

Sorry ut I can't unambiguously parse your reply.

Not for me means:

- it's not a problem for me anymore, now it works

- it's not been solved for me, still allocates all memory

Can you clarify? Thanks.
Comment 20 Kevin Zheng 2017-09-28 19:39:18 UTC
(In reply to Guido Falsi from comment #19)
Sorry, I was a bit terse.

I can't reproduce the issue, it seems to work.
Comment 21 Guido Falsi freebsd_committer 2017-10-01 09:08:37 UTC
Closing bug.

The original problem seems t be fixed. User not able to reproduce anymore.
Comment 22 vali gholami 2017-12-17 07:13:04 UTC