LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-13-2004, 11:09 AM   #1
caspar_wrede
LQ Newbie
 
Registered: May 2004
Location: Berlin, Germany
Distribution: Debian
Posts: 11

Rep: Reputation: 0
Music skips during harddisk access


I have a debian system that I use, amongst other things, as a fileserver and for playing music. My problem is that as soon as the harddisk gets used slightly more intensely -- i.e. Copying a biggish file across the network or from one partition to another -- music playback starts skipping. It's not really bad, but still bad enough to drive me up the wall.

Here's my system:
- I use xmms to play music. It also skips if I play internet radio. I have the sound set to realtime priority in KDE.
- I use arts.
-My system is fast 1.8 GHZ + with 500 MB RAM
- Kernel is 2.4.25

Hmm, can't think of any more useful information.

Any ideas?
 
Old 09-13-2004, 11:17 AM   #2
guzzi
Member
 
Registered: Jun 2004
Location: Lawrence, KS
Distribution: Slackware
Posts: 308

Rep: Reputation: 39
music skips

I bet you need a faster hard drive or controller, or both.

This is the sort of thing that caused me to go to SCSI and fast drives.
 
Old 09-13-2004, 01:04 PM   #3
sh1ft
Member
 
Registered: Feb 2004
Location: Ottawa, Ontario, Can
Distribution: Slackware, ubuntu
Posts: 391

Rep: Reputation: 31
Probably the cache in your hdd is not big enough, a drive with 8mb cache would probably solve your problem. And if that's what you have... then well I don't know.
 
Old 09-13-2004, 01:20 PM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,642

Rep: Reputation: 111Reputation: 111
Re: Music skips during harddisk access

Quote:
Originally posted by caspar_wrede
I have a debian system that I use, amongst other things, as a fileserver and for playing music. My problem is that as soon as the harddisk gets used slightly more intensely -- i.e. Copying a biggish file across the network or from one partition to another -- music playback starts skipping. It's not really bad, but still bad enough to drive me up the wall.

Here's my system:
- I use xmms to play music. It also skips if I play internet radio. I have the sound set to realtime priority in KDE.
- I use arts.
-My system is fast 1.8 GHZ + with 500 MB RAM
- Kernel is 2.4.25

Hmm, can't think of any more useful information.

Any ideas?
Almost sounds like DMA is not enabled on the the drive. Install hdparm and use something like this to check the settings.
Code:
[HappyTux:/home/stephen]# hdparm  /dev/hda

/dev/hda:
 multcount    = 16 (on)
 IO_support   =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 16383/255/63, sectors = 234441648, start = 0
And something like this to see the modes supported and set.

Code:
[HappyTux:/home/stephen]# hdparm -i /dev/hda

/dev/hda:

 Model=WDC WD1200JB-00EVA0, FwRev=15.05R15, SerialNo=WD-WMAEK2297036
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=74
 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16
 CurCHS=4047/16/255, CurSects=16511760, LBA=yes, LBAsects=234441648
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: device does not report version:

 * signifies the current active mode
Now if DMA is not set and is supported then you would need to edit the file /etc/hdparm.conf and put a section in there for your drive and it will be set every time you boot, you can use hdparm -d1 /dev/hda to set it immediately then let the config file take care of it on next boot. The comments are fairly good in the file so you should be able to figure out what you need. Oh and if you want to test the speed of the drive then.

Code:
[HappyTux:/home/stephen]# hdparm -Tt /dev/hda

/dev/hda:
 Timing buffer-cache reads:   804 MB in  2.00 seconds = 401.26 MB/sec
 Timing buffered disk reads:  132 MB in  3.04 seconds =  43.40 MB/sec
The smaller number is the really important one for everyday use. All this as root of course.
 
Old 09-13-2004, 08:57 PM   #5
caspar_wrede
LQ Newbie
 
Registered: May 2004
Location: Berlin, Germany
Distribution: Debian
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks people for your help.

It seems my DMA is not enabled:

Code:
/dev/hda:
 multcount    = 16 (on)
 IO_support   =  3 (32-bit w/sync)
 unmaskirq    =  1 (on)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)
 geometry     = 30401/255/63, sectors = 488397168, start = 0
So far so good. Doing the second command suggested by Mr. HappyTux gives me this:

Code:
root@kronos public# hdparm -i /dev/hda

/dev/hda:

 Model=WDC WD2500JB-00EVA0, FwRev=15.05R15, SerialNo=WD-WMAEH2433533
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=74
 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16
 CurCHS=4047/16/255, CurSects=16511760, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: device does not report version:

 * signifies the current active mode
I have next to no idea what all this means. Anyway, heading on I ran into a problem:

Code:
root@kronos public# hdparm -d1 /dev/hda

