반응형
Ubuntu에는 3가지 Suspend, Hibernation 모드가 존재합니다.
- Suspend to RAM (Normal Suspend)
- Suspend to Disk (Hibernate)
- Suspend to both (Hybrid)
위 모드는 systemd에서 target으로 각각 관리하고 있습니다.
$systemctl status sleep.target
● sleep.target - Sleep
Loaded: loaded (/lib/systemd/system/sleep.target; static; vendor preset: enabled)
Active: inactive (dead) since Tue 2022-02-22 18:07:56 KST; 1min 33s ago
Docs: man:systemd.special(7)
2월 22 17:59:44 linuxias systemd[1]: Reached target Sleep.
2월 22 18:07:56 linuxias systemd[1]: Stopped target Sleep.
$systemctl status suspend.target
● suspend.target - Suspend
Loaded: loaded (/lib/systemd/system/suspend.target; static; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd.special(7)
2월 22 14:52:50 linuxias systemd[1]: Reached target Suspend.
2월 22 14:52:50 linuxias systemd[1]: Stopped target Suspend.
2월 22 17:16:40 linuxias systemd[1]: Reached target Suspend.
2월 22 17:16:40 linuxias systemd[1]: Stopped target Suspend.
2월 22 18:07:56 linuxias systemd[1]: Reached target Suspend.
2월 22 18:07:56 linuxias systemd[1]: Stopped target Suspend.
$systemctl status hibernate.target
● suspend.target - Suspend
Loaded: loaded (/lib/systemd/system/suspend.target; static; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd.special(7)
2월 22 14:52:50 linuxias systemd[1]: Reached target Suspend.
2월 22 14:52:50 linuxias systemd[1]: Stopped target Suspend.
2월 22 17:16:40 linuxias systemd[1]: Reached target Suspend.
2월 22 17:16:40 linuxias systemd[1]: Stopped target Suspend.
2월 22 18:07:56 linuxias systemd[1]: Reached target Suspend.
2월 22 18:07:56 linuxias systemd[1]: Stopped target Suspend.
$systemctl status hybrid-sleep.target
● suspend.target - Suspend
Loaded: loaded (/lib/systemd/system/suspend.target; static; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd.special(7)
2월 22 14:52:50 linuxias systemd[1]: Reached target Suspend.
2월 22 14:52:50 linuxias systemd[1]: Stopped target Suspend.
2월 22 17:16:40 linuxias systemd[1]: Reached target Suspend.
2월 22 17:16:40 linuxias systemd[1]: Stopped target Suspend.
2월 22 18:07:56 linuxias systemd[1]: Reached target Suspend.
2월 22 18:07:56 linuxias systemd[1]: Stopped target Suspend.
각 모드는 mask, unmask를 이용하여 활성화 비활성화 할 수 있습니다.
비활성화 하기
$sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
Created symlink /etc/systemd/system/sleep.target → /dev/null.
Created symlink /etc/systemd/system/suspend.target → /dev/null.
Created symlink /etc/systemd/system/hibernate.target → /dev/null.
Created symlink /etc/systemd/system/hybrid-sleep.target → /dev/null.
활성화 하기
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
Removed /etc/systemd/system/sleep.target.
Removed /etc/systemd/system/suspend.target.
Removed /etc/systemd/system/hibernate.target.
Removed /etc/systemd/system/hybrid-sleep.target.
반응형
'Linux' 카테고리의 다른 글
[Linux] Ubuntu에서 Ubuntu 22.04 설치 USB 만들기 (0) | 2023.09.09 |
---|---|
[Tip] zsh에서 프롬프트 경로 줄이기 (0) | 2023.03.28 |
[vim] 특정 패턴이 포함된 라인 제거 또는 라인 외 제거 (0) | 2019.07.15 |
[Ubuntu 16.04] Change network interface name (0) | 2017.12.07 |
자주 쓰는 Linux terminal terminator theme (0) | 2017.08.04 |