Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




CD/DVD Drives

If watching a DVD seems a bit choppy (stops and starts) then perhaps the CD/DVD IDE device needs some tuning. First check to see what the current settings are (e.g., on Belinos (101.3) where the DVD driver is /dev/hda):

  $ hdparm /dev/hda

   IO_support   =  0 (default 16-bit)
   unmaskirq    =  0 (off)
   using_dma    =  0 (off)
   keepsettings =  0 (off)
   readonly     =  0 (off)
   readahead    = 256 (on)
   HDIO_GETGEO failed: Invalid argument

For a DVD, setting the readahead to 8 (-a8) seems to fix it. Turning unmask on (-u1) also might help:

  $ sudo hdparm -d1 -a8 -u1 /dev/hda
   setting fs readahead to 8
   setting unmaskirq to 1 (on)
   setting using_dma to 1 (on)
   HDIO_SET_DMA failed: Operation not permitted
   unmaskirq    =  1 (on)
   using_dma    =  0 (off)
   readahead    =  8 (on)

To have this tuning survive a reboot add something like the following into /etc/hdparm.conf:

/dev/hda {
	read_ahead_sect = 8
	interrupt_unmask = on

This needs to be run on boot after the appropraite modules for the CD/DVD have been loaded, so following the instructions in the README file:

  $ wajig readme hdparm | most
  $ sudo editor /etc/hdparm.conf
  $ sudo ln -s /etc/init.d/hdparm /etc/rcS.d/S39hdparm.second

The instructions suggest S29 but that did not work for me.

If you have any problem rebooting after making these changes, use the nohdparm boot parameter and this will inhibit hdparm from doing anything.

Visit for a collection of tuning suggestions.

Turning DMA on (-d1) fails on many DVDs. According to the Red Hat Linux Release Notes ( DMA is often disabled on CD-ROM drives because they are often not capable of IDE DMA. If you are sure that your CD-ROM drive is capable of IDE DMA you can do the following:

  # rmmod ide_cd
  # modprobe ide-cd dma=1

Copyright © 1995-2006 [email protected]

  Published under the terms fo the GNU General Public License Design by Interspire