/dev/hda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
Operation not permitted? I have no idea if my drive has DMA support. It has 250 GB and was purchased less than a year ago. Is it a standard feature by now?


And here are my statistics. They seem low -- well, the second reading anyway:

Code:
root@kronos public# hdparm -Tt /dev/hda

/dev/hda:
 Timing buffer-cache reads:   932 MB in  2.00 seconds = 466.00 MB/sec
 Timing buffered disk reads:   20 MB in  3.31 seconds =   6.04 MB/sec
Thanks for your help. Your personally preferred Prime Mover is smiling upon you.

Caspar
 
Old 09-13-2004, 09:35 PM   #6
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,642

Rep: Reputation: 111Reputation: 111
Quote:
Originally posted by caspar_wrede
Thanks people for your help.

It seems my DMA is not enabled:
I have next to no idea what all this means. Anyway, heading on I ran into a problem:

Code:
root@kronos public# hdparm -d1 /dev/hda

/dev/hda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
Operation not permitted? I have no idea if my drive has DMA support. It has 250 GB and was purchased less than a year ago. Is it a standard feature by now?


The drive definitely supports DMA it is from the same series as mine only twice as large and from the looks of that output it looks like the chipset for the motherboard or dma is not enabled or compiled as modules.
Quote:
And here are my statistics. They seem low -- well, the second reading anyway:

Code:
root@kronos public# hdparm -Tt /dev/hda

/dev/hda:
 Timing buffer-cache reads:   932 MB in  2.00 seconds = 466.00 MB/sec
 Timing buffered disk reads:   20 MB in  3.31 seconds =   6.04 MB/sec
Thanks for your help. Your personally preferred Prime Mover is smiling upon you.

Caspar
Way too low it should be pretty much the same range as mine try this with the config file for your kernel and see if you have similar output.


Code:
>$ grep -i dma /boot/config-2.6.8.1-ck6
CONFIG_GENERIC_ISA_DMA=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_ADMA=y
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_SOUND_DMAP is not set
And if you know what motherboard chipset you have do the same for instance mine is a via based board so I have this set.

Code:
>$ grep -i via /boot/config-2.6.8.1-ck6
# CONFIG_MVIAC3_2 is not set
CONFIG_BLK_DEV_VIA82CXXX=y    <----- motherboard chipset
CONFIG_VIA_RHINE=m
# CONFIG_VIA_RHINE_MMIO is not set
# CONFIG_VIA_VELOCITY is not set
CONFIG_AGP_VIA=m
# CONFIG_I2C_VIA is not set
CONFIG_I2C_VIAPRO=m
CONFIG_SENSORS_VIA686A=m
CONFIG_SND_VIA82XX=m
CONFIG_SOUND_VIA82CXXX=m
CONFIG_MIDI_VIA82CXXX=y
Now I look again I see you refer to your processor as a 1.8 so you probably have intel so use grep PIIX /boot/config-2.?.?? replace the ?'s with the output you see from uname -r when doing the above commands for the 2.6.8.1-ck6 I have as well.
 
Old 09-14-2004, 05:34 AM   #7
caspar_wrede
LQ Newbie
 
Registered: May 2004
Location: Berlin, Germany
Distribution: Debian
Posts: 11

Original Poster
Rep: Reputation: 0
Hi Stephen,

Here is the result of grepping for DMA in the config file

Code:
root@kronos bootd# uname -r
2.4.25
root@kronos boot# grep -i dma config-2.4.25
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_PCI_WIP is not set
# CONFIG_BLK_DEV_ADMA100 is not set
# CONFIG_HPT34X_AUTODMA is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_IDEDMA_IVB is not set
# CONFIG_DMA_NONPCI is not set
# CONFIG_SCSI_EATA_DMA is not set
There seem to be several things that are not set that are set for you. I have never gone this far below the surface before. Does changing the config file require a kernel recompilation or will a reboot do?

As for my motherboard, I have an ASRock K7S8X. In the manual it mentions a "Northbridge K7S8X chipset". I also have an Athlon processor. I dont know what to grep for in the config file.


Greetings from Berlin,


Caspar.
 
Old 09-14-2004, 12:49 PM   #8
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,642

Rep: Reputation: 111Reputation: 111
Quote:
Originally posted by caspar_wrede
Hi Stephen,

Here is the result of grepping for DMA in the config file

Code:
root@kronos bootd# uname -r
2.4.25
root@kronos boot# grep -i dma config-2.4.25
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_PCI_WIP is not set
# CONFIG_BLK_DEV_ADMA100 is not set
# CONFIG_HPT34X_AUTODMA is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_IDEDMA_IVB is not set
# CONFIG_DMA_NONPCI is not set
# CONFIG_SCSI_EATA_DMA is not set
There seem to be several things that are not set that are set for you. I have never gone this far below the surface before. Does changing the config file require a kernel recompilation or will a reboot do?


