# High xorg usage :(



## ZombieBeefchunk (Sep 11, 2011)

Hey guys,

I need a little help. Xorg is using a hell of a lot of cpu in openbox. It's at 30% or more when I'm not doing anything. I know it's extremely high and on my other computers it uses 1-2%. I have no idea what's causing it and have no idea how to start troubleshooting the problem. I've searched for answers online but without luck. Anyone have any idea what's going on? Could it have anything to do with my video card not being properly setup? That's the closest I got to an answer  I believe I should be using x86-video-intel as that card is an integrated intel graphics card though I believe my comp is using vesa instead. Forgive me if this is all confusing to you. I'm still a beginner  Thank you.


----------



## nekoexmachina (Sep 11, 2011)

You can use `$ glxinfo|grep -i render`
to check what driver are you using.
Also same thing with nvidia card from time to time with >10days uptime. 
Do not know the source of the trouble too.


----------



## ZombieBeefchunk (Sep 12, 2011)

nekoexmachina said:
			
		

> You can use `$ glxinfo|grep -i render`
> to check what driver are you using.
> Also same thing with nvidia card from time to time with >10days uptime.
> Do not know the source of the trouble too.



Command not found. Can't find it in ports anywhere either. I do know that the video card on the PC I'm using is an Intel 82845G/GL/GV/GE/PE Integrated video card if that sheds any light on it. This is confusing, I wish I could fix it. It's sluggish


----------



## DutchDaemon (Sep 12, 2011)

It's part of graphics/mesa-demos. People telling someone to run glxinfo should really add that information. It's not obvious.


----------



## ZombieBeefchunk (Sep 12, 2011)

DutchDaemon said:
			
		

> It's part of graphics/mesa-demos. People telling someone to run glxinfo should really add that information. It's not obvious.



It's no problem, I found it  The output was:


```
direct rendering: Yes
OpenGL renderer string: Software Rasterizer
```

Any ideas? I'm lost. I don't think the video card on this PC is anything special and I don't think it's capable of 3d acceleration. The PC is a Dell Optiplex GX260 which is just a cheap PC for offices and the like. I never set up any video drivers or anything when I installed FreeBSD. I don't know how


----------



## wblock@ (Sep 12, 2011)

It should (probably) use the intel xorg driver, but might be using vesa instead.

Put your /var/log/Xorg.0.log on pastebin.com and post the link.  Also post your xorg.conf.


----------



## ZombieBeefchunk (Sep 12, 2011)

wblock said:
			
		

> It should (probably) use the intel xorg driver, but might be using vesa instead.
> 
> Put your /var/log/Xorg.0.log on pastebin.com and post the link.  Also post your xorg.conf.



Xorg.0.log: http://pastebin.com/RLxADctK

I don't even think I have an xorg.conf. Certainly can't find it anywhere. I've looked everywhere for it. Definitely no xorg.conf :/ Thank you for looking into this for me


----------



## Beastie (Sep 12, 2011)

A Brookdale? My condolences. I've been using mine for years with acceleration disabled; it used to freeze the machine randomly on X startup.


----------



## ZombieBeefchunk (Sep 12, 2011)

Beastie said:
			
		

> A Brookdale? My condolences. I've been using mine for years with acceleration disabled; it used to freeze the machine randomly on X startup.



Yeah, it's pretty foul. I guess the issue with xorg isn't video card related? This high cpu usage is really showing it's effects. Slow moving  I noticed one person said he had the same problem with xorg and he deleted it and switched to xfree86. Is this an option for me? I just worry about screwing my system up when doing that.


----------



## wblock@ (Sep 12, 2011)

There are easier things to try before a major switch to an unsupported xfree86.  Start with creating an xorg.conf so you can experiment with disabling acceleration and other features.  A BIOS update might help.  If nothing else, an AGP or PCI video card could be added.


----------



## Beastie (Sep 12, 2011)

This card model works fine with the official Intel drivers under Windows. It's definitely a driver/Xorg-related issue, and as far as I know, the Xorg part driver hasn't been updated in a while. This _may_ change when the new GEM-KMS driver is fully implemented and thoroughly tested and the newest Intel GPU drivers are ported. But I'm not holding my breath.
Xfree86 has been forked and replaced by Xorg almost entirely. The Xfree86 project is pretty much dead.

