FS#33277 - [xmobar] eats up battery

Attached to Project: Community Packages
Opened by Edward O'Callaghan (evocallaghan) - Thursday, 03 January 2013, 00:42 GMT
Last edited by Jelle van der Waa (jelly) - Saturday, 08 April 2017, 14:50 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Jelle van der Waa (jelly)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
XmoBar is coming up near the top of powertop. This could be a misconfiguration on my part, I do not know.
However I have followed documentation to the letter and assume this could be related to some kind of
polling issue perhaps?


Power est. Usage Events/s Category Description
5.16 W 32.9% Device Display backlight
1.27 W 0.0 pkts/s Device Network interface: wlan0 (iwlwifi)
110 mW 4.8 ms/s 24.4 Process xmobar
----<snip>

Additional info:
* package version(s)
Version : 0.16-4

* config and/or log files etc.


└──╼ cat .xmobarrc
Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
, bgColor = "black"
, fgColor = "grey"
, position = Top
, persistent = True
, lowerOnStart = True
, commands = [ Run Weather "CYQY" ["-t","<station>: <tempC>°C","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 36000
, Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Network "wlan0" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Wireless "wlan0" ["-t","wlan0: %","-L","0","-H","32","--normal","green","--high","red"] 10
-- , Run Battery ["-L","50","-H","75","--high","green","--normal","yellow", "--low", "red", "--template", "bat:<left>"] 100
, Run Battery ["-L","50","-H","75","--high","green","--normal","yellow", "--low", "red", "--template", "bat: <left>%"] 100
-- , Run Volume "default" "Master" [] 10
--, Run AlsaVolume "Master" ["--template", "vol:<vol>"] 10
--, Run Com "/home/edward/.bin/volume.sh" [] "vol"
--, Run Com "/home/edward/.bin/wireless.sh" [] "wifi" 30
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Swap [] 10
, Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
, Run StdinReader
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% }{%cpu% | %memory% * %swap% | %eth0% - %wlan0% | %battery% | <fc=#ee9a00>%date%</fc>| %CYQY% "
}


Possibly related issue:  FS#31288 

Anything else needed please let me know,
Kind Regards,
Edward.
This task depends upon

Closed by  Jelle van der Waa (jelly)
Saturday, 08 April 2017, 14:50 GMT
Reason for closing:  No response
Comment by Jelle van der Waa (jelly) - Thursday, 03 January 2013, 14:54 GMT
You can't be using the repo version, since you use AlsaVolume which i don't the repo version of xmobar supports?
Also your two wifi/vol commands might cause much polling:
--, Run Com "/home/edward/.bin/volume.sh" [] "vol"
--, Run Com "/home/edward/.bin/wireless.sh" [] "wifi" 30
"
Comment by Scott Lawrence (srl) - Thursday, 03 January 2013, 18:52 GMT
I too have this issue, with 0.15-2 (holding back on the ugprade to avoid #33030). Nothing fancy in my config:

Config
{ font = "xft:Inconsolata:size=10:antialias=true:weight=bold"
, commands =
[ Run Com "bat-info" [] "battery" 100
, Run Date "%c" "date" 10
, Run StdinReader
]
, template = "%StdinReader% }{ %battery% * %date%"
}

Powertop indicates 100 wakeups per second caused by xmobar alone (another 100 by xmonad), which an order of magnitude higher than the most I would expect.

Comment by Jelle van der Waa (jelly) - Sunday, 28 April 2013, 19:16 GMT
is this still an issue?
Comment by Scott Lawrence (srl) - Tuesday, 20 August 2013, 20:46 GMT
  • Field changed: Percent Complete (100% → 0%)
Sorry for the no-response. This does still appear to be an issue; however, it's supposedly fixed in the most recent version of ghc. (Fixed at 7.6.2, iirc.) What version of ghc is xmobar compiled with?

(This issue also still affects xmonad.)
Comment by Balló György (City-busz) - Sunday, 15 September 2013, 17:28 GMT
xmobar is built with ghc 7.6.3, so if the problem persist, then please report the problem to upstream.
Comment by Balló György (City-busz) - Sunday, 15 September 2013, 17:42 GMT
Maybe it's related to this issue:
http://code.google.com/p/xmobar/issues/detail?id=43

Anyway, I'm closing this bug, because optimization is an upstream task.
Comment by Clemens Lutz (tkdfighter) - Tuesday, 12 January 2016, 06:14 GMT
  • Field changed: Percent Complete (100% → 0%)
This bug has been fixed upstream, but requires additional compile options (--ghc-options='-threaded').

Please refer to:
https://github.com/jaor/xmobar/issues/89

Loading...