Some kernel options should be activated for optimizing DVD playback. I strongly urge the application of Andrew Morton's low-latency patches, and it also may be advisable to apply Robert Love's preemptive kernel patch. The combination of these patches provides very low latency (below 3msecs) over sustained periods of time. My kernel of choice is currently 2.4.18, but Andrew's and Robert's patches are available for a variety of kernel releases (see Resources for more information).
You also should make sure your kernel has enabled support for the RTC and MTRR options (found under the Character devices and Processor type and features kernel configuration sections, respectively). RTC provides access to the real-time hardware clock of your PC. According to the kernel configuration help file, all PCs have such a clock but it is not enabled by the default kernel configuration. Although it is not absolutely required, many Linux audio and video applications can utilize this clock for a finer timing response (MPlayer likes it), so I suggest building it directly into your kernel or as a dynamically loadable module.
According to the kernel configuration help, enabling the MTRR (memory type range registers) provides a mechanism that is used:
...to control processor access to memory ranges. This is most useful if you have a video (VGA) card on a PCI or AGP bus. Enabling write-combining allows bus write transfers to be combined into a larger transfer before bursting over the PCI/AGP bus. This can increase performance of image write operations 2.5 times or more.
So, if you have a PCI or AGP video card you will want to enable this option.
Under the ATA/IDE/MFM/RLL Support section, I advise enabling the options for generic PCI bus-master DMA support and the use of PCI DMA by default.
The last step is to configure sound support for your hardware. I use the ALSA sound system, so all I do is enable sound card support in the kernel options. The ALSA drivers are built in normal user space and installed as root as loadable kernel modules. You safely can use the available kernel modules instead of ALSA, but in my opinion the ALSA drivers are superior. In fact, ALSA will become the de facto kernel sound system for Linux kernels beyond the 2.5.x series.
I began my tests with XFree86 4.1.0. Everything seemed to work fine except for an annoying problem with xine: after closing that player my X server would unceremoniously crash, dumping me back at the console prompt. When I upgraded to XFree86 4.3.0 and the latest driver for my GeForce2 from NVIDIA (1.0-4363), all problems were resolved. Because XFree86 4.3.0 fixes a number of problems and bugs found in the earlier versions, I suggest the upgrade to anyone using any of these players, not only xine. And, if you're using an NVIDIA card you always should use their latest drivers.
As mentioned earlier, XFree86 provides a video output driver called Xv, but other drivers are available for the frame-buffer device, SDL (Simple DirectMedia Layer) video output and X11/Xshm. The driver you select affects playback performance. Xv normally is preferred, but you can experiment with whatever drivers are supported by your player of choice for the best output.
My X environment also includes the Blackbox window manager. I prefer simple and fast, and Blackbox fits the bill for me. Be advised that your DVD-viewing mileage may vary in part due to your window manager or desktop environment of choice, and you may need to adjust your available video resources accordingly.
It may come as a surprise to learn that you can tune your DVD and CD-ROM drives as easily as you can tune your hard disks. The hdparm utility can optimize drive performance to peak efficiency, run it (as root) with at least the following parameter options:
hdparm -c1 -d1 -a8 -u1 /dev/hdd
where -c1 enables 32-bit I/O, -d1 enables DMA access, -a8 sets the filesystem read-ahead value and -u1 sets the drive's interrupt-unmask flag. /dev/hdd should specify your particular DVD drive device location.
The parameters shown above work well with my DVD drive, but I urge you to read the hdparm manual page (man hdparm) before running the utility. Your DVD drive is a read-only device, so filesystem corruption is not an issue here. You might, however, inadvertently lower your drive's efficiency with non-optimal settings.
It has been brought to my attention that Red Hat 8.0 users have reported difficulties enabling DMA on their DVD drives. If you're running that distribution, add the following line to your /etc/modules.conf to fix the problem:
options ide-cd dma=1
Similis sum folio de quo ludunt venti.
Webinar: 8 Signs You’re Beyond Cron
On Demand NOW
Join Linux Journal and Pat Cameron, Director of Automation Technology at HelpSystems, as they discuss the eight primary advantages of moving beyond cron job scheduling. In this webinar, you’ll learn about integrating cron with an enterprise scheduler.View Now!
|Dr Hjkl on the Command Line||May 21, 2015|
|Initializing and Managing Services in Linux: Past, Present and Future||May 20, 2015|
|Goodbye, Pi. Hello, C.H.I.P.||May 18, 2015|
|Enter to Win Archive DVD + Free Backup Solution||May 18, 2015|
|Using Hiera with Puppet||May 14, 2015|
|Urgent Kernel Patch for Ubuntu||May 12, 2015|
- Initializing and Managing Services in Linux: Past, Present and Future
- Dr Hjkl on the Command Line
- Goodbye, Pi. Hello, C.H.I.P.
- Using Hiera with Puppet
- Gartner Dubs DivvyCloud Cool Cloud Management Vendor
- Mumblehard--Let's End Its Five-Year Reign
- Enter to Win Archive DVD + Free Backup Solution
- Infinite BusyBox with systemd
- It's Easier to Ask Forgiveness...
- A More Stable Future for Ubuntu