Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Support > Guides & Solutions (No Questions)

Guides & Solutions (No Questions) Post your guides here. You can also add your comments to a guide, but don't start a thread to ask a question. Use another forum for that.


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 2006-06-22, 07:51 PM CDT
Kobnar's Avatar
Kobnar Offline
Registered User
 
Join Date: Jul 2005
Location: Germany
Age: 22
Posts: 92
Enable DMA on your DVD/CD drive

For some of us, DMA isn't enabled by default for our wonderful FC5 powered computers (like some Dells and Thinkpads). I've been spending a month or two (off and on) trying to find out how to work arround this problem. The long answer, from what I understand, for why this happens has to do with an IDE and a SATA/PATA drivers that are conflicting with one another and trying to control the drive (you might notice that the drive is labled /dev/hdc) and the DMA doesn't work well... or at all. According to the bug-report that I read, this is not a bug but an expected side effect of some DVD drive setups. With recently released kernels it is not required to make a custom-build, so this is done based off of a yum-installed kernel.

Signs of this problem include choppy DVD playback or slow image reading and when running "hdparm -d1 /dev/hdc" to turn DMA on it will respond with "Operation not permitted". If you see this and, like me, have been trying to find a way to enable DMA on your drive this should help you and I'm writing this so that people with this (apperently common) problem can referance one place to solve it.

Ok, now to get to the part where I tell you how to...

In the terminal:

$su -
#gedit /etc/modprobe.conf


add the following line to the end of the file (leaving an extra empty line behind it):

options libata atapi_enabled=1

save, close and continue in the terminal:

#gedit /boot/grub/menu.lst

add the following to the boot parameter:

combined_mode=libata

save, close and reboot.

Now your DVD drive should be called "/dev/scd0", DMA will not be needed and Xine should be able to play it without the choppyness. Further effects of a working DVD drive (from what I hear, tell myself to make me feel better and dream) include faster CD ripping speeds and general read speeds, improved oooo-aaahhhh factor of showing off Linux, improved firtility and a marginal decrease in Windows dependancy...

My final two files look like this:
(/boot/grub/menu.lst)
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/sda1
#          initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/che3.xpm.gz
hiddenmenu
title Fedora Core (2.6.16-1.2133_FC5)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.16-1.2133_FC5 ro root=LABEL=/ rhgb quiet combined_mode=libata
        initrd /boot/initrd-2.6.16-1.2133_FC5.img
