V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Arch Linux
fire1980
V2EX  ›  Arch

archlinux 如何给老笔记本设置盖盖休眠

  •  1
     
  •   fire1980 · Nov 16, 2023 · 1883 views
    This topic created in 907 days ago, the information mentioned may be changed or developed.

    archlinux 加上 xfce

    我这是一个老笔记本不是 uefi 的,设置了 swap 区

    在 power setting 界面上 配置了插电的时候 powersaving 的时候 suspended 盖上盖子后 hibernate

    但是现在盖上盖子后屏幕自动 lock 了,但是还是有背光亮着

    求解一下

    4 replies    2023-11-18 08:25:22 +08:00
    fire1980
        1
    fire1980  
    OP
       Nov 16, 2023
    设置了/etc/systemd/logind.conf
    fire1980
        2
    fire1980  
    OP
       Nov 16, 2023
    控制背光的可能是
    sys-devices-platform-dell\x2dlaptop-leds-dell::kbd_backlight.device loaded active plugged /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight
    systemd-backlight@leds:dell::kbd_backlight.service loaded active exited Load/Save Screen Backlight Brightness of leds:dell::kbd_backlight
    system-systemd\x2dbacklight.slice loaded active active Slice /system/systemd-backlight
    Tee
        3
    Tee  
       Nov 17, 2023
    acpid

    /etc/acpi/handler.sh

    button/lid

    自己增加命令

    我的场景带了 hdmi 的判断

    ```
    59 │ button/lid)
    60 │ case "$3" in
    61 │ close)
    62 │ echo none > /sys/class/drm/card*-HDMI*/status
    63 │ hdmi_active=$(cat /sys/class/drm/card*-HDMI*/status)
    64 │ if [[ $hdmi_active == "disconnected" ]]
    65 │ then
    66 │ sleep 3 && systemctl suspend
    67 │ logger 'eDP Connected'
    68 │ else
    69 │ logger 'Hdmi Connected'
    70 │ fi
    71 │ logger 'LID closed'
    72 │ ;;
    73 │ open)
    74 │ logger 'LID opened'
    75 │ ;;
    76 │ *)
    77 │ logger "ACPI action undefined: $3"
    78 │ ;;
    79 │ esac
    80 │ ;;
    ```
    fire1980
        4
    fire1980  
    OP
       Nov 18, 2023 via Android
    谢谢 查了一下好像是笔记本的 nv 显卡的问题
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3279 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 13:09 · PVG 21:09 · LAX 06:09 · JFK 09:09
    ♥ Do have faith in what you're doing.