[SOLVED] Closing its lid wakes the computer

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
microcord
Posts: 13
Joined: Thu May 07, 2020 8:57 am

[SOLVED] Closing its lid wakes the computer

#1 Post by microcord »

tl;dr: When, after "suspending" MX, I close the lid of my laptop, the laptop wakes up.

Longer:

I'm using MX 23.1 AHS on a new Lenovo ThinkPad E14 (5th gen) laptop. (This came with Windows 11, which I instantly overwrote with MX. With hindsight, perhaps I should have retained Windows for a few hours for elementary hardware testing.)

Code: Select all

System:
  Kernel: 6.5.0-1mx-ahs-amd64 [6.5.3-1~mx23ahs] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.5.0-1mx-ahs-amd64 root=UUID=<filter> ro quiet splash
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23.2_ahs_x64 Libretto October 15  2023 base: Debian GNU/Linux
    12 (bookworm)
Machine:
  Type: Laptop System: LENOVO product: 21JRCTO1WW v: ThinkPad E14 Gen 5
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 21JRCTO1WW v: ThinkPad serial: <superuser required> UEFI: LENOVO
    v: R2CET32W (1.14) date: 11/27/2023
Battery:
  ID-1: BAT0 charge: 48.9 Wh (100.0%) condition: 48.9/47.0 Wh (104.0%) volts: 13.1 min: 11.3
    model: COSMX LNV-5B11K63024 type: Li-poly serial: <filter> status: full cycles: 2
CPU:
  Info: model: AMD Ryzen 3 7330U with Radeon Graphics bits: 64 type: MT MCP arch: Zen 3 gen: 4
    level: v3 note: check built: 2021-22 process: TSMC n7 (7nm) family: 0x19 (25) model-id: 0x50 (80)
    stepping: 0 microcode: 0xA50000D
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache: L1: 256 KiB
    desc: d-4x32 KiB; i-4x32 KiB L2: 2 MiB desc: 4x512 KiB L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 777 high: 2340 min/max: 400/4388 scaling: driver: amd-pstate-epp
    governor: powersave cores: 1: 400 2: 400 3: 400 4: 1480 5: 400 6: 2340 7: 400 8: 400
    bogomips: 36730
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow mitigation: safe RET, no microcode
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW, STIBP: always-on, RSB
    filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Barcelo vendor: Lenovo driver: amdgpu v: kernel arch: GCN-5 code: Vega
    process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s ports: active: eDP-1 empty: DP-1,DP-2,HDMI-A-1 bus-ID: 04:00.0
    chip-ID: 1002:15e7 class-ID: 0300 temp: 40.0 C
  Device-2: Chicony Integrated Camera type: USB driver: uvcvideo bus-ID: 1-3:3 chip-ID: 04f2:b7b9
    class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X: loaded: amdgpu
    unloaded: fbdev,modesetting,vesa dri: radeonsi gpu: amdgpu display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1200 s-dpi: 96 s-size: 508x317mm (20.00x12.48") s-diag: 599mm (23.57")
  Monitor-1: eDP-1 mapped: eDP model: BOE Display 0x0a35 built: 2021 res: 1920x1200 hz: 60
    dpi: 161 gamma: 1.2 size: 302x189mm (11.89x7.44") diag: 356mm (14") ratio: 16:10 modes:
    max: 1920x1200 min: 640x480
  API: OpenGL v: 4.6 Mesa 23.1.2-1~mx23ahs renderer: AMD Radeon Graphics (renoir LLVM 15.0.6 DRM
    3.54 6.5.0-1mx-ahs-amd64) direct-render: Yes
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio vendor: Lenovo driver: snd_hda_intel v: kernel
    pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.1
    chip-ID: 1002:1637 class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo driver: snd_rn_pci_acp3x
    v: kernel alternate: snd_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x pcie: gen: 3 speed: 8 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.5 chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel v: kernel pcie:
    gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.6 chip-ID: 1022:15e3
    class-ID: 0403
  API: ALSA v: k6.5.0-1mx-ahs-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Lenovo driver: r8169
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8168
    class-ID: 0200
  IF: eth0 state: down mac: <filter>
  Device-2: Realtek vendor: Lenovo driver: rtw89_8852be v: kernel modules: wl pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: 2000 bus-ID: 03:00.0 chip-ID: 10ec:b852 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8 bus-ID: 3-4:2 chip-ID: 0bda:4853
    class-ID: e001 serial: <filter>
  Report: hciconfig ID: hci0 rfk-id: 7 state: up address: <filter>
  Info: acl-mtu: 1021:6 sco-mtu: 255:12 link-policy: rswitch hold sniff park
    link-mode: peripheral accept service-classes: rendering, capturing, object transfer, audio,
    telephony
