xfce4-cpufreq-plugin issueshttps://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues2023-04-21T20:40:39Zhttps://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/5Panel font size in pixels instead of points2023-04-21T20:40:39ZBugzilla MigrationPanel font size in pixels instead of points## Submitted by Frash
Assigned to **Xfce-Goodies Maintainers**
**[Link to original bug (#16456)](https://bugzilla.xfce.org/show_bug.cgi?id=16456)**
## Description
Created attachment 9463
Patch
Xfce4-cpufreq-plugin shows the text ...## Submitted by Frash
Assigned to **Xfce-Goodies Maintainers**
**[Link to original bug (#16456)](https://bugzilla.xfce.org/show_bug.cgi?id=16456)**
## Description
Created attachment 9463
Patch
Xfce4-cpufreq-plugin shows the text in the panel in an a smaller font size than other plugins. This is because it sets the font size as pixels instead of points. The xfce default system font is set as points. Therefor setting the system font to 10 (points == 13.33 pixel) and the plugin font size to 10 (pixels) leads to different sizes.
I've testet all other panel plugins with GtkInspector for this bug and only xfce4-datetime-plugin and xfce4-cpufreq-plugin are affected.
The xfce4-genmon-plugin had the same bug, whitch got fixed in this commit:
https://github.com/xfce-mirror/xfce4-genmon-plugin/commit/331c77853276b9d9f369899618140c505c34546f
I've created a patch which does basically the same like the genmon patch and it works from my testing.
**Patch 9463**, "Patch":
[xfce4-cpufreq-plugin.patch](/uploads/d40a73f701e2d9b7805cc9326f8c309c/xfce4-cpufreq-plugin.patch)
Version: 1.2.1https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/18Build fails2022-10-12T19:14:48ZGaƫl BonithonBuild failsBuilding from git master (717cd0f43cb028f36765aee7b8510323c8e2147f):
```
CXX libxfce4util_pp_la-rc.lo
In file included from ../../xfce4++/util/fixes.h:36,
from rc.cc:22:
/usr/local/include/xfce4/libxfce4util/libxf...Building from git master (717cd0f43cb028f36765aee7b8510323c8e2147f):
```
CXX libxfce4util_pp_la-rc.lo
In file included from ../../xfce4++/util/fixes.h:36,
from rc.cc:22:
/usr/local/include/xfce4/libxfce4util/libxfce4util-config.h:23:2: error: #error "Only <libxfce4util/libxfce4util.h> can be included directly, this file may disappear or change contents"
23 | #error "Only <libxfce4util/libxfce4util.h> can be included directly, this file may disappear or change contents"
| ^~~~~
In file included from ../../xfce4++/util/fixes.h:38:
/usr/local/include/xfce4/libxfce4util/xfce-gio-extensions.h:21:2: error: #error "Only <libxfce4util/libxfce4util.h> can be included directly, this file may disappear or change contents"
21 | #error "Only <libxfce4util/libxfce4util.h> can be included directly, this file may disappear or change contents"
| ^~~~~
In file included from ../../xfce4++/util/fixes.h:54:
/usr/local/include/xfce4/libxfce4util/xfce-i18n.h:24:2: error: #error "Only <libxfce4util/libxfce4util.h> can be included directly, this file may disappear or change contents"
24 | #error "Only <libxfce4util/libxfce4util.h> can be included directly, this file may disappear or change contents"
| ^~~~~
```https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/16Translations do not work in version 1.2.62022-01-31T05:44:56ZGhost UserTranslations do not work in version 1.2.6Caused by [libxfce4util/xfce-i18n.h](https://gitlab.xfce.org/xfce/libxfce4util/-/blob/e25e7ff679b8d4d597a4e5e6bd50f2ce631f7b20/libxfce4util/xfce-i18n.h) overriding all gettext functions in case GETTEXT_PACKAGE is not defined before inclu...Caused by [libxfce4util/xfce-i18n.h](https://gitlab.xfce.org/xfce/libxfce4util/-/blob/e25e7ff679b8d4d597a4e5e6bd50f2ce631f7b20/libxfce4util/xfce-i18n.h) overriding all gettext functions in case GETTEXT_PACKAGE is not defined before including `xfce-i18n.h`.
See also: https://gitlab.xfce.org/xfce/libxfce4util/-/issues/7v1.2.7https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/17Fractional update interval isn't preserved across plugin restarts in locales ...2022-01-30T23:17:43ZGhost UserFractional update interval isn't preserved across plugin restarts in locales that don't use dot (.) in numbersv1.2.7https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/13Convert README to README.md2022-01-28T22:36:46ZGhost UserConvert README to README.mdConvert and modernize the README file in line with other Xfce4 panel plugins.Convert and modernize the README file in line with other Xfce4 panel plugins.v1.2.6https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/14Enable fractional update intervals2022-01-27T04:50:26ZGhost UserEnable fractional update intervalsExamples:
- 0.75 seconds
- 1.5 secondsExamples:
- 0.75 seconds
- 1.5 secondsv1.2.6https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/15High latency of reading the current CPU frequency from sysfs2022-01-27T03:53:38ZGhost UserHigh latency of reading the current CPU frequency from sysfsCPU governor which was active during the tests below: performance.
Ryzen 7 3700X (8 cores, 16 threads): **latency 200 milliseconds**
````
$ while true; do /usr/bin/time cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq; slee...CPU governor which was active during the tests below: performance.
Ryzen 7 3700X (8 cores, 16 threads): **latency 200 milliseconds**
````
$ while true; do /usr/bin/time cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq; sleep 1; done
3755299
....
3995430
0.000000user 0.000944system 0:00.193443elapsed
````
Ryzen 9 3900X (12 cores, 24 threads): **latency 800 milliseconds**
````
$ while true; do /usr/bin/time cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq; sleep 1; done
3600014
....
3600767
0.001208user 0.000000system 0:00.791856elapsed 0%CPU
````
However, with a sleep interval of 0.5 seconds, the latency on Ryzen 7 3700X is only **500 microseconds**:
````
$ while true; do /usr/bin/time cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq; sleep 0.5; done
3735508
....
3632941
0.000926user 0.000000system 0:00.193690elapsed 0%CPU
3739502
....
4243973
0.000551user 0.000000system 0:00.000583elapsed 94%CPU
````v1.2.6https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/11Memory leak2022-01-20T08:57:19ZArtem S. TashkinovMemory leakProbably you've already fixed it, but the applet is leaking RAM:
```
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1997 user 20 481.5m 242.2m 23.4m S 11.8 1.5 434:16.74 panel-23-cpufre
``...Probably you've already fixed it, but the applet is leaking RAM:
```
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1997 user 20 481.5m 242.2m 23.4m S 11.8 1.5 434:16.74 panel-23-cpufre
```
RSS: 242MB is quite extraordinary after 7 days 10 hours of uptime/runtime.
After restarting:
```
397503 user 20 186.7m 26.8m 19.9m S 0.2 0:00.20 panel-23-cpufre
```https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/9Abnormally high CPU usage2021-09-08T12:32:21ZArtem S. TashkinovAbnormally high CPU usageAccording to top/htop `/usr/lib64/xfce4/panel/plugins/libcpufreq.so` is the worst offender in terms of CPU usage.
My CPU is running at 600Mhz, and this plugin shows around 17% CPU usage which is simply too much.
This plugin CPU usage r...According to top/htop `/usr/lib64/xfce4/panel/plugins/libcpufreq.so` is the worst offender in terms of CPU usage.
My CPU is running at 600Mhz, and this plugin shows around 17% CPU usage which is simply too much.
This plugin CPU usage rivals X.org's server entire CPU usage which should never happen - see the attached screenshots.
CPU time:
```
This plugin: 140 hours
X.org server: 250 hours.
```
I have a dual core Core i5 6200U CPU.
![settings](/uploads/76b7a29d9c95b970bfe9ea210ccb2834/settings.png)
![cpu_use](/uploads/427efb0fe01b7cbb25720eeeca31672d/cpu_use.png)v1.2.6https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/10Jan Ziak is missing from the AUTHORS file2021-03-22T23:12:16ZKnow YuriJan Ziak is missing from the AUTHORS fileJan Ziak involvement is indicated by the commit log.
Proposed patch: [0001-Add-Jan-Ziak-to-AUTHORS-so-it-shows-up-in-the-About-.patch](/uploads/51acc4e5f370256b8b57365f88f8c3d6/0001-Add-Jan-Ziak-to-AUTHORS-so-it-shows-up-in-the-About-.p...Jan Ziak involvement is indicated by the commit log.
Proposed patch: [0001-Add-Jan-Ziak-to-AUTHORS-so-it-shows-up-in-the-About-.patch](/uploads/51acc4e5f370256b8b57365f88f8c3d6/0001-Add-Jan-Ziak-to-AUTHORS-so-it-shows-up-in-the-About-.patch)v1.2.6https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/2Patch to make icons change color based on cpu frequency2021-02-21T15:06:28ZBugzilla MigrationPatch to make icons change color based on cpu frequency## Submitted by Gert Wollny
Assigned to **Harald Judt**
**[Link to original bug (#12124)](https://bugzilla.xfce.org/show_bug.cgi?id=12124)**
## Description
Created attachment 6407
Patch against v1.1.2, tested on Gentoo Linux.
Thi...## Submitted by Gert Wollny
Assigned to **Harald Judt**
**[Link to original bug (#12124)](https://bugzilla.xfce.org/show_bug.cgi?id=12124)**
## Description
Created attachment 6407
Patch against v1.1.2, tested on Gentoo Linux.
This patch changes the icon display to let the color depend on the actual cpu frequency. At the lowest frequency state the color is green and in the highest it is redish.
The icons are currently calculated on the fly from the original icon. If I find the time I might change this that a set of icons is created at startup based on the number of frequency states, but the computational overhead of the current implementation is probably not worth the effort.
Best,
Gert
~~**Patch 6407**~~, "Patch against v1.1.2, tested on Gentoo Linux.":
[xfce4-cpufreq-plugin-1.1.2-colored-icon.patch](/uploads/f7a9fdc9d3c6e6676ca105c290eb385d/xfce4-cpufreq-plugin-1.1.2-colored-icon.patch)
Version: 1.1.2v1.2.5https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/8Frequency text box should have a fixed size and fixed unit2021-02-02T20:21:53ZThomasFrequency text box should have a fixed size and fixed unitThe size of the widget is changing according to frequency shown in MHz or GHz. This irritates and makes the screen looking choppy.The size of the widget is changing according to frequency shown in MHz or GHz. This irritates and makes the screen looking choppy.v1.2.4https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/7Issue with Transifex2021-01-19T13:59:32ZMarek AdamskiIssue with Transifexpl.po hasn't been updated in some time on GitLab.
GitLab: PO-Revision-Date: 2020-10-15 14:48+0000
Transifex: PO-Revision-Date: 2021-01-02 11:49+0000pl.po hasn't been updated in some time on GitLab.
GitLab: PO-Revision-Date: 2020-10-15 14:48+0000
Transifex: PO-Revision-Date: 2021-01-02 11:49+0000https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/4[PATCH] increased CPU/memory usage over time2020-11-21T06:06:07ZBugzilla Migration[PATCH] increased CPU/memory usage over time## Submitted by dwk..@..il.com
Assigned to **Xfce-Goodies Maintainers**
**[Link to original bug (#16013)](https://bugzilla.xfce.org/show_bug.cgi?id=16013)**
## Description
I am running xfce4-cpufreq-plugin 1.2.1-1 on Debian. I not...## Submitted by dwk..@..il.com
Assigned to **Xfce-Goodies Maintainers**
**[Link to original bug (#16013)](https://bugzilla.xfce.org/show_bug.cgi?id=16013)**
## Description
I am running xfce4-cpufreq-plugin 1.2.1-1 on Debian. I noticed that it ends up using increasingly more CPU and RAM over several days, to the point where it uses 50% CPU and has a 600MB heap (while it started with 4MB). I verified that it is not performing additional system calls, which was my first guess, and indeed /proc/X/stat shows that it is spending these CPU cycles in userspace. I dumped its heap from gdb and found half a million instances of the string "Sans". I traced the code and found that cpuFreq->layout_changed was being set to TRUE every update (once per second in my case). The root cause of this is the following bug:
xfce4-cpufreq-plugin.c:
237 if (label_size.width > cpuFreq->label_max_width)
238 cpuFreq->label_max_width = label_size.width;
239 cpuFreq->layout_changed = TRUE;
It always sets layout_changed to TRUE even when width==label_max_width (the normal case). This should be
237 if (label_size.width > cpuFreq->label_max_width)
238 cpuFreq->layout_changed = TRUE;
239 cpuFreq->label_max_width = label_size.width;
Luckily this snippet appears correctly in the other place it was copy pasted in the file. Now it doesn't update repeatedly, which fixes the problem for me. But there is clearly a memory leak of some sort. After looking very hard at the code in cpufreq_label_set_font(), I think I found it.
78 provider = gtk_css_provider_new ();
79
80 gtk_css_provider_load_from_data (provider, css, -1, NULL);
81 gtk_style_context_add_provider (
82 GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (cpuFreq->label))),
83 GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
This gets called every time a font is loaded. It adds a new GtkStyleProvider but *doesn't remove the old one*. Hence, over time, many many GtkStyleProviders exist all tied to the label widget. My suggested fix is to remember the old pointer so that it can be removed. My complete patch is as follows:
diff --git a/xfce4-cpufreq-plugin.c b/xfce4-cpufreq-plugin.c
index e886121..e2282f3 100644
--- a/xfce4-cpufreq-plugin.c
+++ b/xfce4-cpufreq-plugin.c
@@ -75,7 +75,15 @@ cpufreq_label_set_font (void)
if (css)
{
+ if(cpuFreq->label_css_provider)
+ {
+ gtk_style_context_remove_provider (
+ GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (cpuFreq->label))),
+ GTK_STYLE_PROVIDER (cpuFreq->label_css_provider));
+ }
+
provider = gtk_css_provider_new ();
+ cpuFreq->label_css_provider = provider;
gtk_css_provider_load_from_data (provider, css, -1, NULL);
gtk_style_context_add_provider (
@@ -235,8 +243,8 @@ cpufreq_update_label (CpuInfo *cpu)
else
{
if (label_size.width > cpuFreq->label_max_width)
- cpuFreq->label_max_width = label_size.width;
- cpuFreq->layout_changed = TRUE;
+ cpuFreq->layout_changed = TRUE;
+ cpuFreq->label_max_width = label_size.width;
}
}
}
@@ -551,6 +559,7 @@ cpufreq_prepare_label (CpuFreqPlugin *cpufreq)
{
gtk_widget_destroy (cpufreq->label);
cpufreq->label = NULL;
+ cpufreq->label_css_provider = NULL;
}
if (cpuFreq->options->show_label_freq || cpuFreq->options->show_label_governor)
@@ -576,6 +585,7 @@ cpufreq_widgets (void)
css = g_strdup_printf("button { padding: 0px; }");
provider = gtk_css_provider_new ();
+ cpuFreq->label_css_provider = provider;
gtk_css_provider_load_from_data (provider, css, -1, NULL);
gtk_style_context_add_provider (
GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (cpuFreq->button))),
diff --git a/xfce4-cpufreq-plugin.h b/xfce4-cpufreq-plugin.h
index a6895e4..f163e3c 100644
--- a/xfce4-cpufreq-plugin.h
+++ b/xfce4-cpufreq-plugin.h
@@ -86,6 +86,7 @@ typedef struct
/* Widgets */
GtkWidget *button, *box, *icon, *label;
+ GtkCssProvider *label_css_provider;
gboolean layout_changed;
gint label_max_width;
I am successfully running this modified version on my system. I will report back if it continues to use excessive cpu or memory.
P.S. I initially thought there was a bug with mixing up width and height around line 222, but upon further reflection it is correct. The max_width variable simply stores a height value in the vertical case.
Version: 1.2.1https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/3Plugin with 3 instances displaying min, ave, max frequency all grow memory us...2020-11-21T06:06:07ZBugzilla MigrationPlugin with 3 instances displaying min, ave, max frequency all grow memory usage from initial <20MB.## Submitted by Clark
Assigned to **Harald Judt**
**[Link to original bug (#15218)](https://bugzilla.xfce.org/show_bug.cgi?id=15218)**
## Description
See here:
https://forum.xfce.org/viewtopic.php?id=12904
Always configured as me...## Submitted by Clark
Assigned to **Harald Judt**
**[Link to original bug (#15218)](https://bugzilla.xfce.org/show_bug.cgi?id=15218)**
## Description
See here:
https://forum.xfce.org/viewtopic.php?id=12904
Always configured as mentioned, min, ave, max for the 3 instances, either in a isolated panel or combined with others.
On startup typical is around 20 MB usage.
On a particular i386 Debian Buster image current as of week 7 this year, was created in a kvm vm and qemu-img'd to a ssd and tested in various hardware. In the VM the plugin is not used. I enable a panel with the plugin when on real hardware.
On an intel Q67 (C602 I believe) with a E3-1225 v1 Sandy Bridge the leakage starts as seen in the post referenced above. The rate is perhaps 100MB/day.
On a X8DTH-i with currently a E5540, the leakage rate is 20+MB per day.
I mention in the thread, these are inappropriate machines for aa i386 OS, so I don't know...Happy to donate some time anyway.
I did pass through a similar amd64 image and did not notice such leakage, but I wasn't looking for it. That image passed my hardware test for an image enumerating correctly on various hardware, and I wrote over the image with the i386, so I lost the opportunity for the moment to evaluate Buster's state on amd64. I will start testing Buster amd64 hypervisor images soon and will use such a panel with this plugin, I don't intend any amd64 non-hypervisor use on real hardware, and the amd64 is in use on a stretch hypervisor with the panel, and no leaks.
So at the moment, only an issue on buster i386 on the mentioned 64 bit platforms using xfce4-cpufreq-plugin 1.2.1-1 as packaged by Debian Buster.
Version: 1.2.0https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin/-/issues/6compilation with gcc 10 breaks functionality (CPU Frequency Monitor fails to ...2020-06-11T16:29:02ZBugzilla Migrationcompilation with gcc 10 breaks functionality (CPU Frequency Monitor fails to run)## Submitted by Raphael Groner
Assigned to **Xfce-Goodies Maintainers**
**[Link to original bug (#16798)](https://bugzilla.xfce.org/show_bug.cgi?id=16798)**
## Description
Forwarding from downstream.
https://bugzilla.redhat.com/sh...## Submitted by Raphael Groner
Assigned to **Xfce-Goodies Maintainers**
**[Link to original bug (#16798)](https://bugzilla.xfce.org/show_bug.cgi?id=16798)**
## Description
Forwarding from downstream.
https://bugzilla.redhat.com/show_bug.cgi?id=1830261
Description of problem:
After upgrade to Fedora 32, upon login, I get error window saying
Plugin "CPU Frequency Monitor" unexpectedly left the panel, do you want to restart it?
and re-executing does not help.
Version-Release number of selected component (if applicable):
xfce4-cpufreq-plugin-1.2.1-5.fc32.x86_64
How reproducible:
Deterministic.
Steps to Reproduce:
1. Add CPU Frequence Monitor to XFCE panel on Fedora 32.
Actual results:
Error window saying Plugin "CPU Frequency Monitor" unexpectedly left the panel, do you want to restart it?
Expected results:
It shows up in the panel and starts showing the frequency.
Additional info:
In ~/.xsession-errors, there is
(process:1872): xfce4-panel-wrapper-CRITICAL **: 13:38:58.691: Wrapper cpufreq-21: Failed to open plugin module "/usr/lib64/xfce4/panel/plugins/libcpufreq.so": /usr/lib64/xfce4/panel/plugins/libcpufreq.so: undefined symbol: cpuFreq.
Add Comment
Version: 1.1.3Romain BouvierRomain Bouvier