トップ «前の日記 最新 次の日記»

2020-07-23 (Th) [長年日記]

_ NVMe の SSD

https://wiki.archlinux.jp/index.php/%E3%82%BD%E3%83%AA%E3%83%83%E3%83%89%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%89%E3%83%A9%E3%82%A4%E3%83%96/NVMe

NVMe デバイスでは discard は実行するべきではありません。

え!? 外しとこ…

ついでに、

https://wiki.archlinux.jp/index.php/%E3%82%BD%E3%83%AA%E3%83%83%E3%83%89%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%89%E3%83%A9%E3%82%A4%E3%83%96

デフォルトの CFQ (Completely Fair Queuing) スケジューラから NOOP または Deadline に切り替えたほうが良いでしょう。

none に変更した。

ちなみに noop じゃなくて none だった。最近変わったのかな。none より noop の方が単語の意味的に正しい気がするんだけど。

_ fan control

https://wiki.archlinux.org/index.php/Fan_speed_control

↑この辺見ると、amdgpu-fan というパッケージがあるらしい。

じゃぁ fan を通常使用で音がしないくらいに調整してみようか、と思ったんだけど、 /sys に pwm* がない… orz

_ journal やっぱりおかしい

最初は /run/ に吐く? そして journalctl --flush したら /var/ に移動して、 それ以降は /var/ に吐く?

/var/ を mount した時点で journalctl --flush したいなぁ。

/usr/lib/systemd/system/systemd-journal-flush.service/etc/systemd/system/ へコピーして、そのファイルの Requires=After= に以下のように zfs-mount.service を追加する。

#  SPDX-License-Identifier: LGPL-2.1+
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Flush Journal to Persistent Storage
Documentation=man:systemd-journald.service(8) man:journald.conf(5)
DefaultDependencies=no
Requires=systemd-journald.service zfs-mount.service
After=systemd-journald.service systemd-remount-fs.service zfs-mount.service
Before=systemd-tmpfiles-setup.service
RequiresMountsFor=/var/log/journal

[Service]
ExecStart=journalctl --flush
ExecStop=journalctl --smart-relinquish-var
Type=oneshot
RemainAfterExit=yes
TimeoutSec=90s

以上完了。

unit file の編集って、なんでこういう流儀なんだろうな… OS アップデートで /usr/lib/systemd/system/ のファイルが更新されても、 それを知りようがないじゃん。 .pacnewファイルでも作ってくれた方がまだマシなんだけど…

ん?

https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-managing_services_with_systemd-unit_files

必要なユニットのいずれかが開始しないと、ユニットはアクティブになりません。

は? なんで「いずれか」?

いや…「いずれかが開始しなかった場合」の間違いかな。 「いずれかが開始しないと」だと、いずれかが開始すればいい、と読めてしまう。 誤訳か。

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/chap-managing_services_with_systemd#sect-Managing_Services_with_systemd-Unit_Files

If any of the required units fail to start, the unit is not activated.

うん。だな。

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/chap-managing_services_with_systemd#sect-Managing_Services_with_systemd-Unit_Files

10.6.4. Modifying Existing Unit Files

お、なんだ、drop-in でできるんじゃん。これいいな。

/etc/systemd/system/systemd-journal-flush.service.d/dependencies.conf:

[Unit]
Requires=zfs-mount.service
After=zfs-mount.service

これだけで良かった。

drop-in の関連で言うと、 個人的には /etc/passwd なんかも drop-in にならんかな、と思ってる。 OS インストール後、必ず編集されるものだし、OS アップデートで変わることもあるものだし。

このファイルは直接自前のプログラムで参照するのでなく、getpw とか使うわけなんだから、 glibc が対応すればそれで済む話。 ただ、別の側面として、じゃぁ /etc/shadow はどうすんの? drop-in ディレクトリの中で ちゃんとパーミッションを管理できるの? という話にはなりそうな気がするけど。

_ resume の問題

時々、suspend からの resume に失敗する。

そして、長時間 (一晩とか) suspend していた場合に多いので、手に負えない…

https://www.reddit.com/r/archlinux/comments/f7oti1/issue_with_resume_from_suspend_black_backlit/

reddit で↑こういうスレッドを見つけたけど、 5.5 系に何かあったみたいで、5.6 では治ってるらしい。 私のバージョンは 5.7 系。

↑このスレでは、LTS に戻したら治った人もいるみたいなので LTS を試してみたけど、そもそも wayfire が起動しない。 GPU 系エラーはログに出てないので意味わからん。

とりあえず MODULES=(amdgpu) で early KMS にして明日の朝を待つ。

が、期待はあまりしてない。このスレで取り上げられてる症状は 何度でも起きるものっぽくて、たぶん私の症状とは違う。 このスレの中に bugzilla.kernel.org へのリンクがあって、そっちを読んだところ、 dmesg が投稿されていたし、SSH はできるみたいな説明もあった。 が、私の場合、電源ボタンすら効かなくて完全に固まってるみたい。

どうすっかなー


編集 パスワード変更