Hard Drive Active Protection System

提供: ArchWiki
2015年1月6日 (火) 20:21時点におけるKusakata (トーク | 投稿記録)による版 (ページの作成:「Category:Laptops (日本語) en::Hard Drive Active Protection System zh-CN:Hard Drive Active Protection System ハードディスクアクティブプロテ...」)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
ナビゲーションに移動 検索に移動

ハードディスクアクティブプロテクションシステム (Hard Drive Active Protection System, HDAPS) はハードドライブを突然の衝撃から保護します (ノートパソコンを机から落としたりバンバン叩いたりするなど)。ディスクのヘッドを停止することで、衝撃によってドライブのプラッタにぶつからないようにすることで保護します。これによって致命的な問題が発生するのを防ぎます。

ノート: SSD ドライブには機械的な部品が存在しないため HDAPS は不要です。

衝撃検出

ハードウェアが何らかの衝撃検出をサポートしている必要があります。ノートパソコンのマザーボードに加速度計などが搭載されていれば OK です。ハードウェアが検出に対応していたら、次に、ハードウェアが検出したものをオペレーティングシステムに伝える手段が必要になります。このセクションでは加速度計の状態を OS に伝えるドライバーについて説明します。ドライバーを使うことによって衝撃を検出して保護することが可能です。

tp_smapi

tp_smapi は ThinkPad ノートパソコンのドライバーのセットです。サポートされている ThinkPad を使っている場合、たとえ HDAPS を使う予定がなくても、ドライバーをインストールすることを強く推奨します。たくさんある便利なことの一つとして、tp_smapi は加速度計の出力をジョイスティックデバイス /dev/input/js# として表します。

ノート: これがシステムの他のジョイスティックデバイスに干渉することもあります。

tp_smapi を community リポジトリからインストールしてください。インストール後、tp_smapi/etc/modules-load.d/tp_smapi.conf ファイルに追加します (systemd を使っている場合)。再起動後、ドライバーが有効になって、/sys/devices/platform/smapi ファイルシステムで確認できます。

The kernel provides its own HDAPS drivers. Previously, it was necessary to manually insmod the module via /etc/rc.local to prevent the default drivers from being loaded. The tp_smapi package from community now installs hdaps.ko to /lib/modules/$(uname -r)/updates, which will let it supercede the built-in module. Thus, you can simply add hdaps to your MODULES array.

ノート: According to this bug report, certain ThinkPad laptops use different firmware which tp_smapi does not support and is unlikely to support in the near future. This includes the following series: Edge, SL, L, X1xxe. Only one of these is listed in the "unsupported hardware" page for the project, however, and that listing suggests that the x121e should mostly work. I get the same error with the x121e listed at the bottom of the bug report as a different and more fundamental problem, though, so it may be that some models of the x121e are mostly supported and others are entirely unsupported.

Invert モジュールパラメータ

For some ThinkPads, the invert module parameter is needed in order to handle the X and Y rotation axes correctly. In that case, you can add the option in /etc/modprobe.d/modprobe.conf:

options hdaps invert=1

invert=1 is an example value used for a ThinkPad T410. The invert option takes the following values:

  • invert=1 invert both X and Y axes;
  • invert=2 invert the X axes (uninvert if already both axes inverted)
  • invert=4 swap X and Y (takes place before inverting)

Note that options can be summed. For instance, invert=5 swaps the axes and inverts them. The maximum value of invert is obviously 7. If you do not know which option is correct for you, just try them out with hdaps-gl or some other GUI (see below). Alternatively, you can determine the exact value for your thinkpad model from this table under the column labelled "HDAPS axis orientation".

As an alternative to reloading the hdaps module, the invert value can also be written directly to /sys/devices/platform/hdaps/invert.

衝撃保護

ハードウェアが検出した衝撃を OS に報告するようになったら、データを使って何かをする必要があります。このセクションではセンサーの出力を衝撃の保護に変えるソフトウェアユーティリティを説明します。

hdapsd

hdapsd は HDAPS ジョイスティックデバイスの出力を監視して衝撃が起こりそうなのを確認して、カーネルにディスクのヘッドを停止するように命令します。

You should check your "Load cycle count" in SMART when setting up hdaps, if it is too sensitive the head would park too often and load cycle count would rise too rapidly.

hdapsd をインストールしてください。hdapsd.service を使って hdapsd デーモンを起動できます。

You can adjust the parameters, with which hdapsd is run by providing your own unit file as explained in the systemd article, for example the following file will adjust sensitivity and logging behaviour of the hdaps daemon:

/etc/systemd/system/hdapsd.service.d/sensitivity.conf
[Service]
ExecStart=
ExecStart=/usr/bin/hdapsd --sensitivity=40 -blp

And reload the configuration.

GUI ユーティリティ

Utilities exist to monitor hdapsd's status so you know what is going on while you are using your laptop. These are entirely optional, but very handy.

gnome-hdaps-applet

This is a GNOME panel applet (Note: XFCE can use GNOME panel applets) that represents the current status of your hard drive. The package is available in AUR: gnome-hdaps-appletAUR. If you do not want to monitor sda or hda by default, edit the PKGBUILD before compiling.

kdeplasma-applets-hdaps-monitor

For KDE4 there is a plasmoid for HDAPS monitoring HDAPS monitor. The package kdeplasma-applets-hdaps-monitorAUR is available in AUR.

xfce4-hdaps

This is a Xfce4 panel applet that can represents the current status of your hard drive. Available in AUR: xfce4-hdapsAUR. After install, add this applet to a panel.

HDAPSicon

HDAPSicon, formerly thinkhdapsAUR, is a standalone GTK applet for HDAPS disk protection status. While running will show applet icon in the notification area. Available in AUR: hdapsicon-gitAUR.

hdaps-gl

Simple OpenGL application showing the 3D animation of your Thinkpad. Similar to the apllication Lenovo distributes with Windows. hdaps-glAUR is available in AUR.

参照