LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-04-2007, 01:10 AM   #1
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Rep: Reputation: 30
choppy sound w/ High CPU usage


Hey there, I have a problem, and all the sources I find are either outdated or... just not close enough to my problem for me to adapt.

So anyway, whenever I do anything that requires the CPU, (like opening up a .tgz file or moving a file), while I'm running amarok (or anything else) the music will skip, and even so far as the mouse getting laggy.

Here's my info:
Code:
CPU: Pentium 4 2.8 GHZ
RAM: 2GB
Swap: 1GB

KDE sound system:
Skip prevention on, and set to "as large as possible"
Audio Device: ALSA
nothing else in that menu is checked or non-default

Linux Kernal: 2.6.20.3
Distro: Slackware 11.0
KDE 3.5.4
I really don't have anything else running...


Any ideas?

--Thanks,
David
 
Old 04-04-2007, 01:25 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
If you are going to run a CPU intensive operation while running time critical functions, you probably want to nice the heavy process. For example:

nice -n19 tar xzf some.tgz
 
Old 04-04-2007, 09:40 AM   #3
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Original Poster
Rep: Reputation: 30
Well, is there anyway I can get KDE to do that for all the processes, or set the audio players at a higher priority than all other processes? I know my computer CAN work and play audio at the same time... heck it can play any song w/o skipping while Windows is crashing lol.
 
Old 04-04-2007, 12:21 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
It's not normally necessary. Instead, consider increasing the audio buffers. For example, if you are using the xine engine in Amarok, quit Amarok, edit '~/.kde/share/apps/amarok/xine-config' and set 'engine.buffers.audio_num_buffers:1000'.

You should also make sure your hard drives have DMA enabled. For example:

hdparm -d1 /dev/hda
 
Old 04-04-2007, 12:45 PM   #5
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Original Poster
Rep: Reputation: 30
yeah I can't turn on DMA on either of my hard drives, it says when I try:

Code:
bash-3.1# hdparm -d1 /dev/hda

/dev/hda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
and
Code:
bash-3.1# hdparm -d1 /dev/hdb

/dev/hdb:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
I noticed that when I startup, fschk says that every time.

Whenever I compiled my kernal (2.6.20.3) I enabled these:
Code:
(I used make xconfig)
DMA Engine support:
Support for DMA Engines: checked
Network: TCP receive copy offload: checked
Intel I/OAT DMA support: checked
any thoughts?
Thanks
 
Old 04-04-2007, 12:54 PM   #6
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
The lack of DMA is your problem; every disk I/O monopolizes your CPU. If you are using the IDE connectors on your motherboard, make sure your BIOS is up to date, and that you are using the proper (80 conductor) cables. If that doesn't correct the problem, buy a PCI card and move the cables to that.
 
Old 04-04-2007, 04:54 PM   #7
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Original Poster
Rep: Reputation: 30
OK, I don't understand it. I compiled into the kernel anything that MIGHT help this, i.e. I put in the right chipset for the I2C thing. The cables fit the drive just fine, I don't know how to differentiate the correct and incorrect cables from one another. I really don't want to but a PCI card because I'm gonna get a new PC here in a few months.

I even tried
Code:
hdparm -X -d1 /dev/hda
and gave me pretty much the same error. Whenever I boot up, fsck gives me a warning telling me dma is off, and that's been around since I upgraded my kernel from the original one Slackware 11.0 has to 2.6.20.3. So I have a feeling that at one time DMA DID work.

Thanks for the input,
David
 
Old 04-04-2007, 05:39 PM   #8
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Original Poster
Rep: Reputation: 30
OK, so I looked at my Hard drives harder, and they use the same interface, but are called different things. Here are the specs:

