SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Watching DVDs using Xine is choppy, so I did some research and xine-check, along with many posts suggest enabling DMA.
I enabled DMA, and restarted the machine. I then tested the DVD and the result was the same, choppy. I checked hdparm, and DMA
was disabled again.
I added
Code:
/usr/sbin/hdparm -d1 /dev/hdc
to rc.local and restarted the machine. Same result, DMA was disabled. I was beginning to wonder if rc.local was being executed, I confirmed that it was because other things in the file were being executed. (Btw, if I put an echo statement in rc.local, why doesn't it show up in /var/log/messages?)
I then ran the following sequence of commands:
Code:
~# hdparm /dev/hdc
/dev/hdc:
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
HDIO_GETGEO failed: Inappropriate ioctl for device
~# hdparm -i /dev/hdc
/dev/hdc:
Model=DVD RW DRU-820A, FwRev=1.0b, SerialNo=
Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=0kB, MaxMultSect=0
(maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 *udma4
AdvancedPM=no
Drive conforms to: Unspecified: ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5
* signifies the current active mode
~# hdparm -I /dev/hdc
/dev/hdc:
ATAPI CD-ROM, with removable media
Model Number: DVD RW DRU-820A
Serial Number:
Firmware Revision: 1.0b
Standards:
Likely used CD-ROM ATAPI-1
Configuration:
DRQ response: 50us.
Packet size: 12 bytes
Capabilities:
LBA, IORDY(can be disabled)
DMA: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 *udma4
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
HW reset results:
CBLID- above Vih
Device num = 0
~# hdparm -tT /dev/hdc
/dev/hdc:
Timing cached reads: 2892 MB in 2.00 seconds = 1446.19 MB/sec
BLKFLSBUF failed: Function not implemented
Timing buffered disk reads: 10 MB in 3.29 seconds = 3.04 MB/sec
BLKFLSBUF failed: Function not implemented
~# hdparm -d1 /dev/hdc
/dev/hdc:
setting using_dma to 1 (on)
using_dma = 1 (on)
~# hdparm -tT /dev/hdc
/dev/hdc:
Timing cached reads: 2772 MB in 2.00 seconds = 1386.75 MB/sec
BLKFLSBUF failed: Function not implemented
Timing buffered disk reads: 10 MB in 3.48 seconds = 2.87 MB/sec
BLKFLSBUF failed: Function not implemented
~# hdparm /dev/hdc
/dev/hdc:
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
HDIO_GETGEO failed: Inappropriate ioctl for device
If I enable DMA, then do
Code:
tail -f /var/adm/messages
I see that DMA is disabled just before or as the cache reads test completes:
Apr 20 19:52:54 blah kernel: hdc: DMA disabled
I searched google for "BLKFLSBUF failed: Function not implemented", got mostly foreign language posts, nothing explaining what it is.
I also searched this forum and found the following post, which went unanswered.
This one seems to suggest that its a video playback issue. I suppose it's possible, because I remember installing an nVidia package (NVIDIA-Linux-x86-1.0-9746-pkg1.run) and using a config utility they provided (nvidia-xconfig-1.0.tar.gz), but not knowing how to configure the options very well.
Generally a regular echo statement will output stuff to the screen. If you want the results of something to wind up in a file, do like this:
Code:
hdparm -d 1 /dev/hdc >> /var/log/messages
..the >> will append any output to the file. Using a single > will overwrite a file.
As for BLKFLSBUF, it appears in English to mean "Block Device Flush Buffer" which is an operation which either may return that error due to a kernel bug or with an older version of HDPARM (Google-based results) or when the operation is requested on a mounted ext2 filesystem, or your drive simply does not support it.
As to the DMA, of course it generally won't stay in effect over reboots (mine doesn't either), but you may be able to get it to stay by setting the flag HDPARM -K /dev/hdc which "Keeps settings over reset" so the drive will retain its configuration when reset.. I use DMA and a few other settings in my rc.local file, plus the -K flag to keep settings intact if the drive gets reset. It should work fine in rc.local.
Use 'hdparm' with no options to see the possible arguments you can use.
As for the Xine issue, in a console, type "glxinfo | grep direct" and see if it says something like "Direct Rendering: YES". If it does not, then the issue is in part due to your nvidia driver being misconfigured and Direct Rendering/Hardware acceleration is not working.
Personally, I haven't found the tool 'nvidia-xconfig' to be useful except for VERY basic settings (I have nvidia too), so if you are having issues related to the nvidia driver, you will need to do some editing of the /etc/X11/xorg.conf file.
Hope this helps you out some
>As to the DMA, of course it generally won't stay in effect over reboots (mine doesn't either), but you may be able to get it to stay by setting the flag HDPARM -K /dev/hdc which "Keeps settings over reset"
Did you mean -k (lowercase k)? I think -K applies to some other options, but not -d? I was going to try -k, but was hesitant due to the warning in the man about drive reset loops.
> As for the Xine issue, in a console, type "glxinfo | grep direct" and see if it says something like "Direct Rendering: YES". If it does not, then the issue is in part due to your nvidia driver being misconfigured and Direct Rendering/Hardware acceleration is not working.
Code:
~$ glxinfo | grep direct
Error: unable to open display (null)
I ran into some trouble with slackpkg last night. Had to spend a few hours today getting kernel modules, and other modules installed again. X wasn't working, so I ran through xorgsetup and then ran through the nvidia driver install. X starts, and it seems to be working ok, the only problem I notice is that I can't remote desktop into the machine anymore. It says authentication failed, but I know its the right password. I even re-entered the password on the server, still fails.
-k get/set keep_settings_over_reset flag (0/1)
-K set drive keep_features_over_reset flag (0/1)
Here's the two keep-settings flags. I am using the uppercase K on my system. I am not sure precisely what the difference is between K and k, but neither have a warning beside them. Perhaps trying both would determine any difference?
The 'glxinfo' command, you typed that as user, or as root? Should be as user.
Slackpkg is indeed giving trouble lately, I understand there's maybe a bug in it somewhere. I can't currently get it to work right either.
Finally, I am not sure what to make of your error messages from the drive(s).
*Maybe* check that you have a new verion of HDPARM, and check that your drives are installed in the right spots on the IDE cables and have the Master/Slave switches set correctly (Yes, sounds silly, but it happens to the best of us)..
Also, how old is the device? Any chance there might be a firmware upgrade for it?
> The 'glxinfo' command, you typed that as user, or as root? Should be as user.
I tried it with both accounts, same result.
> Finally, I am not sure what to make of your error messages from the drive(s). *Maybe* check that you have a new verion of HDPARM, and check that your drives are installed in the right spots on the IDE cables and have the Master/Slave switches set correctly (Yes, sounds silly, but it happens to the best of us)..
Also, how old is the device? Any chance there might be a firmware upgrade for it?
Code:
~# hdparm -V
hdparm v6.6
The cables should be installed correctly. This machine has been up and running for many months. I've been able to use it before (watch DVDs...although choppy, read OS CDs) w/o issue. The DVD burner is only 1 year old. If memory serves it isn't sharing a cable with anything else. I'll check the cable later tonight.
I had the same problem with my dvd-drive and the standard Slackware kernel. The problem was, that the dvd-drive didn't have dma and it was not possible to enable dma.
@ Fluxx -- Very helpful stuff, thanks for jumping in
Here's a final tip, for both of you and anyone else interested:
While OLDER drive devices did not work better than UDMA2 with the standard 40-wire IDE cable, modern devices, when capable, WILL work above UDMA2 if they are able, but they need a 80-wire cable to do so.
Many computers come with only one of the two IDE cables being the 80-wire model (on IDE-0), and the other is 40-wire (on IDE-1).
I just recently replaced both my IDE cables with brand new 80-wire cables, and now three of four of my IDE drives are operating at UDMA4 or UDMA5; the fourth unit is only UDMA2-enabled.
Hmmm indeed, a good point I had not even thought about. I suspect you could be totally correct.
At a glance, I wonder if the OP has a laptop; I think it's a desktop machine..
Thanks Grapefruitgirl, it was in fact the cable. I'm sorry for the late response, but end of semester has been overwhelming. The hdparm output showed that my dvd was configured for UDMA4. I noticed that the bios was listing it as UDMA2. Once I swapped the 40-pin cable for an 80-pin one, the bios listed it as UDMA4.
I am now able to play movies w/o any stuttering. One problem that still remains is the input/ouput error when running hdparm -tT. I'll have to do some more research on that one.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.