highlight.xcode

2017年10月17日火曜日

Debian stretch その 5 環境整備編④



Debian GNU/Linux を更新したのでメモ。

ターゲットPCは GA-MA78GPM-DS2H + AMD Athlon X2 5050e。
今回はハードウェア回りを整えていきます。

現在、ビデオドライバやセンサー関係が正しく動作できていないので、これをどうにかします。
How to install AMDGPU drivers on Debian 9 Stretch Linux - LinuxConfig.org」を参考にさせてもらいました。

正しくハードウェアを認識できる様にファームウェアに関するパッケージをインストールします。
この firmware-linux パッケージには LLVM 等が必要みたいなんですが、バージョン 3.9 以上が必要な様です。 現在の llvm パッケージ、および clang パッケージのデフォルトパッケージは、バージョン 3.8 になっているので注意が必要かもしれません。
# aptitude install firmware-linux llvm-3.9 clang-3.9

インストール終了後、再起動。
無事ソフトウェアレンダリングモードから脱し、ハードウェアアクセラレーションが効いた状態のログイン画面が表示されました。

次にセンサー関係です。
lm sensors not returning CPU temp (it87) - Ask Ubuntu」を参考にさせてもらいました。
it87 カーネルモジュールを使う為には、GRUB にも設定が必要みたいです。
マンドクセ('A`)。

/etc/default/grub を編集します。
# vi /etc/default/grub

GRUB_CMDLINE_LINUX オプションに acpi_enforce_resources=lax を追加。
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="acpi_enforce_resources=lax"
(省略)

GRUB の設定なので、当然再起動しないと有効になりません。
ハードウェア周りの設定は再起動が多くて、マンドクセ('A`)。

これでいよいよセンサーが使える様になりました。
センサー関係のパッケージは lm-sensors なんですが、パッケージ情報を見たところ、自動でインストール済みでした。
# aptitude show lm-sensors

次にセンサーの検出を行います。
基本的に全てデフォルト回答で OK の筈。
最後の「/etc/modules に追加するか?」って質問にだけ yes と答えると、カーネルモジュールが自動的に読み込まれる様になります。
# sensors-detect 
# sensors-detect revision 6284 (2015-05-31 14:00:33 +0200)
# System: Gigabyte Technology Co., Ltd. GA-MA78GPM-DS2H
# Kernel: 4.9.0-4-686-pae i686
# Processor: AMD Athlon(tm) Dual Core Processor 5050e (15/107/2)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you`re doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): 

(省略)

To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
it87
#----cut here----
If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones!

Do you want to add these lines automatically to /etc/modules? (yes/NO)yes
Successful!

Monitoring programs won`t work until the needed modules are
loaded. You may want to run '/etc/init.d/kmod start'
to load them.

Unloading i2c-dev... OK
Unloading cpuid... OK

センサーの状態を確認してみます。
# sensors
it8718-isa-0228
Adapter: ISA adapter
in0:          +0.90 V  (min =  +0.00 V, max =  +4.08 V)
in1:          +1.84 V  (min =  +0.00 V, max =  +4.08 V)
in2:          +3.33 V  (min =  +0.00 V, max =  +4.08 V)
+5V:          +3.01 V  (min =  +0.00 V, max =  +4.08 V)
in4:          +3.01 V  (min =  +0.00 V, max =  +4.08 V)
in5:          +4.08 V  (min =  +0.00 V, max =  +4.08 V)  ALARM
in6:          +4.08 V  (min =  +0.00 V, max =  +4.08 V)  ALARM
in7:          +0.02 V  (min =  +0.00 V, max =  +4.08 V)
Vbat:         +2.78 V  
fan1:         981 RPM  (min =    0 RPM)
fan2:           0 RPM  (min =    0 RPM)
fan3:           0 RPM  (min =    0 RPM)
temp1:        +35.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp2:        +22.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermal diode
temp3:        +30.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
cpu0_vid:    +1.100 V
intrusion0:  ALARM

k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:   +15.0°C  
Core0 Temp:   +13.0°C  
Core1 Temp:   +23.0°C  
Core1 Temp:    +8.0°C  

OK みたいですね。
後はアプレットを追加するなりすれば、ハードウェアの状態を観察する事が出来ます。

0 件のコメント:

コメントを投稿