特殊:Badtitle/NS100:DMA:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第17行: | 第17行: | ||
These instructions assume that you are trying to enable DMA on `hdc`, usually the CD-rom drive. | These instructions assume that you are trying to enable DMA on `hdc`, usually the CD-rom drive. | ||
# See the what the settings are on `/dev/hdc` | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo hdparm /dev/hdc | sudo hdparm /dev/hdc | ||
</nowiki></pre> | </nowiki></pre> | ||
# If you get a line like <code><nowiki> using_dma = 1 (on)</nowiki></code>, DMA is already enabled. Skip to step 4 to see if it has been enabled at boot time. | |||
# Enable DMA on `/dev/hdc` | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo hdparm -d1 /dev/hdc | sudo hdparm -d1 /dev/hdc | ||
</nowiki></pre> | </nowiki></pre> | ||
# You have now enabled DMA for the drive. However, in order for the settings to be automatically applied at boot there you need to edit the <code><nowiki>/etc/hdparm.conf</nowiki></code> script. To do this use this command: <code><nowiki>gksudo gedit /etc/hdparm.conf</nowiki></code> | |||
Add the following to the end of your hdparm.conf | Add the following to the end of your hdparm.conf |
2007年5月13日 (日) 16:29的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/DMA }} |
点击翻译: |
English {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/af | • {{#if: php5|Afrikaans| [[::DMA/af|Afrikaans]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/ar | • {{#if: php5|العربية| [[::DMA/ar|العربية]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/az | • {{#if: php5|azərbaycanca| [[::DMA/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/bcc | • {{#if: php5|جهلسری بلوچی| [[::DMA/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/bg | • {{#if: php5|български| [[::DMA/bg|български]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/br | • {{#if: php5|brezhoneg| [[::DMA/br|brezhoneg]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/ca | • {{#if: php5|català| [[::DMA/ca|català]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/cs | • {{#if: php5|čeština| [[::DMA/cs|čeština]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/de | • {{#if: php5|Deutsch| [[::DMA/de|Deutsch]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/el | • {{#if: php5|Ελληνικά| [[::DMA/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/es | • {{#if: php5|español| [[::DMA/es|español]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/fa | • {{#if: php5|فارسی| [[::DMA/fa|فارسی]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/fi | • {{#if: php5|suomi| [[::DMA/fi|suomi]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/fr | • {{#if: php5|français| [[::DMA/fr|français]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/gu | • {{#if: php5|ગુજરાતી| [[::DMA/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/he | • {{#if: php5|עברית| [[::DMA/he|עברית]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/hu | • {{#if: php5|magyar| [[::DMA/hu|magyar]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/id | • {{#if: php5|Bahasa Indonesia| [[::DMA/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/it | • {{#if: php5|italiano| [[::DMA/it|italiano]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/ja | • {{#if: php5|日本語| [[::DMA/ja|日本語]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/ko | • {{#if: php5|한국어| [[::DMA/ko|한국어]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/ksh | • {{#if: php5|Ripoarisch| [[::DMA/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/mr | • {{#if: php5|मराठी| [[::DMA/mr|मराठी]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/ms | • {{#if: php5|Bahasa Melayu| [[::DMA/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/nl | • {{#if: php5|Nederlands| [[::DMA/nl|Nederlands]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/no | • {{#if: php5|norsk| [[::DMA/no|norsk]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/oc | • {{#if: php5|occitan| [[::DMA/oc|occitan]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/pl | • {{#if: php5|polski| [[::DMA/pl|polski]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/pt | • {{#if: php5|português| [[::DMA/pt|português]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/ro | • {{#if: php5|română| [[::DMA/ro|română]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/ru | • {{#if: php5|русский| [[::DMA/ru|русский]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/si | • {{#if: php5|සිංහල| [[::DMA/si|සිංහල]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/sq | • {{#if: php5|shqip| [[::DMA/sq|shqip]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/sr | • {{#if: php5|српски / srpski| [[::DMA/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/sv | • {{#if: php5|svenska| [[::DMA/sv|svenska]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/th | • {{#if: php5|ไทย| [[::DMA/th|ไทย]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/tr | • {{#if: php5|Türkçe| [[::DMA/tr|Türkçe]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/vi | • {{#if: php5|Tiếng Việt| [[::DMA/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/yue | • {{#if: php5|粵語| [[::DMA/yue|粵語]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/zh | • {{#if: php5|中文| [[::DMA/zh|中文]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/zh-hans | • {{#if: php5|中文(简体)| [[::DMA/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}DMA}}/zh-hant | • {{#if: php5|中文(繁體)| [[::DMA/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:php5|:DMA|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :DMA/zh | | {{#ifexist: DMA/zh | | {{#ifeq: {{#titleparts:DMA|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:DMA|1|-1|}} | zh | | }}
Introduction
If you experience jumpy DVD playback, slow CD ripping, or a general slow down when accessing optical drive(s) it may be because DMA is not enabled. DMA, or Direct Memory Access, lets hard drives and CD/DVD drives access the system memory.
Ubuntu 6.06 (Dapper Drake) has DMA automatically enabled for drives that support it.
attachment:IconsPage/IconDialog-Warning1.png Warning: Enabling DMA can be dangerous in some cases. Usually issues are directly related to faulty hardware, poorly written drivers, or using settings that are unsupported by your system.
USING HDPARM INCORRECTLY CAN CAUSE MAJOR DATA CORRUPTION AND/OR LOSS. Most systems newer than 4 years support DMA.
Enabling DMA
To enable DMA, you need to use the hdparm
command and the configuration file hdparm.conf
.
These instructions assume that you are trying to enable DMA on `hdc`, usually the CD-rom drive.
- See the what the settings are on `/dev/hdc`
sudo hdparm /dev/hdc
- If you get a line like
using_dma = 1 (on)
, DMA is already enabled. Skip to step 4 to see if it has been enabled at boot time. - Enable DMA on `/dev/hdc`
sudo hdparm -d1 /dev/hdc
- You have now enabled DMA for the drive. However, in order for the settings to be automatically applied at boot there you need to edit the
/etc/hdparm.conf
script. To do this use this command:gksudo gedit /etc/hdparm.conf
Add the following to the end of your hdparm.conf
/dev/hdc { dma = on }
(another way of avoiding editing of the hdparm.conf file is to simply run sudo hdparm -d1 -k1 /dev/hdc
to keep the DMA flag).
Troubleshooting
If your drives are configured in [Cable Select] mode and while running `hdparm` commands you receive errors related to timeouts or drive not ready, try changing the drive to be a master or slave device depending on your system configuration. This does require opening the case and as far as I know most drives are set to Cable Select from the manufacturer.
Sometimes step 3 above can fail with an "Operation Not Permitted" message. You can fix this by editing the file /etc/modules: For an Intel CPU put the lines
piix ide-core
above the line
ide-cd
For an AMD CPU put the line
amd74xx
above
ide-cd
For a VIA Chipset put
via82cxxx
above
ide-cd
Then reboot and try steps 3-4 again....
Further reading
The hdparm has further options that may be more risky. They can be seen using the man hdparm
command in the terminal.
For a detailed description of DMA visit the IEEE http://standards.ieee.org/reading/ieee/std_public/description/busarch/1212.1-1993_desc.html
IDE, EIDE and UDMA http://www.spcug.org/reviews/bl0108.htm
CategoryDocumentation