# [PC-BSD] Lenovo Ideacentre A300 / Intel GMA 4500M - terrible slow



## Radek (Oct 23, 2010)

Hi everybody,

I have a Lenovo Ideacentre A300 all-in-one desktop with Mobile Intel GMA 4500M video card. In BIOS I saw read that this card has 32 MB VRAM which is not really much. But anyway I have heavy performance issues with KDE. 
I've used Kubuntu 10.04 before and to be honest, the performance wasn't very good but a bit better. 
Then I have updated to Kubuntu 10.10 but I wasn't able to use it as the latest version of Ubuntu does not recognizes my built-in screen.
So I decided to try FreeBSD/PC-BSD. I was able to fix most of these issues I had but the performance of KDE is simply terrible and I'm not able to work with this system. It needs about 10 seconds before Firefox is started for example. 
It doesn't matter if the desktop effects are enabled or disabled. 

Any Idea what can I do. Some tricks to improve the xorg.conf? I don't need this computer for games so 3D acceleration is not important for me.

I should also mention that I'm using two monitors side by side and it probably need also bit more power but if I disable the second on, the behavior is not much better.

Regards,
Radek


----------



## da1 (Oct 23, 2010)

Although not a direct answer to your question, but how about trying xfce4 ?


----------



## vermaden (Oct 23, 2010)

KDE4 is not without a reason named 'open source vista' 

Try XFCE/Gnome version (with metacity/xfwm - without any 3D candy WM).


----------



## Radek (Oct 23, 2010)

tried xfce4 already too. It's of course a bit better but as soon I have to start some application which is not native for xfce4 it's very slow too.


----------



## vermaden (Oct 23, 2010)

Strange, I use openbox with both GKT2 and QT3/QT4 applications and messing them together does not do any probems.

I personally use the same gfx card as You (Intel X4500 GMA) on that computer without problems.


----------



## da1 (Oct 23, 2010)

Radek said:
			
		

> tried xfce4 already too. It's of course a bit better but as soon I have to start some application which is not native for xfce4 it's very slow too.



Hmm, does the CPU have some "green" technology in it ? I mean, is the frequency changing when idle ?


----------



## Radek (Oct 23, 2010)

vermaden said:
			
		

> Strange, I use openbox with both GKT2 and QT3/QT4 applications and messing them together does not do any probems.



And how does KDE works for you?



			
				da1 said:
			
		

> Hmm, does the CPU have some "green" technology in it ? I mean, is the frequency changing when idle ?



It's Intel Pentium DualCore T4400 and as far I know it's a mobile processor so it's very possible.


----------



## vermaden (Oct 23, 2010)

Radek said:
			
		

> And how does KDE works for you?


Dunno I do not use it 

The only QT3/QT4 component(s) on my workstation is VirtualBox OSE (I also use *vboxgtk*)


----------



## Radek (Oct 23, 2010)

I realized that XFCE seems to be very powerful so maybe I will try to become friend of XFCE but I really need to use some apps like Firefox, Eclipse, Kontact aso. 

However it's not the real solution of this problem I guess. It's quit new computer with, I think, powerful components so it should works better.

I know that this problem isn't caused by FreeBSD nor Linux so I can only guess it something with the intel driver.


----------



## wblock@ (Oct 23, 2010)

Radek said:
			
		

> Hi everybody,
> 
> I have a Lenovo Ideacentre A300 all-in-one desktop with Mobile Intel GMA 4500M video card. In BIOS I saw read that this card has 32 MB VRAM which is not really much. But anyway I have heavy performance issues with KDE.
> I've used Kubuntu 10.04 before and to be honest, the performance wasn't very good but a bit better.
> ...



Are you familiar with the saying "The error is on line 17."?

Show your xorg.conf.  Show your /var/log/Xorg.0.log.  Show your other config files.  Describe whether programs besides Firefox are slow to start.

Help us try to help you.


----------



## Radek (Oct 23, 2010)

wblock said:
			
		

> Are you familiar with the saying "The error is on line 17."?



The xorg.conf is the default one, so if this would be the problem, anyone else with this video card will have to have the same problems. The only difference is that I've added the "Virtual    3600 1080" line.

But if you wish: 


