ページ

2023-09-17

AMD P-State EPP を使ってみた

LMDE 6 で Linux kernel 6.4 が使えるようになったので、AMD P-State EPP ドライバーを使ってみました。

AMD P-State EPP ドライバーは Linux kernel 6.3 以降で使えるようです。Linux kernel 6.5 からは標準で有効化されるみたいです。Linux Mint 21.2 ではまだ Linux kernel 6.2 までしか使えなかったので、EPP ドライバーは試すことができませんでした。

 

EPP ドライバーの有効化

LMDE 6 では /etc/default/grub.d/50_lmde.cfg に以下のように amd_pstate=active と記載します。

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amd_pstate=active"

PC を再起動する前に以下のコマンドで GRUB の設定変更を反映させておきます。

sudo update-grub

PC を再起動後、cpupower コマンドでドライバー名を確認してみます。

$ cpupower frequency-info
analyzing CPU 0:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 3.00 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.00 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no

ドライバー名が amd-pstate-epp と表示されていますね。成功です。

でも、選べる governor が「performance」「powersave」の 2種類しかないですね。デフォルトでは「powersave」が選択されました。


EPP ドライバーの無効化

EPP ドライバーを無効にするには同じく amd_pstate=passive と指定します。

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amd_pstate=passive"

編集したあとはやはり GRUB への反映コマンドを投入しておき、PC を再起動します。

PC 再起動後の cpupower コマンドの結果は以下の通りです。

analyzing CPU 0:
  driver: amd-pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 20.0 us
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: ondemand performance schedutil
  current policy: frequency should be within 400 MHz and 3.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 682 MHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
    AMD PSTATE Nominal Performance: 145. Nominal Frequency: 3.90 GHz.
    AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.37 GHz.
    AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.

ドライバー名が amd-pstate と EPP ドライバーが無効化されていることが確認できます。

おや?Linux kernel 6.2 の時は選べる governor に「powersave」「conservative」もあった気がしますが、選べなくなっているみたいです。


使ってみた感じ

EPP の pwersave と通常版の ondemand での使用感の比較です。

EPP の方が高いクロックで待機しているような感じで CPU 温度が高めになります。 通常版の schedutil に近い動きだと感じました。

CPU 温度を低く保ちたいなら通常版の ondemand の方が良さそうです。

通常版の schedutil は「艦これ」などブラウザー操作時に性能向上を体感できるのですが、EPP powersave だとそこまでではない感じです。ただし、「艦これ」の戦闘時にアニメーションなどのカクツキが少ない感じもするので、現在は EPP powersave で運用しています。