Code:
Manufacturer: Hitachi (/dev/hda, Windows hard drive)
Model #: IC35L090AVV207-0 (the "-0" makes it not really findable through google)
Interface: ATA-6
Supports: UDMA 5 (100) aka UDMA/100
Code:
Manufacturer: Seagate (/dev/hdb, Linux's hard drive)
Model #: ST380011A
Interface: Ultra ATA/100
supports: UDMA 5 (100) aka UDMA/100
Now, http://en.wikipedia.org/wiki/Advance...ogy_Attachment says that ATA/ATAPI-6 is also called ATA-6 AND Ultra ATA/100.

So what do I need to enable to make UDMA 5 work?

Thanks,
David
 
Old 04-04-2007, 05:58 PM   #9
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
80-conductor cables. Count the number of wires on the ribbon cable; if it's 40, you have the wrong cable. You also need a controller that is UDMA5/ATA100 or better.
 
Old 04-04-2007, 06:15 PM   #10
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Original Poster
Rep: Reputation: 30
OK, it is an 80-conductor cable, now how do I check to see what controller I have?
 
Old 04-04-2007, 06:22 PM   #11
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Hi David
Umm, well one thing I learned, both from making kernels AND from my own BIOS, is that there are two types of "80-conductor" IDE ribbon-cables. One is infact a 40-conductor cable, and the other is an 80-conductor. In many cases, it's obvious, because a lot of machines have one of each. The thing of it all is this: with a real 80-conductor cable, some devices will NOT run in DMA mode, and in particular, they won't go above UDMA-2 if they go at all.
If DMA has worked for you in the past, on ANY operating system, then don't worry about the cables..

So now.. **SOMETIMES** depending on the machine, and the BIOS, a hard disk should be the first thing on the IDE bus, and THEN a CD device. It is common (my machine is an example), atleast perhaps with the exception of newer/higher-tech machines, that the IDE0 and IDE2 (the first devices on each IDE) can be UDMA-100 or UDMA-133, but the second device on each will not go that high.
I have this case: My Hard disk hda is UDMA5, hdb (CD) can do UDMA4 but will only reach UDMA2. My hdc (a HD) is UDMA5, and hdd (a DVD) can do UDMA4 or 5, but is only at UDMA2 (which incidentally is perfectly good for watching DVD's and using the computer simultaneously).

So, assuming UDMA *has* worked for this device at some time in the past, things to check are (and any of these may have been mentioned above, by other members too):
1-- Check BIOS: If it's upgradeable, flash the newer one in.
2 - Check for 32-bit IO capability in the BIOS; enable it.
3 - Enable UDMA in the BIOS (I think you said you did this)..
4 - In your LILO, either at the top, or in the image section for your OS, append the line "idebus=66" to set the IDE bus speed to 66Mhz. (This should work, whether it fixes DMA or not; if it doesn't you will see in dmesg something like "bad idebus speed; using 33")..
Umm....... Atop this stuff so far, I do like you were doing, using hdparm -d -1 /dev/hdx, to turn on all my DMA after bootup..
Sorry if you have tried all this stuff, or if it still doesn';t work.. I will add more if/as I think of stuff..
 
Old 04-04-2007, 06:28 PM   #12
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Plus, after re-reading the first page of this thread, it sounds like you have missed something in your kernel upgrade (that is, IF you constructed it yourself, rather than the default..)
If so, triple check all your IDE/ATA/ etc. stuff in the kernel, and as Macemonta suggested, identify your IDE chipset by going to the motherboards manufacturer website and looking up the board, OR by opening the machine and physically identifying the IDE chip(s).
 
Old 04-04-2007, 06:32 PM   #13
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by davidguygc
OK, I don't understand it. I compiled into the kernel anything that MIGHT help this, i.e. I put in the right chipset for the I2C thing. The cables fit the drive just fine, I don't know how to differentiate the correct and incorrect cables from one another. I really don't want to but a PCI card because I'm gonna get a new PC here in a few months.

I even tried
Code:
hdparm -X -d1 /dev/hda
and gave me pretty much the same error. Whenever I boot up, fsck gives me a warning telling me dma is off, and that's been around since I upgraded my kernel from the original one Slackware 11.0 has to 2.6.20.3. So I have a feeling that at one time DMA DID work.
So this is your kernel which is defaulting to generic IDE support, thus the DMA is disabled.
Double-check your kernel configuration, you missed your chipset support.
 
Old 04-04-2007, 08:47 PM   #14
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Original Poster
Rep: Reputation: 30
ARGH, for the life of me I'd love to update my BIOS, but dell only has a Windows format, and Vista won't let me open it w/o having administrator privalege... even though my account is one...
Hopefully I'll find a way around it
 
Old 04-04-2007, 09:05 PM   #15
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
You can update your BIOS from MSDOS, if you have an MSDOS boot floppy, or make one

PS- @ Vista locking you out, that sux..

NOTE to Macemonta, next post down: WOW, they actually have BIOS flash tools for Linux?? I have been searching on and off for months for such a thing, because I don't have any Windows installed.. Too bad my BIOS is already updated to the latest and greatest (LOL, that happens to be 3 yrs old now, this 'new' BIOS) But I would sure like to know that the Linux-OS ability exists. Thanks for posting those links below)

Last edited by GrapefruiTgirl; 04-04-2007 at 09:20 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sound crackle on high CPU usage KyPeN Linux - Hardware 12 05-22-2007 08:26 PM
source of high cpu usage edgjerp Linux - Software 4 02-02-2007 03:37 AM
High Cpu usage untak Debian 21 01-23-2007 06:21 AM
cpu usage high corbintechboy VectorLinux 2 07-27-2005 08:11 AM
CUPS and High CPU usage Malibyte Linux - Software 11 10-21-2004 09:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration