You are not logged in.

#1 2009-07-07 17:35:21

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

[SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

why sorta? using the repo's xmonad and xmobar still has this issue.  one of two things fixed it for me:

-- using dzen2 instead of xmobar
-- using xmonad-darcs (AUR) instead of xmonad

i'm happy, so it's SOLVED.


-- OP --

when i first startx, the /usr/bin/X process as reported by `ps -eo pcpu,args` is using about 0.4% of my cpu (a 2.4 core2quad)

if left alone, idling, with nothing open the /usr/bin/X process will pick up about 1% cpu usage each hour.  and it won't stop.  when i first noticed the problem it had been up for a few days and was using almost 90% cpu.

i'm hoping someone can look over my configs and see if there's anything i can do to fix this.

i'm using xmonad and xmobar with nvidia proprietary drivers and xcompmgr for transparency.

i've tried:

-- using xmonad w/o an xmonad.hs (meaning, vanilla config / no xmobar)
-- using xcompmgr-{git,dana} from aur
-- turning off xcompmgr completely
-- xmobar-darcs from aur
-- compiling both xmonad and xmobar via ABS

my configs:

-- xmonad.hs
-- xmobarrc

i miss xmonad, by far the best WM i've used so far.

for comparison, i've had scrotwm running for days now and X is reported at a whopping 0.0% cpu.

/edit: also with xmonad idling, htop reports the X process as constantly running (which it's not doing with any other WM.  and doing a trace on /usr/bin/X from htop flashes

... = -1 EAGAIN (Resource temporarily unavailable)

flying by over and over again.  that's just the part of the trace that i noticed/remembered... i can get more context if needed.

/edit2: scratch that, the same message flashes when i trace X using scrotwm too (just not as quickly).

Last edited by brisbin33 (2009-07-09 13:59:31)

Offline

#2 2009-07-07 19:33:57

rizzix
Member
Registered: 2005-10-22
Posts: 55

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

Try running xmonad without xmobar.

Offline

#3 2009-07-07 19:52:40

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

@rizzix

thanks for the suggestion, i'll edit the OP - but i actually tried xmonad with no xmonad.hs, so vanilla config / no xmobar and the problem was still there hmm

Offline

#4 2009-07-07 20:02:28

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

Well .... you could try using someone else's configs and see if the problem still persists.  It probably won't change a thing though since you tried without a config at all.  Just a shot in the dark .... because I definitely don't see that behavior here on either of my machines.


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#5 2009-07-07 20:08:13

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

lifeafter2am wrote:

It probably won't change a thing though since you tried without a config at all.

yeah, i just realized this myself when replying to rizzo... tonight i'm going to rm ~/.xmonad/* and retest.  if magically the problem's gone i'll go from there and be thankful it's really a config issue... but if not, i think i just can't use xmonad, which is really sad.

another nvidia user's got a similar post going so maybe it's that?

Offline

#6 2009-07-07 20:18:33

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

Have you tried xmonad-darcs and xmonad-contrib-darcs from the AUR? I haven't noticed any bad behaviour CPU wise with them.

Plus, as an extra benefit you'll get all the newest modules from xmonad-contrib to try out.

Last edited by Ashren (2009-07-07 20:19:27)

Offline

#7 2009-07-07 20:20:29

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

ashren, installing now... we'll see how it goes.

/edit: hmm nvm, i guess xmonad-darcs isn't patched for [testing]/gcc-4 yet?

Last edited by brisbin33 (2009-07-07 20:26:24)

Offline

#8 2009-07-07 20:44:50

rizzix
Member
Registered: 2005-10-22
Posts: 55

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

Why does xmonad-darcs require gcc-4?

Offline

#9 2009-07-07 20:46:51

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

Yeah, brisbin33 post the error you're getting. You probably need to grab haskell-x11-darcs before compiling xmonad-darcs.

Last edited by Ashren (2009-07-07 20:47:41)

Offline

#10 2009-07-07 20:47:45

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

forget all that;  i recently installed cwrapper a color wrapper for standard linux commands.  that colorized version of gcc was failing, while the real version was compiling fine. 

i was sooo confused though b/c when makepkg -s didn't require installation of a dependency the colorized gcc was used (and failed) while forcing makepkg -s to install a dep (darcs) somehow called the real gcc (and succeeded)... must have to do with root vs. user's $PATH being used

all this is useless to the discussion though... ignore it big_smile

Last edited by brisbin33 (2009-07-07 21:00:54)

Offline

#11 2009-07-07 21:17:10

rizzix
Member
Registered: 2005-10-22
Posts: 55

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

Ah.  Let us know if you experience the same problems with xmonad-darcs. smile

Offline

#12 2009-07-07 21:57:20

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

brisbin33 wrote:

forget all that;  i recently installed cwrapper a color wrapper for standard linux commands.  that colorized version of gcc was failing, while the real version was compiling fine. 

i was sooo confused though b/c when makepkg -s didn't require installation of a dependency the colorized gcc was used (and failed) while forcing makepkg -s to install a dep (darcs) somehow called the real gcc (and succeeded)... must have to do with root vs. user's $PATH being used

all this is useless to the discussion though... ignore it big_smile

Lesson learned ? Eye candy is baaad tongue


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#13 2009-07-08 03:44:44

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

Ashren wrote:

Yeah, brisbin33 post the error you're getting. You probably need to grab haskell-x11-darcs before compiling xmonad-darcs.

The released X11 binding seems to work, so that's what the xmonad-darcs PKGBUILD requires.

Offline

#14 2009-07-08 13:38:06

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

ok guys, some good news.

i started xmonad-darcs last night.  no config, no xmobar.  and it seems to be acting normally.  cpu pegged at 0.1% all night and it wasn't constantly running like before.

so either i didn't test properly last time i tried the repo's xmonad w/o a config/xmobar and that's what's causing issues (which i'm kind of leaning towards) or xmonad-darcs does in fact fix the issue (which would be nice).

i'm going to reinstate my config with xmobar and retest tonight; if anyone has a chance to look over my xmonad.hs for issues (see link in OP) that'd be appreciated.  my haskell is terrible.

Offline

#15 2009-07-08 14:44:52

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

I think you need to ditch XMobar for dzen2.  wink


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#16 2009-07-08 14:51:52

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

i'm with you there; i'd love to keep the urgency hints and window title shortening from my current xmonad.hs and plug in the cpu, mem, net, date info from my current xmobarrc... but use dzen2... care to help?

Last edited by brisbin33 (2009-07-08 14:52:16)

Offline

#17 2009-07-08 14:56:18

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

lifeafter2am wrote:

I think you need to ditch XMobar for dzen2.  wink

I was going to say that myself wink

brisbin33 wrote:

i'm with you there; i'd love to keep the urgency hints and window title shortening from my current xmonad.hs and plug in the cpu, mem, net, date info from my current xmobarrc... but use dzen2... care to help?

It's super easy...just use conky for that stuff! Make sure you have these in your conky config:

background no
out_to_console yes
out_to_x no

Then it's just a matter of piping conky output to a dzen2 and starting that up with Xmonad.
As for workspaces, layout and window title, use dynamicLogWithPP. it should look something like this:

myLogHook h = dynamicLogWithPP $ defaultPP {
              ppCurrent  = dzenColor "#ff0000" "#000000" . pad
            , ppVisible  = dzenColor "#ffffff" "#000000" . pad
            , ppHidden   = dzenColor "#ffffff" "#000000" . pad
            , ppHiddenNoWindows = dzenColor "#666666"  "#000000" . pad
            --, ppUrgent   = dzenColor "#ff0000" "#222222"
            , ppUrgent   = wrap ("") (dzenColor "#ff0000" "" "<")
            , ppSep     = " " 
            , ppWsSep    = ""
        , ppLayout   = \x -> case x of
                                        "Tall" -> "[]="
                                        "Mirror Tall" -> "TTT"
                                        "SimplestFloat" -> "><>"
                                        "Full" -> "[F]"
                                        _ -> "???"
            , ppOutput   = hPutStrLn h
            }

myStatusBar = "dzen2 -p -ta l -fn '-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*' -x 0 -y 0 -w 730 -h 18 -fg '#ffffff' -bg '#000000' -e 'onexit=ungrabmouse'"

And make sure you have the right stuff in main:

main = do
       din <- spawnPipe myStatusBar $ defaultConfig {

...

logHook=myLogHook din,
}

So, what you have are 2 dzen windows, but you can line them up the way you want - I have mine in a single line (looks like dwm in fact)

Last edited by moljac024 (2009-07-08 15:04:21)


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#18 2009-07-08 15:45:00

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

Here is my dzen stuff that lives inside my xmonad.hs

-- dzen config
sBarCmd = "dzen2 -fn '-*-nu-*-*-*-*-*-*-*-*-*-*-*-*' -bg '#000000' -fg '#3a6b7a' -h 16 -w 720 -ta l"
topBarCmd = "conky -c ~/.conkyrc | dzen2 -fn nu -bg '#000000' -fg '#f0f0f0' -h 16 -w 650 -x 720 -ta r"
botBarCmd = "conky -c ~/.conky_bottom_dzen | dzen2 -fn nu -bg '#000000' -fg '#f0f0f0' -h '16' -y 884 -w 1440 -ta 'c' -\
xs 1"

myDzenPP dzenSbar = defaultPP
     { ppCurrent = wrap "^p()[^fg(#346855)" "^fg()]^p()"
     , ppUrgent = wrap "!^fg(purple)^p()" "^fg()^p()"
     , ppVisible = wrap "^p()[^fg()" "^fg()]^p()"
     , ppTitle = wrap "^fg(#346855)< ^fg(#3a6b7a)" "^fg(#346855) >^fg()" . shorten 60
     , ppSep = " : "
     , ppWsSep = " : "
     , ppLayout = dzenColor "#346855" "#000000" .
            (\x -> case x of
                   "Tall" -> "^i(" ++ myBitmapsDir ++ "/tall.xbm)"
                   "Mirror Tall" -> "^i(" ++ myBitmapsDir ++ "/mtall.xbm)"
                   "Full" -> "^i(" ++ myBitmapsDir ++ "/full.xbm)"
                   "ResizableTall" -> "^i(" ++ myBitmapsDir ++ "/resizableGrid.xbm)"
                   "IM Grid" -> "^i(" ++ myBitmapsDir ++ "/im-layout.xbm)"
                   _ -> x
                   )
     , ppOutput = hPutStrLn dzenSbar
}

#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#19 2009-07-08 15:56:54

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

Would you like to share those .xbm's with us ? Where do you people get them ? Is everyone an artist or do I suck at searching ? smile

Last edited by moljac024 (2009-07-08 15:57:29)


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#20 2009-07-08 16:41:19

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

hey thanks a ton guys, that's exactly what i was looking for!  i'll redo my config today and test it out tonight.

many thanks, again.

Offline

#21 2009-07-08 16:41:25

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

Well I got some from another person here on the forums (don't remember who), and then I created my own for IM layout and ResizableTall.  Here is a archive of ALL my xbm's.

http://lifeafter2am.net/arch/dzen.tar.bz2


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#22 2009-07-08 19:35:35

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

FYI: moljac.  i was testing my new config via ghci and i had to make this change to get it to work:

this fails with "the last expression in a do construct must be an expression":

main = do
       din <- spawnPipe myStatusBar $ defaultConfig {

works fine after changing it to this:

main = do
  din <- spawnPipe myStatusBar
  xmonad $ defaultConfig {

Offline

#23 2009-07-08 19:38:24

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

brisbin33 wrote:

FYI: moljac.  i was testing my new config via ghci and i had to make this change to get it to work:

this fails with "the last expression in a do construct must be an expression":

main = do
       din <- spawnPipe myStatusBar $ defaultConfig {

works fine after changing it to this:

main = do
  din <- spawnPipe myStatusBar
  xmonad $ defaultConfig {

Yeah, mine is set up like the second example as well:

main = do
    dzenSbar <- spawnPipe sBarCmd
    dzenConkyTop <- spawnPipe topBarCmd
    dzenConkyBot <- spawnPipe botBarCmd
    spawn "xcompmgr"  
    xmonad $ defaultConfig

#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#24 2009-07-08 21:23:46

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

brisbin33 wrote:

FYI: moljac.  i was testing my new config via ghci and i had to make this change to get it to work:

this fails with "the last expression in a do construct must be an expression":

main = do
       din <- spawnPipe myStatusBar $ defaultConfig {

works fine after changing it to this:

main = do
  din <- spawnPipe myStatusBar
  xmonad $ defaultConfig {

Oh crap.....I didn't c/p that one, I just typed it in wrongly....sorry


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#25 2009-07-08 21:42:15

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

moljac024 wrote:

Oh crap.....I didn't c/p that one, I just typed it in wrongly....sorry

no worries, i learned a bit of haskell chasing that one down.  thanks for the config anyway.

Offline

Board footer

Powered by FluxBB