# Laggy and unresponsive system, possible hardware misconfig?

## enbuyukfener

Looks like I need to call on help from this forum for the second time. Hopefully everything will be smooth after this and I get to helping others instead of labouring over my own system which is fearing regular Windows usage if this problem does not get resolved.

I've recently installed Gentoo however I am finding the responsiveness of the system to be terrible. A similar scenario happened with Ubuntu. It should be noted by system should be very capable. Also, on Windows, there is no problems, programs open in a fraction of a second, as do tabs, everything is smooth.

Description of the lag/unresponsiveness:

- Jerky moving, minimising and maximising of windows

- Long waits before application opening (first and subsequent tries)

- Slow GUI actions such as opening tabs in the browser or even the terminal

- Problem is accentuated when using nVidia drivers, although this could be because the system is trying to do more when nVidia drivers are enabled

System description:

- Dell Vostro 1500 laptop

- Core 2 Duo T7100 (1.8Ghz), 2GB RAM, 160GB SATA HDD, Geforce 8600M-GT gfx card

Gentoo setup:

- amd64 2008.0 installed from stage3 tarball

- Kernel 2.6.24-gentoo-r8 slightly modified (results unaffected when using "stock" or modified kernel config)

- nVidia 169.09 drivers installed through Portage (problem existed in Ubuntu with 100.xx, 169.12 and 173.08b drivers)

- Properly configured make.conf and an "emerge -e system" has been run

Diagnosis attempts

dmesg - see http://rafb.net/p/ptRPYO56.html

"top" shows nothing taking all of the system processes

CPU frequency scaling governors do not have any effect, i.e. same results with "performance" and "ondemand"/"conservative"/"powersave"

Hard drive (seems fine, the buffered disk reads should be a bit faster from intuition but maybe I'm wrong). Some output using hdparm (even though I'm using libata drivers for a SATA hard drive):

```
# hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   2186 MB in  2.00 seconds = 1094.06 MB/sec

 Timing buffered disk reads:  130 MB in  3.01 seconds =  43.19 MB/sec

# hdparm -i /dev/sda

/dev/sda:

 Model=TOSHIBA MK1637GSX                       , FwRev=DL040D  , SerialNo=           97GGTIZ1T

 Config={ Fixed }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0

 BuffType=unknown, BuffSize=0kB, MaxMultSect=16, MultSect=?8?

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=312581808

 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}

 PIO modes:  pio0 pio1 pio2 pio3 pio4 

 DMA modes:  sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 

 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 

 AdvancedPM=yes: unknown setting WriteCache=enabled

 Drive conforms to: Unspecified:  ATA/ATAPI-3,4,5,6,7

 * signifies the current active mode
```

So...

Where else should I be looking? What could be the bottleneck or culprit here? Feel free to ask for any other outputs for further diagnosis or make any suggestions.

Thanks in advance for any help.

----------

## poly_poly-man

your IO scheduler is wrong. I forget which is the correct one, but that is a big cause of this lag - I've seen this many times before. No hardware issues - maybe someone else can help out here?

https://forums.gentoo.org/viewtopic-t-482731.html

poly-p man

btw, buffered is pretty much directly from the hard drive - slower. Cached is basically a measure of your memory speed.

----------

## enbuyukfener

I think you're spot on. Pardon my ignorance then as I overlooked ioctl errors when using some hdparm functionality dismissing them by thinking that it was only of relevance to IDE hard drives.

Thank you for the pointer, I'll report back once I get it worked out.

Just one thing, the problem doesn't seem to be linked with disk I/O. But then, maybe I am underestimating how much disk access goes on without my awareness of it.

----------

## enbuyukfener

Not looking good... I've tried all other IO schedulers along with about 10 other kernel re-configurations and no change.

Are you sure the CFQ IO scheduler is a wrong choice? (finding info about this has been very difficult)

----------

## enbuyukfener

Although it doesn't explain sub-optimal 2D performance with nv/vesa drivers, it could be a nvidia driver problem...

I have posted at LQ as this thread probably went off in the wrong direction and is not Gentoo specific:

http://www.linuxquestions.org/questions/linux-hardware-18/slow-2d-drawing-using-nvidia-driver-and-8600m-gt-card-646315/

----------

## bunder

do you have speedstep disabled in the bios?  i did on my laptop and it was stuck at 800mhz...  the way i fixed it was to turn it on in the bios but not compile a module for it, forcing it to full speed.  (i never take it off ac, so why bother  :Wink: )

cheers

----------

## enbuyukfener

I've just set it to performance mode and /proc/cpuinfo reports 1800MHz speed however I'll check the BIOS setting next time I reboot and try it the other way. Having said that, the problems I am having should not be occurring even if the system was running 2x800MHz.

----------

## enbuyukfener

For the record, Arch 2008.03 i686 with Arch's nvidia package and a Gnome/Compiz-Fusion/Emerald/NVidia 169.12 environment is working flawlessly, finally I have tab and window switching that can be measured in milliseconds.

I am currently setting it up further and enjoying a proper desktop set up but I'll try to find out what was the factor.

----------

