랩톱 덮개를 닫을 때 자동 일시 중단을 비활성화하는 방법은 무엇입니까? [18618.066167] Suspending console(s) (use no_console_suspend to

archlinux를 사용하고 있습니다. 최근 시스템 업그레이드 전에 자동 일시 중단되지 않습니다 (커널을 업데이트했을 수도 있습니까?).

나는 그것이 관련이 생각 laptop-modeacpid, 그래서 나는 그들을 막을 :

/etc/rc.d/laptop-mode stop
/etc/rc.d/acpid stop

나는 또한 편집 /etc/laptop-mode/laptop-mode.conf:

ENABLE_LAPTOP_MODE_TOOLS=0

그런 다음 편집 /etc/acpi/actions/lm_lid.sh하고 마지막 줄을 주석 처리했습니다.

# /usr/sbin/laptop_mode auto

그러나 위의 모든 기능이 작동하지 않습니다. 다음 줄이 발견되었습니다 /var/log/kernel.log(관련되지 않은 줄은 생략 됨).

Oct 23 15:29:20 localhost kernel: [18617.549098] PM: Syncing filesystems ... done.
Oct 23 15:29:20 localhost kernel: [18618.001898] PM: Preparing system for mem sleep
Oct 23 15:29:30 localhost kernel: [18618.039565] Freezing user space processes ... (elapsed 0.01 seconds) done.
Oct 23 15:29:30 localhost kernel: [18618.052596] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
Oct 23 15:29:30 localhost kernel: [18618.065999] PM: Entering mem sleep
Oct 23 15:29:30 localhost kernel: [18618.066167] Suspending console(s) (use no_console_suspend to debug)
Oct 23 15:29:30 localhost kernel: [18618.097917] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Oct 23 15:29:30 localhost kernel: [18618.098103] sd 0:0:0:0: [sda] Stopping disk
Oct 23 15:29:30 localhost kernel: [18618.270537] snd_hda_intel 0000:00:14.2: power state changed by ACPI to D3hot
Oct 23 15:29:30 localhost kernel: [18619.274374] PM: suspend of devices complete after 1196.192 msecs
Oct 23 15:29:30 localhost kernel: [18619.274691] PM: late suspend of devices complete after 0.313 msecs
Oct 23 15:29:30 localhost kernel: [18619.440877] ohci_hcd 0000:00:14.5: wake-up capability enabled by ACPI
Oct 23 15:29:30 localhost kernel: [18619.642144] ACPI: Waking up from system sleep state S3
Oct 23 15:29:30 localhost kernel: [18620.049424] PM: noirq resume of devices complete after 333.503 msecs
Oct 23 15:29:30 localhost kernel: [18620.049852] PM: early resume of devices complete after 0.334 msecs
Oct 23 15:29:30 localhost kernel: [18622.418605] PM: resume of devices complete after 2371.906 msecs
Oct 23 15:29:30 localhost kernel: [18622.419018] PM: Finishing wakeup.
Oct 23 15:29:30 localhost kernel: [18622.419019] Restarting tasks ... done.
Oct 23 15:29:30 localhost kernel: [18622.464752] video LNXVIDEO:01: Restoring backlight state

나는 아무것도 기록하지 않기 pm-susend때문에 이것이 원인이 아니라고 생각합니다 /var/log/pm-suspend.log.

뚜껑을 닫을 때 랩탑이 절전 모드로 전환되는 것을 원하지 않습니다. 어떻게합니까?

커널 버전 : 3.6.2-1-ARCH



답변

편집 /etc/systemd/logind.conf하고 있는지 확인하십시오.

HandleLidSwitch=ignore

뚜껑이 닫히는 것을 무시하게됩니다. 다른 변경 사항을 취소해야 할 수도 있습니다.

그런 다음 logind.conf변경 사항을 적용하기 위해 다시로드하고 싶을 것입니다 (댓글에서 이것을 지적한 Ehtesh Choudhury에게 감사드립니다).

systemctl restart systemd-logind

archlinux Wiki 에 대한 자세한 내용 .

logind.conf 매뉴얼 페이지에도 관련 정보가 있습니다.

   HandlePowerKey=, HandleSuspendKey=, HandleHibernateKey=,
   HandleLidSwitch=
       Controls whether logind shall handle the system power and sleep
       keys and the lid switch to trigger actions such as system power-off
       or suspend. Can be one of ignore, poweroff, reboot, halt, kexec,
       suspend, hibernate, hybrid-sleep and lock. If ignore logind will
       never handle these keys. If lock all running sessions will be
       screen locked. Otherwise the specified action will be taken in the
       respective event. Only input devices with the power-switch udev tag
       will be watched for key/lid switch events.  HandlePowerKey=
       defaults to poweroff.  HandleSuspendKey= and HandleLidSwitch=
       default to suspend.  HandleHibernateKey= defaults to hibernate.

답변

이것을 사용하여 리드 스위치 이벤트를 일시적으로 비활성화 할 수 있습니다.

systemd-inhibit --what=handle-lid-switch sleep 1d