V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Arch Linux
fire1980
V2EX  ›  Arch

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

  •  
  •   fire1980 · 163 天前 · 462 次点击
    这是一个创建于 163 天前的主题,其中的信息可能已经有所发展或是发生改变。

    archlinux 加上 xfce

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

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

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

    求解一下

    4 条回复    2023-11-18 08:25:22 +08:00
    fire1980
        1
    fire1980  
    OP
       163 天前
    设置了/etc/systemd/logind.conf
    fire1980
        2
    fire1980  
    OP
       163 天前
    控制背光的可能是
    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  
       162 天前
    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
       161 天前 via Android
    谢谢 查了一下好像是笔记本的 nv 显卡的问题
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1344 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:32 · PVG 01:32 · LAX 10:32 · JFK 13:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.