Drives:
  Local Storage: total: 476.94 GiB used: 14.03 GiB (2.9%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital model: WD PC SN740 SDDQMQD-512G-1201
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 type: SSD
    serial: <filter> rev: 73116101 temp: 25.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 52.44 GiB size: 51.31 GiB (97.86%) used: 11.73 GiB (22.9%) fs: ext4
    dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 274 KiB (0.1%) fs: vfat
    dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 424.25 GiB size: 416.51 GiB (98.17%) used: 2.31 GiB (0.6%) fs: ext4
    dev: /dev/nvme0n1p3 maj-min: 259:3
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 4 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
  System Temperatures: cpu: 46.0 C mobo: N/A gpu: amdgpu temp: 41.0 C
  Fan Speeds (RPM): fan-1: 0 fan-2: 0
Repos:
  Packages: pm: dpkg pkgs: 2213 libs: 1146 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb https://ftp.yz.yamagata-u.ac.jp/pub/Linux/MX-Linux-Packages/mx/repo/ bookworm main non-free
    2: deb https://ftp.yz.yamagata-u.ac.jp/pub/Linux/MX-Linux-Packages/mx/repo/ bookworm ahs
Info:
  Processes: 314 Uptime: 13h 15m wakeups: 3770 Memory: 14.46 GiB used: 3.74 GiB (25.9%)
  Init: SysVinit v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0
  alt: 12 Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI
I installed MX with default or recommended options. The only choices I remember making during the installation process were of whether to have a separate home partition (yes) and how big this should be (52 GB, which I now realize is pointlessly big).

While the lid is open, Xfce's Log out | Suspend seems to work as it should. (With a computer that's often silent in normal use, it's hard to be sure. Anyway, the computer goes/remains silent and the screen goes black. Both the diodes that remain on when the computer's on -- one diode above the power button, the other on the outside of the lid -- instead pulsate.)

When I close the lid, the computer may or may not start whirring; either way, the diode on the outside of the lid doesn't pulsate but instead remains on. So I infer that closing the lid of the sleeping computer wakes it up. And leaving the computer in this state and unplugged certainly drains the battery a lot faster than I'd expect of a healthy machine.

It's been a day since I realized that I had this problem. I then had to leave the computer. Now I've returned to it, I've visited Xfce's Settings | Power Manager (for the first time). I left all its options unchanged, except that in "System", whether for "On battery" or "Plugged in", "When laptop lid is closed" had been set to "Switch off display"; I changed this to "Suspend". This hasn't changed anything. (And anyway I'd assumed that these options were for a system that was up and running.)

Suggestions?
Last edited by microcord on Sat Jan 27, 2024 11:34 pm, edited 1 time in total.

xaol
Posts: 311
Joined: Wed Mar 03, 2021 8:30 am

Re: Closing its lid wakes the computer

#2 Post by xaol »

does it make a difference if you check the box for "Lock screen when system is going to sleep"?

User avatar
microcord
Posts: 13
Joined: Thu May 07, 2020 8:57 am

Re: Closing its lid wakes the computer

#3 Post by microcord »

xaol, do you mean in Xfce's Settings | Power Manager? I don't see any such choice there. The closest I do see is under Settings | Power Manager | General: "When sleep button is pressed". This had been set to "Do nothing". There's no option offered there for "Lock screen", but I've changed from "Do nothing" to "Suspend". However, this seems to have no effect: when I close the lid, the diode on the outside of the lid switches from pulsating to steady-on.

xaol
Posts: 311
Joined: Wed Mar 03, 2021 8:30 am

Re: Closing its lid wakes the computer

#4 Post by xaol »

i was referring to Power Manager's System tab. at the bottom of that window i have the aforementioned "Lock screen when system is going to sleep" option with a checkbox. in addition i see there are also some options in Screensaver Preferences under the Lock Screen tab.

editing to add: i don't sleep my one thinkpad often so i wanted to try it. in addition to the Power Manager checkbox, i have Enable Lock Screen and Lock Screen with System Sleep both toggled on in Screensaver Preferences' Lock Screen tab. with those all set, the screen stayed asleep after i closed it.

User avatar
microcord
Posts: 13
Joined: Thu May 07, 2020 8:57 am

Re: Closing its lid wakes the computer

#5 Post by microcord »

tl;dr Initial signs are good; I seem to be OK.

More interesting discoveries: @xaol, before reading your message, I "suspended" the system (in order to clear the computer from the table during my lunch break) and was careful not to close its lid. I pulled the power cable out from the sleeping computer -- and thereby woke it up. (So, while it was running off the battery, I logged in, suspended again, put the computer away, had lunch, brought the computer back, and plugged the power cable into it -- which woke it up again.)

Xfce's Settings | Power Manager | System "Lock screen when system is going to sleep" has remained checked all this time. (It started checked; I've never unchecked it.)

Interesting: Xfce Screensaver Preferences said "Xfce Power Manager is not configured to handle laptop lid events / Your computer may not be locked when you close the lid", with a button, "Resolve". I clicked "Resolve", and the prompt went away. (I don't know what else happened, if anything.)

Xfce's Settings | Xfce Screensaver Preferences | Lock Screen shows both "Enable Lock Screen" and "Lock Screen with System Sleep" on.

I suspended the system, checked that the diodes were pulsating, closed the lid, checked that the diode on the outside was still pulsating (good!), unplugged the power cable (no change to the external diode), plugged it back in (same again) -- all good so far. And I opened the lid, and I got the log-in screen (good!). So the computer slept when I wanted it to, didn't wake when I didn't want it to, and woke when I did want it to. All good!

So I think and hope that my problem is solved. Cross fingers that the fix has also fixed another, very annoying problem -- but if it hasn't, that problem will be meat for a different message thread.

Many thanks, xaol!

xaol
Posts: 311
Joined: Wed Mar 03, 2021 8:30 am

Re: [SOLVED] Closing its lid wakes the computer

#6 Post by xaol »

you are quite welcome. i hope that continues working for you :)

Post Reply

Return to “MX Help”