Changing the config requires you to compile a new kernel and the DMA I have set are just all the ones I thought I would need when I compiled my first 2.6 kernel reading the help files.
Quote:
As for my motherboard, I have an ASRock K7S8X. In the manual it mentions a "Northbridge K7S8X chipset". I also have an Athlon processor. I dont know what to grep for in the config file.


Greetings from Berlin,


Caspar.
Alright so you have an Athlon XP then and according to this page I found with a quick google search on your motherboard's name it says you have a SIS 746FX chipset which a grep of my config leads to this from the help for the CONFIG_BLK_DEV_SIS5513 it only lists as you can see a 745 and then 750 for the next highest supported chipset.
Code:
 
 CONFIG_BLK_DEV_SIS5513:                                              
                                                                          
 This driver ensures (U)DMA support for SIS5513 chipset family based     
  mainboards.                                                             
                                                                          
  The following chipsets are supported:                                   
 ATA16:  SiS5511, SiS5513                                                
  ATA33:  SiS5591, SiS5597, SiS5598, SiS5600                              
 ATA66:  SiS530, SiS540, SiS620, SiS630, SiS640                          
 ATA100: SiS635, SiS645, SiS650, SiS730, SiS735, SiS740, SiS745, SiS750
You may want to try using modconf and going to the section block devices then selecting the SiS5513 to have the driver loaded on boot that is if you compiled it when you did your kernel. I say this because that kernel name (2.4.25 should be 2.4.25-?-??) is definitely not a Debian one you got from the archives. The module does exist in a 2.4 series kernel you would want to compile it in instead of as a module.

Code:
[HappyTux:/usr/src/linux]# grep -i sis /boot/config-2.4.20-bf2.4
CONFIG_BLK_DEV_SIS5513=y
CONFIG_SIS900=m
CONFIG_TMSISA=m
CONFIG_AGP_SIS=y
 
Old 09-14-2004, 01:01 PM   #9
jbanafato
Newbie
 
Registered: Mar 2002
Posts: 28

Rep: Reputation: 15
If you're still having a problem, post the output of 'lspci -v' or, if not available, 'cat /proc/pci'. This should eliminate the need for any guesswork. There're a few SiS chipsets that linux does not like.
 
Old 09-15-2004, 09:11 AM   #10
caspar_wrede
LQ Newbie
 
Registered: May 2004
Location: Berlin, Germany
Distribution: Debian
Posts: 11

Original Poster
Rep: Reputation: 0
Oops, I've made my computer unbootable. I tried getting the latest 2.4 kernel source from Debian and after compiling and installing it my computer refused to come back to life. My lilo is not set up to give me a choice of kernels, rather stupidly.

Anyway, now I have to sort out this mess first. I am in the process of downloading a live CD image, then I will get back to the original problem.

C.
 
Old 09-24-2004, 04:40 PM   #11
caspar_wrede
LQ Newbie
 
Registered: May 2004
Location: Berlin, Germany
Distribution: Debian
Posts: 11

Original Poster
Rep: Reputation: 0
OK I've done it!

First I rescued my system. Then I had a hard look at the whole kernel compilation thingamabob, and then after several false starts it worked. DMA is now switched on and I now have much better hdparm test values:

Code:
root@kronos wrede# hdparm -Tt /dev/hda

/dev/hda:
 Timing cached reads:   1104 MB in  2.00 seconds = 552.00 MB/sec
 Timing buffered disk reads:  114 MB in  3.00 seconds =  38.00 MB/sec
Now I can transfer large files to the hardisk of my file server and the music indeed no longer skips. I am amazed.

I am also amazed by this whole linux forum issue. I get individually tailored advice from experts for free. What I'm trying to say is thank you. I promise to do my part when my time comes.

So long,

Caspar.
 
Old 03-14-2005, 05:51 AM   #12
mehlkelm
Member
 
Registered: Apr 2003
Location: Basel, Switzerland
Distribution: Ubuntu, OS X
Posts: 77

Rep: Reputation: 15
You are all so cool!
You stopped my music from skipping, too.

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
A harddisk space where XP and FC4 can both access bonniehandi Linux - Newbie 3 11-25-2005 10:12 PM
can't access second harddisk over NFS mrjamin Linux - Networking 3 03-15-2005 10:24 AM
Want to play music and movie without installing KNOPPIX in the Harddisk sharonlim Debian 4 10-15-2004 02:01 AM
Disk drive access causes "skips" in software rsarson Linux - General 9 06-19-2003 07:01 PM
Cant access Music CDs Mintieman Linux - General 1 01-24-2003 11:34 PM

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

All times are GMT -5. The time now is 08:20 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration