나는 이 문제에 관한 두 가지 공식 문서를 읽었습니다.
나는 이것이 어떤 일을 하는지 알아보기 위해 다음과 같은 간단한 스크립트를 작성해 보았습니다.
나는 그들이 게시물에서 언급한 모든 패키지를 설치했습니다.
# /etc/pm/sleep.d/suspend.sh
#
# The /etc/pm/sleep.d is the right place to put your custom suspend/resume scripts.
# None of the stuff in /etc/hibernate/ has _any_ effect (OnResume, RestartServices,
# UnloadModules etc). The /etc/init.d/atheros script is just a simple wrapper for
# unloading the ath_pci module.
case "$1" in
hibernate|suspend)
logger went to hibernate or suspend!
;;
thaw|resume)
logger resumed from hibernation or suspend!
;;
*) exit $NA
;;
esac
로거 출력이 없습니다.
그런 다음 이 파일을 편집했습니다./etc/acpi/lid.sh
이 코드를 추가했습니다
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
rfkill block all && hibernate -k -f
else
rfkill unblock all
fi
작동하는 것 같은 일시 중지 버튼을 시도하면 노트북이 절전 모드로 전환되었다가 전원 버튼을 잠시 누른 후 깨어납니다. 로그를 확인해보니 이 메시지가 일시 중지를 참조하는 것으로 나타났습니다.
Dec 14 00:25:16 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Dec 14 00:25:16 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Dec 14 00:25:35 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Dec 14 00:25:35 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Dec 14 00:30:22 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Dec 14 00:30:22 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked world-writable. Please remove world writability permission bits. Proceeding anyway.
Dec 14 00:30:22 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Dec 14 00:30:22 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked world-writable. Please remove world writability permission bits. Proceeding anyway.
Dec 14 00:31:43 host systemd[1]: [/etc/systemd/system/suspend-sedation.service:1] Missing '='.
Dec 14 00:31:48 host systemd[1]: [/etc/systemd/system/suspend-sedation.service:1] Missing '='.
Dec 14 00:32:11 host systemd[1]: [/etc/systemd/system/suspend-sedation.service:1] Unknown section 'unit'. Ignoring.
Dec 14 00:33:07 host systemd[1]: [/etc/systemd/system/suspend-sedation.service:1] Unknown section 'unit'. Ignoring.
Dec 14 00:36:26 host swapon[571]: swapon: /dev/sda4: software suspend data detected. Rewriting the swap signature.
Dec 14 00:36:26 host rsyslogd-2007: action 'action 17' suspended, next retry is Mon Dec 14 00:36:56 2015 [try http://www.rsyslog.com/e/2007 ]
Dec 14 00:41:38 host swapon[588]: swapon: /dev/sda4: software suspend data detected. Rewriting the swap signature.
Dec 14 00:41:38 host rsyslogd-2007: action 'action 17' suspended, next retry is Mon Dec 14 00:42:08 2015 [try http://www.rsyslog.com/e/2007 ]
Dec 14 00:54:53 host swapon[561]: swapon: /dev/sda4: software suspend data detected. Rewriting the swap signature.
Dec 14 00:54:53 host rsyslogd-2007: action 'action 17' suspended, next retry is Mon Dec 14 00:55:23 2015 [try http://www.rsyslog.com/e/2007 ]
Dec 14 01:05:22 host swapon[527]: swapon: /dev/sda4: software suspend data detected. Rewriting the swap signature.
Dec 14 01:05:22 host rsyslogd-2007: action 'action 17' suspended, next retry is Mon Dec 14 01:05:52 2015 [try http://www.rsyslog.com/e/2007 ]
Dec 14 01:09:21 host kernel: [ 186.002598] Suspending console(s) (use no_console_suspend to debug)
Dec 14 01:09:21 host kernel: [ 186.046622] wl_suspend: PCI Suspend handler
Dec 14 01:09:21 host kernel: [ 186.046631] wl_suspend: Not WOWL capable
Dec 14 01:09:21 host kernel: [ 186.641662] PM: suspend of devices complete after 639.250 msecs
Dec 14 01:09:21 host kernel: [ 186.642043] PM: late suspend of devices complete after 0.379 msecs
Dec 14 01:09:21 host kernel: [ 186.657547] PM: noirq suspend of devices complete after 15.511 msecs
[ 186.046622] wl_suspend: PCI Suspend handler
[ 186.046631] wl_suspend: Not WOWL capable
[ 186.641662] PM: suspend of devices complete after 639.250 msecs
[ 186.642043] PM: late suspend of devices complete after 0.379 msecs
[ 186.657547] PM: noirq suspend of devices complete after 15.511 msecs
이제 최대 절전 모드에 들어가면 죽은 것 같습니다. 상태를 저장하지 않으며 수신한 모든 내용이 EFI 메뉴 선택기로 다시 전송됩니다.
blubee@host:~$ sudo cat /var/log/syslog | grep "hiber"
Dec 14 00:36:26 host kernel: [ 4.213177] PM: Looking for hibernation image.
Dec 14 00:41:38 host kernel: [ 4.231179] PM: Looking for hibernation image.
Dec 14 00:54:53 host kernel: [ 4.219918] PM: Looking for hibernation image.
Dec 14 01:05:22 host kernel: [ 4.213743] PM: Looking for hibernation image.
dmesg의 출력
[ 4.213743] PM: Looking for hibernation image.
그런데, 이 노트북에는 16GB RAM이 있고 확인하기 위해 32GB 스왑이 있습니다. 32GB는 너무 크다고 들었는데 그냥 테스트해보고 싶었어요.
이 문제를 해결하고 최대 절전 모드가 예상대로 작동하도록 하려면 어떻게 해야 합니까?
답변1
최대 절전 모드 파일 설정
상술 한 바와 같이이것게시물, 최대 절전 모드 파일 설정이 도움이 될 수 있습니다…
스왑 파티션의 uuid를 찾으십시오. 파티션이 sdb3이라고 가정하면
$ ls -l /dev/disk/by-uuid/ | grep sdb3 lrwxrwxrwx 1 root root 10 окт. 9 08:59 1dd7e123-1f82-45f0-a202-0ff3ea6f081a -> ../../sdb3
열어서
/etc/default/grub
로 시작하는 줄을 찾으세요GRUB_CMDLINE_LINUX_DEFAULT="
. 따옴표 사이에 추가합니다resume=/dev/disk/by-uuid/your-swap-uuid
. 예를 들어:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/disk/by-uuid/1dd7e123-1f82-45f0-a202-0ff3ea6f081a"
- 루트로 실행
update-grub
BIOS 설정
내가 겪었던 또 다른 문제는 일부 BIOS 설정과 관련이 있었습니다. 새로고침했어요BIOS 기본값드디어 성공했다
답변2
/etc/default/grub
다음과 같이 경로에서 이미지 위치를 지정할 수 있습니다.
GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/sda4"