```
[root@pcbsd-3516] /usr/home/Radek# cat /etc/X11/xorg.conf 
# Xorg.conf file generated for PC-BSD

Section "ServerLayout"
    Identifier     "XFree86 Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option         "Clone" "off"
    Option         "AIGLX" "true"
EndSection

Section "ServerFlags"
        Option "AutoAddDevices" "False"
        Option "AllowEmptyInput" "Off"
EndSection

Section "Files"
    ModulePath      "/usr/local/lib/xorg/modules"
    FontPath        "/Programs/fonts/"
    FontPath        "/usr/local/lib/X11/fonts/cyrillic/"
    FontPath        "/usr/local/lib/X11/fonts/TrueType/"
    FontPath        "/usr/local/lib/X11/fonts/webfonts/"
    FontPath        "/usr/local/lib/X11/fonts/misc/"
    FontPath        "/usr/local/lib/X11/fonts/TTF/"
    FontPath        "/usr/local/lib/X11/fonts/Type1/"
    FontPath        "/usr/local/lib/X11/fonts/CID/"
    FontPath        "/usr/local/lib/X11/fonts/75dpi/"
    FontPath        "/usr/local/lib/X11/fonts/100dpi/"
    FontPath        "/usr/local/lib/X11/fonts/dejavu/"
    FontPath        "/usr/local/lib/X11/fonts/local/"
EndSection

Section "Module"
    Load           "ddc"
    Load           "dbe"
    Load           "dri"
    Load           "dri2"
    Load           "extmod"
    Load           "glx"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "keyboard"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "us"
    Option         "XkbVariant" ""
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/sysmouse"
    Option         "Buttons" "6"
    Option         "ZAxisMapping" "4 5"
    Option         "Emulate3Buttons"
EndSection

Section "DRI"
    Mode 0666
EndSection

Section "Extensions" 
    Option      "Composite" "Enable"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Monitor Vendor"
    ModelName      "Monitor Model"
EndSection


Section "Device"
    Identifier     "Card0"
    Screen          0
    Option         "AllowGLXWithComposite" "True"
    Option         "RenderAccel" "False"
    Option         "RenderAccel" "True"
    Option         "AddARGBGLXVisuals" "True"
    Option         "XAANoOffscreenPixmaps" "True"
    Option        "DRI" "True"
    Driver         "intel"
    VendorName     "Intel Video Driver"
    BusID          "PCI:0:2:0"
EndSection


Section "Screen"
    Identifier     "Screen0"
    Device         "Card0"
    Monitor        "Monitor0"
    DefaultDepth   24
    SubSection     "Display"
        Depth      24 
        Modes      "1920x1080"
        Virtual    3600 1080
    EndSubSection
EndSection

[root@pcbsd-3516] /usr/home/Radek#
```

My fault, I didn't post the logfile. I just hoped that it is some known problem and it will not be necessary. 
Here it comes: ..... sorry, too long to post and too large to attach. Here is it: https://radek.suski.eu/tmp/xorg.log.txt

Sorry for missing information. I am also software developer and I also provide support for free, open source product in our forum so I know how annoying it could be, but I simply wasn't quite sure which information in this case are needed.

Thanks in advance,

Radek


----------



## Radek (Oct 23, 2010)

And all programs are very slow but firefox and eclipse extremely.
Please let me know which information can be helpful beside them


----------



## wblock@ (Oct 23, 2010)

Radek said:
			
		

