Make Linux happy with a modern laptop’s CD/DVD drive

If you’re using a fairly modern laptop with an Intel chipset, the chances are that it has an Intel ICH7 I/O controller hub:
$ lspci | grep -i ide
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 01)
This usually means that your internal hard disk and CD-ROM/DVD drive (if you have one) are wired using Serial ATA (SATA), not the obsolete Parallel ATA standard. However, while the Linux SATA driver will happily take control of your hard disk, for some reason the older IDE driver will often capture the CD-ROM drive. You can tell by looking at /dev/cdrom:
$ ls -l /dev/cdrom
lrwxrwxrwx 1 root root 4 Dec 12 13:23 /dev/cdrom -> hdc
If the text after the “->” arrow starts with “hd” as above, the IDE controller owns your CD-ROM/DVD drive. Everything might initially look okay, because the CD-ROM/DVD drive will appear to work normally, but performance will turn out to be awful: try to play a CD or DVD, and you’ll see your notionally speedy laptop crawl nearly to a halt. If you’ve used Linux on previous generations of laptops, you’ll know enough to check the output of the hdparm command, to see if the kernel has DMA enabled on the CD-ROM/DVD drive. It will say no, whereupon you might try to force the kernel to use DMA, and be stumped when it refuses. The reason this doesn’t work is that the ICH7 hub is emulating an IDE device, and the Linux IDE driver doesn’t know how to configure it to use DMA. Never fear; you don’t need to do this at all. Instead, configure your kernel to use the newer libata driver to control the CD-ROM/DVD drive. To do this, you’ll need to modify the kernel’s boot command line. On Fedora systems, edit /etc/grub.conf (this file will have a different name under other Linux distros), and look for the first line that starts with bit of white space, followed by the word “kernel“. Append the following string to it: “combined_mode=libata“. That line of your grub config file will now look more like this (for god’s sake, don’t make a literal copy of my kernel command line; it won’t work for you!):
kernel /vmlinuz-2.6.18-1.2849.fc6 ro root=LABEL=/ rhgb quiet combined_mode=libata
Reboot your laptop, and you should find that /dev/cdrom no longer points at something starting with “hd“:
$ ls -l /dev/cdrom
lrwxrwxrwx 1 root root 4 Dec 12 16:10 /dev/cdrom -> scd0
The “scd0” string means that libata is now managing the CD-ROM/DVD drive. You should now get great performance for CD and DVD playing, without it dragging down the interactive performance of your laptop.
Posted in hardware, linux
9 comments on “Make Linux happy with a modern laptop’s CD/DVD drive
  1. Dizzy says:

    Thanks for the pointer on this, Brian. I recently got a Dell D620 for work and noticed the horrendous performance on the CDROM but couldn’t figure out what was going on. It seems much happier now. 🙂

  2. denise says:

    thank you, thank you, and thank you

    I can now watch DVDs on my FC6 systems

  3. Davorin says:

    thanks you very much, caused me a lot of frustration!

  4. HOLY CRAP! YOU RAWK! I’d long ago given-up on fixing this issue and just resigned myself to ripping all of my DVDs and then watching them from my external hard drive (not like that didn’t serve other purposes as well), this simple fix made the DVDs play super-smooth! THANK YOU SO SO SO SO SO MUCH!

    M.Berk, KG6EEL
    2.6.20 (fc5)

  5. _Andrey_ says:

    Thank you for your advice! Now my DVD works as should be.

  6. Tommy says:

    Hi Bryan, I set the kernel options as you adviced , but now with vlc I cannot play dvds .
    I configured vlc to use scd0 instead of hdc ( just for example ) but it won’t start cd and dvd playback.

    Thanks in advance

  7. Warner says:

    THis doesnt work for double layered disks. I can play single layered dvds but once I put a larger one in I get errors..

    Thanks,

    Warner

  8. what_ever says:

    It works.

    I’ve got Inspiron 9400/E1705 on Slackware 12 with _Nec 6650A 1.3D. I used this article with Lilo. I add line to lilo config:
    append=”combined_mode=libata”

    After restart system says I have no /dev/cdrom. So typed this line konsole to make symbolic link:
    ln -s /dev/cdrom1 /dev/cdrom.

  9. lusich says:

    Hi, I know it’s been a while since the topic was active, but Iam having some issues as well. I seem to experience the same problems as described above. Particularly bad DVD playback.

    I have a AMD/ATI motherboard, Dell Inspiron 1501

    @DL:~$ lspci | grep -i ide
    00:14.1 IDE interface: ATI Technologies Inc SB600 IDE

    I use Dreamlinux 3.2 (based on Debian).

    I tried as you suggested above, but I got no results. (no changes whatsoever)

    I found this quote “some systems (distros) you might have to recreate the initramfs after changing /etc/modprobe.conf so that it includes your new /etc/modprobe.conf — since it might be on that stage that the module is loaded (and so, the options are passed to it).”

    I don;t know how to do this, could you help?

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

*