title Fedora Core (2.6.16-1.2133_FC5) no_libata
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.16-1.2133_FC5 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.16-1.2133_FC5.img
title Fedora Core (2.6.16-1.2122_FC5)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.16-1.2122_FC5 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.16-1.2122_FC5.img
and:
(/etc/modprobe.conf)
Code:
alias eth0 tg3
alias scsi_hostadapter ata_piix
alias snd-card-0 snd-intel8x0
options snd-card-0 index=0
options snd-intel8x0 index=0
remove snd-intel8x0 { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-intel8x0
options libata atapi_enabled=1

Final Note:
The bug report had another option that could be passed to replace the "combined_mode=libata" parameter with "combined_mode=ide". My drive started working with the method in this how-to so I stopped there. If yours does not I'd go back and try again or just ask here for help. The bug report said that "combined_mode=ide" just gimped DMA on everything (to include the hard drive) so I wouldn't suggest it but that might've just been because it switched the driver for the SATA/PATA drives to IDE... Frankly I don't know... I'm guessing that if this didn't work, you have an IDE DVD drive but I'm way out of my league of tinkering. So basicly don't use "combined_mode=ide" unless you know what it does and why it doesn't work.
__________________
"rm -rf yourself..."
--------------------
IBM Thinkpad T43
CPU: 1.87GHz Pentium M
Memory: 2GB DDR 400
Video Card: Radeon Mobility X300
Media: CD-R/CD-RW/DVD Combo Drive
Storage: SATA 60GB 7200rpm (Fedora Core)

Last edited by Kobnar; 2006-06-22 at 07:54 PM CDT.
Reply With Quote
  #2  
Old 2006-07-07, 04:21 AM CDT
Qwagmire's Avatar
Qwagmire Offline
Registered User
 
Join Date: Feb 2006
Location: Tracy, CA USA
Posts: 95
That didn't seem to work for me. My mobo is strictly PATA.

I can get UDMA to start with the commands, but I'd like to figure out how to get it to happen at start-up.

Someone on my other forum recommended putting the hdparm commands in a script in init.d

I'll give that a shot and check back in...
__________________
Don't put it off for another second. Procrastinate today!
Registered Linux User #414917

Last edited by Qwagmire; 2006-07-07 at 04:26 AM CDT.
Reply With Quote
  #3  
Old 2006-08-21, 08:12 PM CDT
stanabe Offline
Registered User
 
Join Date: Feb 2006
Posts: 17
That didn't work on my Dell E1405 either. I also tried the following page which is similar, but I got no good results.

No DMA on DVD drive
http://fedoranews.org/cms/node/1150

Edit:

I tried this again on FC6 and it worked perfectly. Thanks Kobnar!

Last edited by stanabe; 2007-04-03 at 01:19 AM CDT.
Reply With Quote
  #4  
Old 2006-08-21, 08:26 PM CDT
wintersm Offline
Registered User
 
Join Date: Jul 2006
Posts: 293
you can add commands to run at startup in /etc/rc.local

i have hdparam commands in there to enable dma on my dvd rw, but i might try the way mentioned here (looks better)..
Reply With Quote
  #5  
Old 2006-08-21, 08:49 PM CDT
Kobnar's Avatar
Kobnar Offline
Registered User
 
Join Date: Jul 2005
Location: Germany
Age: 22
Posts: 92
recently I've noticed a problem with this and HAL... HAL doesn't mount any CD's I put in anymore. I'm guessing it's a problem with a new version. Anyways, the device is still "/dev/scd0", if you've use this method, it just requires manual mounting.
__________________
"rm -rf yourself..."
--------------------
IBM Thinkpad T43
CPU: 1.87GHz Pentium M
Memory: 2GB DDR 400
Video Card: Radeon Mobility X300
Media: CD-R/CD-RW/DVD Combo Drive
Storage: SATA 60GB 7200rpm (Fedora Core)
Reply With Quote
  #6  
Old 2006-09-21, 10:44 PM CDT
infra Offline
Registered User
 
Join Date: Sep 2006
Posts: 11
Quote:
recently I've noticed a problem with this and HAL... HAL doesn't mount any CD's I put in anymore. I'm guessing it's a problem with a new version. Anyways, the device is still "/dev/scd0", if you've use this method, it just requires manual mounting.
Yes, I've noticed this too. I have created a post regarding this already (Click here )... hopefully we'll get some responses (unless you've overcome this issue already).

Anyone have success with enabling DMA described in this post, without having to manually mount the cd/dvd drive? In other words, having DMA enabled with the automount function working in FC5.
Reply With Quote
  #7  
Old 2006-10-22, 09:59 PM CDT
sadmac Offline
Registered User
 
Join Date: Sep 2005
Age: 23
Posts: 101
Thx to Kobnar!

Fixed a problem I've had since core 4!

What a relief.
Reply With Quote
  #8  
Old 2006-12-25, 04:26 PM CST
vlad_safronoff Offline
Registered User
 
Join Date: Mar 2006
Location: .ru, Korolyov
Posts: 8
This does not work with dual layer dvd

thinkpad T43, 1871-F1G, Fedora 5:

# sudo dd if=/dev/scd0 of=/dev/null bs=2048
dd: reading `/dev/scd0': Input/output error
568+0 records in
568+0 records out
1163264 bytes (1.2 MB) copied, 0.681378 seconds, 1.7 MB/s

# dmesg
..
printk: 54 messages suppressed.
Buffer I/O error on device sr0, logical block 284
Buffer I/O error on device sr0, logical block 285
end_request: I/O error, dev sr0, sector 2472
end_request: I/O error, dev sr0, sector 2528
end_request: I/O error, dev sr0, sector 2728

But it works with standard (4.7GB) dvd:
# sudo dd if=/dev/scd0 of=/dev/null bs=2048
15929+0 records in
15928+0 records out
32620544 bytes (33 MB) copied, 7.02276 seconds, 4.6 MB/s
ctrl^c
Reply With Quote
  #9  
Old 2006-12-26, 12:05 PM CST
fscm Offline
Registered User
 
Join Date: Jul 2005
Location: Portugal
Posts: 1
I followed this topic steps (changed the modprobe.conf and menu.lst files) and after the reboot i ended up with a HAL that didn't mount CD's and a "no cd burner device" warning in every cd burning software...

After a few readings I found out that this was happening because the optical device was now called /dev/scd0
To solve the problem I created the /etc/udev/rules.d/51-local.rules file with the following content:

# BEGIN FILE
# location: /etc/udev/rules.d/51-local.rules

KERNEL=="scd[0-9]*", \
BUS=="scsi", \
PROGRAM=="check-cdrom.sh %k DVD", \
SYMLINK+="dvd dvd-%k"

KERNEL=="scd[0-9]*", \
BUS=="scsi", \
PROGRAM=="check-cdrom.sh %k CD-R", \
SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k"

KERNEL=="scd[0-9]*", \
BUS=="scsi", \
PROGRAM=="check-cdrom.sh %k DVD-R", \
SYMLINK+="dvdwriter dvdwriter-%k dvdrw dvdrw-%k"
# END FILE

After this I restarted the udev service (reboot will also work) and everything is now working fine. The udev rule will create the needed symlink's for the device to work.

(I'm using FC6 - sorry for the bad English)
Reply With Quote
  #10  
Old 2006-12-29, 08:22 AM CST
bruce64 Offline
Registered User
 
Join Date: Nov 2006
Posts: 12
Good morning Kobnar -
I'm using a Dell Inspiron 6000, I made the changes above and it worked like a charm! What was most important was showing your edited files specifically to following section:
title Fedora Core (2.6.16-1.2133_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.16-1.2133_FC5 ro root=LABEL=/ rhgb quiet combined_mode=libata
initrd /boot/initrd-2.6.16-1.2133_FC5.img
I initially put combined_mode=libata at the end of the file and nothing happened. I corrected this and the DVD plays without dropouts but more importantly the sound juicer extracted cds in under 3:30mins - before the changes the avg cd took almost 12mins to rip. Many Thanks!
Reply With Quote
  #11  
Old 2006-12-30, 03:36 AM CST
haproot Offline
Registered User
 
Join Date: Dec 2006
Posts: 1
Red face

This worked for me on a Thinkpad T43 2668-95u running FC6. Haven't tried burning a cd yet, but if I have problems I'll post back. Definately made a huge increase in DVD playback performance in mplayer.
Reply With Quote
  #12  
Old 2007-01-02, 09:34 PM CST
techmum Offline
Registered User
 
Join Date: Dec 2005
Location: Western Australia
Posts: 261
A great technical explanation of the issue (short and easily understandable) on the topic here>

http://www.serpentine.com/blog/2006/...s-cddvd-drive/

Appending combined_mode=libata to the kernel line in GRUB solved the problem on my T43 notebook
Reply With Quote
  #13  
Old 2007-01-08, 08:27 PM CST
Kamikaze78 Offline
Registered User
 
Join Date: Nov 2006
Posts: 68
I have applyed this fix myself with no problems with hal or anything. I have not needed to change or add udev rules. But when I loaded NeroLinux it told me that I didn't have permissions to /dev/sg0, 1, 2. I burn at the right speed as root but not as user. After applying this fix to it, I burnt at normal speeds as user not only in NeroLinux, but also in K3B. So far thats the only programs that I have tested.

Open a terminal and log in as root. If you are not in root already from applying this fix in the first place.
Quote:
#su
## gedit /etc/rc.d/rc.local
Once the file opens on the last line of the file, add the following.

Quote:
chmod a=rwx /dev/sg*
This will allow all users to have full permissions to the sg files that is needed by nerolinux. But I also now have better preformance out of K3B also, so I am thinking it might be device bufferers, I dont know enough about linux to say thats fact, but its the only thing I can think of.
Reply With Quote
  #14  
Old 2007-01-09, 11:37 AM CST
sadmac Offline
Registered User
 
Join Date: Sep 2005
Age: 23
Posts: 101
There should be a way to do that with a udev rule. usually that's the better answer.
Reply With Quote
  #15  
Old 2007-01-13, 05:49 PM CST
Ceckow Offline
Registered User
 
Join Date: Jan 2007
Posts: 1
Awesome! You made my day.

Works like a charm on a INSPIRON E1505

Thank you.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable DMA on USB drive daviddoria Software 1 2009-02-17 05:00 AM CST
Installing to a USB Flash Drive and using the drive and a normal hard drive beeball Installation Help 3 2008-03-22 09:45 PM CDT
Boot is slow, tries to enable a swap partition from another drive keeler1 General Support 1 2007-07-09 12:35 PM CDT
Move a Linux drive from drive 1 to drive 0 n7yg Installation Help 2 2007-02-04 06:26 PM CST
enable scsi tape drive compression? crispx Hardware 0 2006-12-20 01:00 PM CST

Translations (Powered by Powered by Google):
Afrikaans Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Taiwanese Thai Turkish Ukrainian Vietnamese Yiddish

All times are GMT -7. The time now is 10:41 AM CDT.

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo



All trademarks, and forum posts in this site are property of their respective owner(s).

FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Rules | Archive | Contact | Founding Members
Designed By Ewdison Then | Powered by vBulletin ©2000-2010, Jelsoft Enterprises Ltd.
FedoraForum is Powered by Open Source Projects and Products
Translations supported by vBET 2.3.10