> ```
> [root@pcbsd-3516] /usr/home/Radek# cat /etc/X11/xorg.conf
> Section "ServerFlags"
> Option "AutoAddDevices" "False"
> ...



Remove the AllowEmptyInput line, it is worse than useless.



> ```
> Section "Extensions"
> Option      "Composite" "Enable"
> EndSection
> ```



Don't know if compositing is a good idea or not.



> https://radek.suski.eu/tmp/xorg.log.txt



Are you running hal?  Looks like it in the log file, which makes the AllowEmptyInput setting above worse.


----------



## Radek (Oct 24, 2010)

Ok, I removed these lines you proposed but It didn't helped  :\



			
				wblock said:
			
		

> Are you running hal?  Looks like it in the log file, which makes the AllowEmptyInput setting above worse.



I suppose I do. As I already wrote, I didn't changed much from the std config of PC-BSD.
I think without HAL most of of things like auto-detection of USB devices wouldn't work.


----------



## Radek (Oct 24, 2010)

Ok, I'm trying XFCE and it seems to works much better. At least as long I don't activate the composite options.

Anyway XFCE freezes sometimes. I had similar problems with KDE too. The strange thing is that I cannot do anything on the computer then but I still can connect via SSH and the system seems to working.
I've added 
	
	



```
hint.apic.0.disabled="1"
```
 to loader.conf but apparently it didn't help.

I just wondering if this can be some hardware problem :\


----------



## wblock@ (Oct 24, 2010)

Radek said:
			
		

> Ok, I'm trying XFCE and it seems to works much better. At least as long I don't activate the composite options.
> 
> Anyway XFCE freezes sometimes. I had similar problems with KDE too. The strange thing is that I cannot do anything on the computer then but I still can connect via SSH and the system seems to working.



That's an X lockup.  Multiple possible causes: you are using an old version of FreeBSD 8.0, and some X support code may have been added after that.  You have several ignored settings in the Device section, although maybe nothing significant.  Probably should set WITHOUT_NOUVEAU=yes in /etc/make.conf and update to the newer Mesa.



> I've added "hint.apic.0.disabled="1"" to loader.conf but apparently it didn't helped.



"apic" != "acpi"


----------



## da1 (Oct 24, 2010)

What about video drivers ? Do you have the correct/latest ones ?

Those X lockups were happening to me too, because of a faulty nvidia driver setup.


----------



## Radek (Oct 24, 2010)

wblock said:
			
		

> That's an X lockup.  Multiple possible causes: you are using an old version of FreeBSD 8.0, and some X support code may have been added after that.  You have several ignored settings in the Device section, although maybe nothing significant.  Probably should set WITHOUT_NOUVEAU=yes in /etc/make.conf and update to the newer Mesa.



I'm using the latest version of PC-BSD.
I will try your advice. Thanks a lot



			
				wblock said:
			
		

> "apic" != "acpi"



I read this advice somewhere here in forum. There was a link to the official documentation with such advice, but unfortunately I cannot find it any more


----------



## Radek (Oct 24, 2010)

da1 said:
			
		

> What about video drivers ? Do you have the correct/latest ones ?



How can I check it ??


----------



## da1 (Oct 24, 2010)

Since PC-BSD is FreeBSD, you can check the hardware supported list for your version here. Be sure to pick the equivalent one (ex: PC-BSD 7.1 = FreeBSD 7.1, 8.1 -> 8.1 and so on). For instance, for 8.1, I see no drivers for Intel GMA 4500M. That being said, although I am not a big X guy, I think you can pretty much forget about 3D acceleration (gaming, composition, flying/rotating cubes/goats).

This doesn't mean you won't have graphics, it just means no fancy gimmicks.

How to check:
*faster way:*

```
ls /var/db/pkg | grep intel
```
or
*slower way:*

```
pkg_info | grep intel
```

Basically, you need to check if you have some kind of package matching your video card vendor.


----------



## adamk (Oct 24, 2010)

da1 said:
			
		

> Since PC-BSD is FreeBSD, you can check the hardware supported list for your version here. Be sure to pick the equivalent one (ex: PC-BSD 7.1 = FreeBSD 7.1, 8.1 -> 8.1 and so on). For instance, for 8.1, I see no drivers for Intel GMA 4500M. That being said, although I am not a big X guy, I think you can pretty much forget about 3D acceleration (gaming, composition, flying/rotating cubes/goats).
> 
> This doesn't mean you won't have graphics, it just means no fancy gimmicks.
> 
> ...



I guess you didn't see the OP's Xorg log file, showing that he is using the intel driver, and has both 2D and 3D acceleration enabled in the X server.

Unfortunately, his Xorg log file looks fine, showing no serious problems.  It is, unfortunately, quite possible that the OP is suffering from the fact that the intel driver is in need of some serious loving on FreeBSD to get it performing as well as it does on Linux.

Adam


----------



## Radek (Oct 24, 2010)

adamk said:
			
		

> It is, unfortunately, quite possible that the OP is suffering from the fact that the intel driver is in need of some serious loving on FreeBSD to get it performing as well as it does on Linux.



The funny thing is that this desktop doesn't work with Linux either.
With (k)Ubuntu 10.04 is also terrible slow, with 10.10 doesn't work at all. On the other hand the latest version of Ubuntu sucks totally x(



			
				da1 said:
			
		

> How to check:
> *faster way:*
> 
> ```
> ...




