ArchLUG Kwiki - www.archlug.org

Download the RSS XML Feed for this site

Download the RSS XML Feed for this site

Subscribe to this channel with Amphetadesk

Subscribe to this channel with RadioUserland

Add to Google

XandrosAndHdparmSettings


Making hdparm commands persist between reboots

*Q*: I can't get my hdparm settings to take effect after a reboot in Xandros. Every time I reboot it resets itself back to the default settings.

*A*: Try putting the hdparm command into the file /etc/init.d/bootmisc.sh

Applying hdparm commands to your CD burner

*Q*: My cdrom seems to max out the cpu when it's in use which suggest DMA mode is not on. How do I check or switch it on?

*A*: DMA and other ATAPI attributes are not handled by the IDE-SCSI emulation driver that gets installed for a CD WRITER device. You should, however, be able to set the DMA by accessing the device via the PCI bus path, not via the /dev/cdrom link, as that links to the SCSI device emulator device driver.

Here's some commands that will tell you more info about your cd burner:

scsi_info
cdrecord driver=help
cdrecord -scanbus
cdrecord -inq dev=1,0,0 # Use the device your CD burner was listed prior
cdrecord -prcap dev=1,0,0 # My cdrom is device 1,0,0

You should also be able to set the default DMA mode in your BIOS. Try "auto" or run a "disk detection" for the CDROM drive to set it.

Also, I did find what the CDROM device via the IDE driver is named for Xandros. On my system, my CD burner is actually the first drive on the second IDE controller (hence the "bus1" and "target0" below).

hdparm /dev/ide/host0/bus1/target0/lun0/generic

The second drive on the first controller would be: /dev/ide/host0/bus0/target1/lun0/generic

You may be able to use the hdparm command on that device. The DMA parameter on my system is 'using_dma'. YMMV. You can see what your settings aer by using the 'cat' command (or viewing the contents in XFM) on the "file" /proc/ide/ide1/hdc/settings. 'ide1' is the second IDE controller, 'ide0' is the first. And your drive letters may be different as well. I'm guessing that 'hdc' is the first "drive" on that controller, and 'hdd' would be the second. The file is read-only. To change a value listed as "rw" or read/write, the hdparm command below returns the following information about my drive:

# # Display the full information available about my drive
# hdparm -I /dev/ide/host0/bus1/target0/lun0/generic

/dev/ide/host0/bus1/target0/lun0/generic:

ATAPI CD-ROM, with removable media
        Model Number:       LITE-ON LTR-48246S
        Serial Number:
        Firmware Revision:  SS04
Standards:
        Used: ATAPI for CD-ROMs, SFF-8020i, r2.5
        Supported: CD-ROM ATAPI-2
Configuration:
        DRQ response: 50us.
        Packet size: 12 bytes
Capabilities:
        LBA, IORDY(cannot be disabled)
        DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=227ns  IORDY flow control=120ns

And the sequence of hdparm commands to display, and then to toggle the DMA usage off and then back on again is as follows:

# # Display the current dma setting
# hdparm -d /dev/ide/host0/bus1/target0/lun0/generic

/dev/ide/host0/bus1/target0/lun0/generic:
 using_dma    =  1 (on)

# # Toggle the current dma setting OFF
# hdparm -d0 /dev/ide/host0/bus1/target0/lun0/generic

/dev/ide/host0/bus1/target0/lun0/generic:
 setting using_dma to 0 (off)
 using_dma    =  0 (off)

# # Toggle the current dma setting ON
# hdparm -d1 /dev/ide/host0/bus1/target0/lun0/generic

/dev/ide/host0/bus1/target0/lun0/generic:
 setting using_dma to 1 (on)
 using_dma    =  1 (on)

If you need to make a setting "permanent" (i.e. set on bootup), add your hdparm command to the end of /etc/init.d/bootmisc.sh as described above.


Back to XandrosKwikis


Valid XHTML 1.0! Valid CSS!
InterTran (www.tranexp.com)
InterTran (www.tranexp.com)

Please MOVE AND HOLD your MOUSE CURSOR over any WORD in the translated web page in order to see a pop-up window with ALTERNATIVE TRANSLATIONS. Translations provided by: www.tranexp.com