ハイバネートとハイブリッドスリープ
GPD MicroPCはその特性上常用するようなものではなく,
まずはスワップファイルを拡張します。昔はハイバネートを使用する場合はメモリと同容量のスワップパーティションが必要といわれていましたが,
拡張と表現していますが,
$ swapoff -a $ sudo fallocate -l 8g /swapfile $ sudo mkswap /swapfile
ここでスワップファイルのUUIDが表示されるため,
/etc/
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
の行に追加します。例は次のとおりです。
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=6ce18d51-bc98-4218-966b-e216817f097e"
前述のとおりスワップファイルを拡張した際にUUIDが表示されているので,
設定完了後次のコマンドを実行してください。
$ sudo update-grub
ここで一度再起動します。
root権限がなくてもハイバネートできるよう,
[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-
multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=yes
さて,
$ systemctl hibernate
しかし再起動しても新たにログインしたのと同じ状態になってしまいます。したがってpm-utilsパッケージに含まれている/usr/
次のコマンドを実行してください。
$ sudo apt install pm-utils $ sudo cp /lib/systemd/system/systemd-hibernate.service /etc/systemd/system $ sudo cp /lib/systemd/system/systemd-hybrid-sleep.service /etc/systemd/system
見てのとおり,
/etc/
[Unit]
Description=Hibernate
Documentation=man:systemd-suspend.service(8)
DefaultDependencies=no
Requires=sleep.target
After=sleep.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/pm-hibernate
/etc/
[Unit]
Description=Hybrid Suspend+Hibernate
Documentation=man:systemd-suspend.service(8)
DefaultDependencies=no
Requires=sleep.target
After=sleep.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/pm-suspend-hybrid
一番下の行を書き換えているだけです。
次のコマンドのとおり,
$ sudo systemctl daemon-reload $ systemctl hibernate
ハイブリッドスリープを実行する場合は,
$ systemctl hybrid-sleep
コマンドラインではなくGNOME Shellからハイバネートやハイブリッドスリープを実行する場合はHibernate Status Buttonをインストールするといいでしょう