```
ls /var/db/pkg | grep intel
xf86-video-intel-2.7.1_3

pkg_info | grep intel
xf86-video-intel-2.7.1_3 Driver for Intel integrated graphics chipsets
zh-libchewing-0.3.2 The Chewing intelligent phonetic input method library
```

I haver also tried to update libGL (Mesa??) but I think I do something wrong:

```
[root@pcbsd-3516] /usr/ports/graphics/libGL# make install clean
make: No such file or directory
[root@pcbsd-3516] /usr/ports/graphics/libGL#
```

I did also:

```
portsnap fetch extract
freebsd-update install
```

I'm not very familiar with ports but I think it's not the expected result :stud


----------



## Radek (Oct 26, 2010)

Is there any possibility to see which options for the X-Server are currently used?
I just wrote explicit in the xorg.conf:

```
Option "AccelMethod" "UXA"
```
and then the X-Server doesn't start. However there are no errors in the logfile.

The manual for the intel driver said:


> Default: "UXA" if kernel-modesetting is available, "EXA"  otherwise.



So it means for me that the UXA method is not available which is a bit strange. So I would like to see also all other option the X-Server is using for the driver. Is it possible?


----------



## adamk (Oct 26, 2010)

Not having UXA is not start at all.  It requires KMS which is not available on FreeBSD.

Adam


----------



## Radek (Oct 26, 2010)

adamk said:
			
		

> Not having UXA is not start at all.  It requires KMS which is not available on FreeBSD.



Ok, understand.
But anyway, is there some possibility to check which setting are currently used?
Maybe there is something wrong recognized. I just fall into despair. I cannot imagine that this card is sooooo bad  My old HP XE3 with i910 8MB was much better :\


----------



## Radek (Oct 26, 2010)

Just to show you what I meant with poor performance:
http://www.youtube.com/watch?v=4M8ox3Xrd-o

At the begin I click the minimized window of eclipse to get it back to the top. As you can see it needs more than 20 seconds before the window is fully painted :\


----------



## adamk (Oct 26, 2010)

Radek said:
			
		

> Ok, understand.
> But anyway, is there some possibility to check which setting are currently used?



Only by checking your log file.


```
(II) EXA(0): Driver registered support for the following operations:
(II)         Solid
(II)         Copy
(II)         Composite (RENDER acceleration)
```

You are using EXA, which is good.  It's accelerating those specific drawing functions.


```
(II) intel(0): direct rendering: XF86DRI Enabled
```

Direct Rendering is enabled in the X server, which is also good.


```
(II) AIGLX: Loaded and initialized /usr/local/lib/dri/i965_dri.so
```

Accelerated indirect GLX is enabled, which is also good.


```
(WW) intel(0): Option "AllowGLXWithComposite" is not used
(WW) intel(0): Option "RenderAccel" is not used
(WW) intel(0): Option "AddARGBGLXVisuals" is not used
(WW) intel(0): Option "XAANoOffscreenPixmaps" is not used
```

None of these are valid options with the current intel driver.  There should be no harm in having them in your /etc/X11/xorg.conf file, but there's certainly no need for them.

By all accounts, your X server is setup and configured the way it should be.  I will admit, though, that 20 seconds to redraw eclipse is an awfully long time.  I really have no explanation for that.  

EDIT:  These is part of the reason that I've stopped recommending intel GPUs to FreeBSD users.


----------



## Radek (Oct 26, 2010)

adamk said:
			
		

> These is part of the reason that I've stopped recommending intel GPUs to FreeBSD users.



I should stuck with NVidia, I never had any problems with these video cards.
But it's too late now.

Thank you very much for your help.


----------



## Radek (Oct 27, 2010)

Ok, I just switched to Gnome ( it's reminded why I'm using KDE ). It's seems to work a bit better than KDE.
Thanks to everybody for help


----------

