The nuts and bolts => X-Rated => Topic started by: sdk on March 20, 2008, 02:36:12 pm

Title: startx - causes high CPU usage.
Post by: sdk on March 20, 2008, 02:36:12 pm

I got Toshiba Portege 3505 laptop, which works really well with VLinux combined with Fluxbox.
Recently I removed 'bootsplash', 'xdm' and 'kdm-small' packages to get rid of those useless GUI.

Now when my Linux starts it informs me that I it got no 'kdm, xdm or gdm' packages to start from, which is fine. I login normally, type 'startx' and my fluxbox shows up. Everything would be fine, but I got 'conky' monitor running and I noticed that just after starting X my CPU usage reaches 30%. I checked the 'ps aux' and 'top' - there were absolutely no processes using so much of my CPU power.

I started to kill processes to look for a change, and here is the most important part of my post:
- when I kill process '/usr/bin/startx' owned by 'root' my CPU usage drops to 0 - 3% as normal.

I'd like to know what may cause it - I am able to write a script to kill it just after X start, but I am curious why it behaves like that.

Thanks in advance for all replies.
Title: Re: startx - causes high CPU usage.
Post by: lagagnon on March 20, 2008, 04:17:40 pm
Does the 30%CPU continue, or is that during and just after the loading of your desktop? Show us ps aux after everything has loaded. Is it still 30% - the reason being is 30% is about right for loading X and a window manager, but it should then settle down to 3-5% on idle. Maybe conky is not updating very often?
Title: Re: startx - causes high CPU usage.
Post by: sdk on March 21, 2008, 02:28:40 am
Thanks for reply. Just after 'startx' - 'ps aux' will show that there is *no* process which uses more >0.5% of CPU. The '/usr/bin/startx' is shown like it was using 0.1% so posting 'ps aux' here won't explain anything, only on 'top' I see high CPU usage, but also - *none* of the processes reaches so high CPU usage. When I kill the process 'kill -9' usage drops to normal rates. My conky works well, actually it just helped me to notice the weird behaviour, for monitoring system I use tested tools, like 'top'.

Definitely '/usr/bin/startx' causes it, but high usage is not shown in any command.