One of my readers is having a bit of a hard time with DVD playback, after reading my article:
Playing Encrypted DVD's in Ubuntu 7.10, he has been unable to get dvd's to playback smoothly.
One really common solution to slow, jerky, and unreliable playback is turning on DMA.
DMA stands for: Direct Memory Access. DMA allows a piece of hardware to talk directly with the RAM, reading and/or writing independent of the CPU (Central Processing Unit). In other words the hardware can use the system memory, bypassing the CPU, allowing the device to read and write much faster.
By default Ubuntu has DMA turned off (set to 0), this can be changed in the /etc/hdparm.conf file, like so:
- First make a backup of your hdpram file:
# sudo cp /etc/hdparm.conf /etc/hdparm.conf.bak
- Now edit the file using your favourite text editor, I'm using gedit, however you can use the editor of you choice just change the following command to suit your needs:
# sudo gedit /etc/hdparm.conf
- Once the file is open you will need to add the following at the end of the file:/dev/cdrom {
dma = on
} - Once you restart your computer you should have DMA turned on.
Troubleshooting
I have been reading about a number of problems with turning DMA on. Here are a couple of solutions if DMA still doesn't work after trying the instructions above:
First try re-editing the hdpram.conf file to read /dev/dvd instead of /dev/cdrom, then restart the computer.
If you are getting the error:
`HDIO set dma failed: operation not permitted'
You may need to edit your /etc/modules.conf file, for more information please see this forum thread: #post93238.
Personally none of my systems have these issues so I can't test this solution.
I hope this proves useful to someone, have fun.