Comments (23)
I am using the volume widget and I still encounter the memory leaks unfortunately
from awesome-wm-widgets.
I am using the cpu widget and get the memory leaks.The memory limit to 170MB.
from awesome-wm-widgets.
I notice that the visual responsiveness of scrolling the volume widget seems to degrade as the memory leak goes on. I wonder if that might indicate the leak is originating somewhere in the update_graphic
function?
I think I'll try stubbing that function out and running the widget overnight to see what happens 🤞
from awesome-wm-widgets.
Nope, memory still leaks even with a stubbed function! I dug a little deeper and found this, which is a more likely culprit.
As you can see here, we're using awful.widget.watch
to update the visual display, which is implemented via the leaky function.
I wonder if it's possible to bypass the issue for now by implementing our own async timer?
from awesome-wm-widgets.
Hi! Thanks for raising an issue. Do you think it could be somehow related to startup notifications (like it this PR)?
from awesome-wm-widgets.
I've checked those widgets and all of them are using watch class. Then I realised that I was using it the wrong way. Could you please validate if this commit (Possible fix for memory leak issue #11) solves the issue and let us (me) know.
from awesome-wm-widgets.
The recent changes slowed the leak (by a factor of 2 or 3), but there is still a slow leak.
Edit: confirmed on the desktop, too. :(
from awesome-wm-widgets.
I seem to have the same leak. Maybe 500 kb/s eats up to 20% of my ram, then the volume widget does not longer work.
from awesome-wm-widgets.
I updated to the new version (30 May 2017) but still notice the small leak---about 500kb/s like the previous poster.
from awesome-wm-widgets.
I tried it again today with a unmodified, updated version of the file. Leak is still there. It starts after the first interaction (raise/lower volume), leaks about 20 MB of memory, then stops. After the next interaction, leakage starts again. Leakage speeds up if you keep scrolling vol up/down even if volume is at max/min level.
from awesome-wm-widgets.
How do you detect a memory leak? I'd like to try to make few changes but unfortunately don't know how to detect a memory leak. Also would be nice to check other widgets, maybe problem is in the awful.spawn
or in the amixer
.
from awesome-wm-widgets.
I found the leak with htop, but top should work just as well. If you are not familiar (and you probably are... :D ) both are terminal-style system monitors that update the condition of your processes pretty regularly. When I'm using the widgets, the memory used by the 'awesome' process ticks up gradually; when I comment them out and restart, the memory used by the process is stable. I am not really sure how to check it directly, though I suspect there is a way for those with more linux-fu than I.
from awesome-wm-widgets.
Ok, thanks! Actually I tried htop, but was to lazy to play with parameters and comment out all widgets I'm using right now. I'll try to find some kind of Lua profiler or will play with htop and will let you know.
from awesome-wm-widgets.
An easy way to monitor is just do "top|grep awesome" it will just post the awesome line each second so you can easily follow what is happening.
from awesome-wm-widgets.
Any updates on this?
from awesome-wm-widgets.
Nope... Seems like I don't have this issue, I've been monitoring output of the top | grep awesome
and VIRT, RES and %MEM stay at the same level all the time... Probably we need some Lua expert here... =)
from awesome-wm-widgets.
no lua expert here, but i also noticed the memory leak. see steady increase of virt:
tim@adm-121865:~$ top | grep awesome
1255 tim 20 0 2603608 2.053g 16032 R 13.3 13.3 87:09.90 awesome
1255 tim 20 0 2604268 2.054g 16032 R 21.3 13.3 87:10.54 awesome
1255 tim 20 0 2604668 2.054g 16032 R 19.9 13.3 87:11.14 awesome
1255 tim 20 0 2605064 2.055g 16032 S 24.6 13.3 87:11.88 awesome
1255 tim 20 0 2605328 2.055g 16032 S 19.6 13.3 87:12.47 awesome
1255 tim 20 0 2605724 2.055g 16032 S 18.9 13.3 87:13.04 awesome
1255 tim 20 0 2605988 2.056g 16032 S 19.9 13.3 87:13.64 awesome
1255 tim 20 0 2606384 2.056g 16032 S 22.5 13.3 87:14.32 awesome
6088 tim 20 0 4 4 0 R 1.0 0.0 0:00.03 awesome
1255 tim 20 0 2606780 2.057g 16032 S 23.3 13.3 87:15.02 awesome
1255 tim 20 0 2607044 2.057g 16032 S 18.6 13.3 87:15.58 awesome
1255 tim 20 0 2607444 2.057g 16032 S 24.8 13.3 87:16.33 awesome
1255 tim 20 0 2607708 2.057g 16032 S 19.9 13.3 87:16.93 awesome
1255 tim 20 0 2608104 2.058g 16032 S 19.3 13.3 87:17.51 awesome
1255 tim 20 0 2608368 2.058g 16032 S 20.3 13.3 87:18.12 awesome
1255 tim 20 0 2609028 2.059g 16032 R 24.9 13.3 87:18.87 awesome
from awesome-wm-widgets.
Could somebody check if the latest commit fixed the leak? I did few fixes there which could fix the leak. But now to add a widget in rc.lua it should be explicitly defined in 'require' section
local battery_widget = require("awesome-wm-widgets.battery-widget.battery")
and then used as always:
...
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
mykeyboardlayout,
wibox.widget.systray(),
battery_widget,
mytextclock,
s.mylayoutbox,
},
...
If it works I'll update other widgets.
from awesome-wm-widgets.
Preliminary tests on my laptop seem to indicate that the memory leak in the battery widget may be fixed, but it was actually the one that leaked the least. I had some increase in the virt for the awesome process at the beginning (when I was still launching programs), and there was some increase as I switched workspaces, but I let it sit for about 25 minutes and didn't notice any change (until I started switching workspaces again---probably normal behavior).
As a suggestion, you might try the volume or brightness widget next as they seemed to be leaking the worst.
Thanks for your efforts! I wish I knew more so I could help! :D
from awesome-wm-widgets.
Could you please check now, after e6c3059 commit.
Widgets should be added the same way as I mentioned above:
local battery_widget = require("awesome-wm-widgets.battery-widget.battery")
local batteryarc_widget = require("awesome-wm-widgets.batteryarc-widget.batteryarc")
local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness")
local volume_widget = require("awesome-wm-widgets.volume-widget.volume")
local volumebar_widget = require("awesome-wm-widgets.volumebar-widget.volumebar")
local volumearc_widget = require("awesome-wm-widgets.volumearc-widget.volumearc")
Please let us know if it helps.
from awesome-wm-widgets.
Laptop---
--battery: looking carefully, there seems to still be a leak of about 20 bytes per 5 seconds.
--batteryarc: initial testing led to an error, and I haven't tracked it down yet.
--brightness: the laptop has an ARM processor, so I could not use light or xbacklight either one---I just had it cat the appropriate /sys file, and that seemed to lead to a leak, but that may be a problem with my kludge, not the widget.
---volume, volumebar, volumearc: as far as I can tell, these are rock-steady. :D
Preliminary tests on the desktop (non-battery widgets) show leaks, but I will have to get some time later to post the details.
from awesome-wm-widgets.
from awesome-wm-widgets.
I also have memory leaks in the battery, spottily, and volume widgets.
from awesome-wm-widgets.
Related Issues (20)
- Pactl volume-widget only updates on one screen HOT 5
- Consider using wttr.in for weather widget HOT 2
- Weather widget does not work, but there are 0 errors
- volume-widget: Mixer selection
- pactl-widget: No way to set limit on max volume HOT 2
- brightness_widget: incorrect brightnessctl command for getting current brightness level HOT 1
- Change color font on the spotify-widget Widget HOT 3
- cpu widget gets placed off screen sometimes HOT 1
- Install dir not found
- README.md installation info is missing HOT 2
- Are there any plans to support hibernate in logout popup? HOT 1
- scripts
- Batteryarc shows battery warning when battery is fully charged
- [Calendar] `focus_date_bg` and `focus_date_fg` broken after updating to last commits HOT 4
- apt widget not working because icon does not show in bar HOT 3
- calendar-widget: 'today' day is not set when opening the calendar
- Battery widget doesn't handle well two batteries
- OpenWeatherMap API 2.5 deprecation HOT 5
- Typo in logout-popup-widget
- Volume widget seems to malfunction after upgrading pavucontrol to v6.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awesome-wm-widgets.