LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-04-2005, 11:42 PM   #1
lonrot_m
LQ Newbie
 
Registered: Feb 2005
Distribution: Gentoo
Posts: 26

Rep: Reputation: 15
Help with hdparm n dvd-rw


HI:

I am trying to configure correctly my dvd-rw n hdparm is a necessary thing to run smoothly, the output of hdparm -i /dev/hdc

Code:
/dev/hdc:

 Model=SONY DVD+/-RW DW-D56A, FwRev=PDS3, SerialNo=
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=yes, tPIO={min:227,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
 AdvancedPM=no
 Drive conforms to: device does not report version:

 * signifies the current active mode

then i try

Code:
 hdparm -d1 /dev/hdc

/dev/hdc:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
any idea
 
Old 08-05-2005, 12:30 AM   #2
linux-rulz
Member
 
Registered: Dec 2004
Distribution: Windows XP Home, Ubuntu Hoary
Posts: 584

Rep: Reputation: 30
This may seem like a dumb question....but you are logged in as root, right?

Also, which distro? Which drive? Which kernel?
 
Old 08-05-2005, 01:14 AM   #3
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Re: Help with hdparm n dvd-rw

Quote:
Originally posted by lonrot_m
I am trying to configure correctly my dvd-rw n hdparm is a necessary thing to run smoothly, the output of hdparm -i /dev/hdc
Quote:

Code:
/dev/hdc:

 Model=SONY DVD+/-RW DW-D56A, FwRev=PDS3, SerialNo=
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=yes, tPIO={min:227,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  <--- it's already set 
 AdvancedPM=no
 Drive conforms to: device does not report version:

 * signifies the current active mode
Your drive is already using all the DMA it's got. Notice it says * signifies the current active mode and that asterisk points to *udma2.

Here's my two drives:
Code:
mingdao@james:~$ sudo /usr/sbin/hdparm -i /dev/hdb

/dev/hdb:

 Model=PIONEER DVD+/-RW DVR-109, FwRev=1.17, SerialNo=
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=13395, BuffSize=64kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=on/off, tPIO={min:240,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 
 AdvancedPM=no
 Drive conforms to: device does not report version: 

 * signifies the current active mode


mingdao@james:~$ sudo /usr/sbin/hdparm -i /dev/hdc

/dev/hdc:

 Model=ASUS CRW-5232A3, FwRev=1.00, SerialNo=
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=yes, tPIO={min:227,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 
 AdvancedPM=no

 * signifies the current active mode

mingdao@james:~$
This use of DMA is set in the kernel. If you have a 2.6.x.x series you'll find all the DMA you need here:
Code:
mingdao@james:~$ less build/linux-2.6.12.3/.config | grep -i dma
CONFIG_GENERIC_ISA_DMA=y
CONFIG_ISA_DMA_API=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y  <-- this one makes your drives use DMA by default 
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
This is the output I get issuing the same command that you issued with root permission first (using sudo) and a normal user second:
Code:
mingdao@james:~$ sudo /usr/sbin/hdparm -d1 /dev/hdb
/dev/hdb:
 setting using_dma to 1 (on)
 using_dma    =  1 (on)


mingdao@james:~$ /usr/sbin/hdparm -d1 /dev/hdb

/dev/hdb:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Permission denied
 using_dma    =  1 (on)
because a normal user cannot set hdparm for a drive.

So, you're using hdparm on your DVD burner already.
 
Old 08-05-2005, 01:26 AM   #4
linux-rulz
Member
 
Registered: Dec 2004
Distribution: Windows XP Home, Ubuntu Hoary
Posts: 584

Rep: Reputation: 30
Quote:
So, you're using hdparm on your DVD burner already.
That is what I thought to with my computer and CentOS 4. It gave the same info as the original poster got, but dvds were choppy. I su'd into root, typed /sbin/hdparm -d1 /dev/hd[c,d] and it then turned dma on. DVDs played fine after that.

Anyways, you get the problem fixed?
 
Old 08-05-2005, 02:06 AM   #5
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
If you issue "dmesg | grep -i dma" it should also tell you if DMA is on when you boot your kernel:
Code:
mingdao@titus:~$ dmesg | grep -i dma
  DMA zone: 4096 pages, LIFO batch:1
    ide0: BM-DMA at 0x8070-0x8077, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x8078-0x807f, BIOS settings: hdc:DMA, hdd:pio
hda: 117210240 sectors (60011 MB) w/7884KiB Cache, CHS=16383/255/63, UDMA(100)
hdc: ATAPI 24X DVD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)
mingdao@titus:~$
and make sure you have DMA on in your BIOS, also. I believe you do.
 
Old 08-05-2005, 12:30 PM   #6
lonrot_m
LQ Newbie
 
Registered: Feb 2005
Distribution: Gentoo
Posts: 26

Original Poster
Rep: Reputation: 15
hi:
thanks for the help, to Chinaman i m still not using dma because of the output of hdparm
Code:
hdparm /dev/hdc

/dev/hdc:
 IO_support   =  1 (32-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 HDIO_GETGEO failed: Invalid argument
as you can see using_dma still off, also is already on the kernel


Code:
less .config | grep -i dma
CONFIG_GENERIC_ISA_DMA=y
CONFIG_ISA_DMA_API=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_BLK_DEV_IDEDMA_FORCED=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_IDEDMA_ONLYDISK=y
CONFIG_HPT34X_AUTODMA=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_IVB=y
CONFIG_IDEDMA_AUTO=y

the output of dmesg is this one:
Code:
DMA zone: 4096 pages, LIFO batch:1
ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xBFA0 irq 14
ata1: dev 0 ATA, max UDMA/100, 195371568 sectors:
ata1: dev 0 configured for UDMA/100
n for linux-rulz yes i am logged as root, i am on a gentoo system running a kernel-2.6.12-gentoo-r6, the drive is a SONY DVD+/-RW DW-D56A

any other ideas
thanks
 
Old 08-18-2005, 11:54 AM   #7
fledah
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Rep: Reputation: 0
Hello

I've got the same probleme as you , i set correct options in the kernel config , i'm logged in root and my drive is called HDC

when i try to set the dma on :

Code:
 hdparm -i /dev/hdc

/dev/hdc:

 Model=_NEC DVD+/-RW ND-6650A, FwRev=102C, SerialNo=
 Config={ Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=yes, 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
 AdvancedPM=no

 * signifies the current active mode

fledah thomas # dmesg | grep -i dma
  DMA zone: 4096 pages, LIFO batch:1
ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xBFA0 irq 14
ata1: dev 0 ATA, max UDMA/100, 78140160 sectors:
ata1: dev 0 configured for UDMA/100
anyone can help me (my computer is a laptop DELL Inspiron 9300 and the bios dont let me change mixed mode or thing like that

sorry for english mistake I'm french by the way I hope you can understand me

PS : this problem really borring me , my laptops is fully configured and works well except DMA that doesn't allow me to play DVD or things like that

[edit] Result of DMA activation command

Code:
 su
Password:
fledah thomas # hdparm -d1 /dev/hdc

/dev/hdc:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
fledah thomas #

Last edited by fledah; 08-18-2005 at 11:58 AM.
 
Old 08-18-2005, 02:41 PM   #8
fledah
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Rep: Reputation: 0
up
 
Old 08-18-2005, 04:01 PM   #9
lonrot_m
LQ Newbie
 
Registered: Feb 2005
Distribution: Gentoo
Posts: 26

Original Poster
Rep: Reputation: 15
I dont know if it will work for you but for my dvd to run smoothly i had to convert it to scsi
 
Old 08-18-2005, 06:06 PM   #10
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
Quote:
Originally posted by fledah
up
Hi fledah,

You do realize when you registered your account today, you agreed not to "bump" a thread until at least 24 hours passes since the last post?
 
Old 08-18-2005, 06:18 PM   #11
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
fledah

You should also start your own thread for your own problem,
or just subscribe to and watch someone else's thread. It is
considered rude to "hijack" a thread, which is what you've done.

Generally, there seem to be a lot of folks joining LQ lately who
either don't read the Rules, or break them without caring. Don't
fall into that position. If you do, you'll find that you don't get any
answers from more experienced guys, but only guesses from
other newbies.

You would do well to read that last link in KimVette's sig...
 
Old 09-13-2005, 03:28 PM   #12
d1s4st3r
Member
 
Registered: May 2004
Location: Italy
Posts: 70

Rep: Reputation: 16
You cannot turn on DMA with hdparm on a device with a currently mounted filesystem.
I mean, if you try to set up DMA from a Knoppix live-cd, it will work!
hdparm needs to be run before fs mounts (you can do this with your init scripts).
bye!
 
  


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
which DVD player can play DVD from hard drive *and* support DVD Menu ? tho_x_tran Linux - Software 16 11-16-2006 02:00 PM
DVD and hdparm ajagodnik Linux - Hardware 0 06-17-2004 09:43 AM
using hdparm? box_l Linux - General 7 10-01-2003 07:49 AM
hdparm ash4stuff Linux - Hardware 4 08-14-2003 03:05 AM
hdparm -g NOT= hdparm -i ---LILO hangs @ L stevewalsh Linux - General 4 07-23-2001 09:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:31 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