Follow wblock's advice. You can find instructions on generating and testing xorg.conf in the Handbook. You probably should add appropriate *DefaultDepth* and *Modes* lines.
The option that disables acceleration is *NoAccel*. It will obviously not solve your Xorg CPU usage entirely - at least not when scrolling too much and even less when rendering 3D (which won't work much) - but it should at least improve the idle time usage.


----------



## ZombieBeefchunk (Sep 15, 2011)

Yo. So I managed to salvage a gb of ram from an old computer in the basement and took an ATI Radeon 9800 Pro card off a friend's old computer so xorg is now at 15% instead of 30%. Still seems high, of course, but it IS an improvement. I created an xorg.conf by typing "Xorg -configure" as root and it produced one for me. It hasn't really changed anything however. Any have any guidance on getting this to function? Xorg.conf lists that it's using the correct driver (radeon) and I added and omitted what was mentioned before with no difference in performance. Glxinfo|grep -i render still produces the result I mentioned before: software rasterizer, etc. Any ideas? Also, I used to mount my external hard drive with fstab but after making the xorg.conf, freebsd doesn't boot unless I unplug it :/


----------



## wblock@ (Sep 15, 2011)

It should not still be using a software renderer.  Could you post the current /var/log/Xorg.0.log to pastebin.com?


----------



## ZombieBeefchunk (Sep 15, 2011)

wblock said:
			
		

> It should not still be using a software renderer.  Could you post the current /var/log/Xorg.0.log to pastebin.com?



I'll get back to you soon on that. System had a major meltdown because my niece, who touches everything, managed to severely screw things up so I reinstalled. The problem with that is that I'm trying to bzcat my dump.bz2 file in single user mode like the guide says yet bzcat only works in normal mode. In single user mode "not found". *sigh* Anyone have any advice? I guess I'll have to decompress it and then throw it back on usb. I know this isn't the right place so I'll refrain from going further. I'll get the new xorg.conf to you soon as soon as I fix this


----------



## adamk (Sep 16, 2011)

ZombieBeefchunk said:
			
		

> I'll get the new xorg.conf to you soon as soon as I fix this



Honestly, /etc/X11/xorg.conf is must less useful to us than /var/log/Xorg.0.log


----------



## ZombieBeefchunk (Sep 16, 2011)

adamk said:
			
		

> Honestly, /etc/X11/xorg.conf is must less useful to us than /var/log/Xorg.0.log



Ah yeah, that's what I meant to type  I'm reinstalling everything from scratch again so it's going to be a day more or less  The dump file was screwed up and didn't work out for me. Installing xorg from ports as we speak then I think I'll try Awesome WM instead of Openbox like I had before. I imagine I will have the same problem with xorg but maybe I'll get lucky and the reinstall will recognize my new (but old) ATI Radeon  I'll keep you guys posted.


----------



## wblock@ (Sep 16, 2011)

Try twm(1) before installing anything beyond the base xorg.  And of course there's graphics/mesa-demos, which has the not-a-benchmark yet useful glxgears.


----------



## ZombieBeefchunk (Sep 16, 2011)

wblock said:
			
		

> Try twm(1) before installing anything beyond the base xorg.  And of course there's graphics/mesa-demos, which has the not-a-benchmark yet useful glxgears.



Why twm? Not contesting, just curious. Isn't it super old-school? Oh yeah, I also managed to upgrade to 1gb of ram.. Yay! Still waiting on xorg compile. Man, it takes so long  Still shopping window managers. I had Openbox before and I thought it was great but I want to try something different like a tiling wm like awesome, wmii, dwm, xmonad, etc. Awesome, xmonad, dwm are appealing since they can do more than tiling. Variety is good  Everyone raved about Awesome so I'm interested in trying it out. I hear it's tricky to get used to, however.


----------



## ramonovski (Sep 16, 2011)

Precisely because of the "old-school" it is, it results a perfect tool to test your X server, like pinging to Big G (google).

About the WMs, I recommend you scrotwm: small, fast, simple.


----------



## wblock@ (Sep 16, 2011)

twm comes in as part of x11/xorg.  No additional overhead, and no additional requirements.


----------



## ZombieBeefchunk (Sep 22, 2011)

Well, sorry for the late reply. I finished the reinstall last week and everything seemed to fix itself. I have a gig of ram and a radeon card and it's all working great. The funny thing is now I'm doing a minimal setup (midnight commander, htop, mutt, cmus, etc). I was using Awesome WM and I liked it but I don't know Lua so I'm now using Wmii 3.9 and I'm very satisfied with it. Sorry it took so long for me to reply. I appreciate all the help


----------

