suspend battery drain

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
Jerry3904
Administrator
Posts: 23238
Joined: Wed Jul 19, 2006 6:13 am

suspend battery drain

#1 Post by Jerry3904 »

This is the start of a thread that I will populate as I get time. Basic problem: on a brand new development laptop I'm seeing 8-12% power loss per hour when the machine is suspended on battery. That's on the standard 6.5 kernel, and when I dropped to the 6.3 the rate reduced to 6%/hr in the one test I have run so far. Only a minimum loss when powered off of 1-2% over a 12h period.

The battery itself does not seem to be the culprit

Code: Select all

$ inxi -B
Battery:
  ID-1: BAT0 charge: 38.1 Wh (59.2%) condition: 64.4/65.3 Wh (98.6%)
    volts: 11.8 min: 11.6
I am wondering about whether light-locker may be involved, but have not pursued that yet. The suppliers have said that they have no trouble with Ubuntu on the 6.2 kernel, but don't know if that is relevant. For now, here is the machine; I'll be back this afternoon:

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.32.0 Distro: MX-23.1_ahs_x64 Libretto October 15  2023 base: Debian GNU/Linux
    12 (bookworm)
Machine:
  Type: Laptop System: Star Labs product: StarBook v: N/A serial: <superuser required> Chassis:
    type: 9 serial: <superuser required>
  Mobo: Star Labs model: StarBook v: V2.1 serial: <superuser required> UEFI: American Megatrends
    LLC. v: 1.00 date: 09/22/2023
Battery:
  ID-1: BAT0 charge: 36.1 Wh (56.4%) condition: 64.0/65.3 Wh (98.0%) volts: 11.6 min: 11.6
    model: Intel SR 1 SR Real Battery type: Unknown serial: <filter> status: discharging
CPU:
  Info: model: 13th Gen Intel Core i7-1360P bits: 64 type: MST AMCP arch: Raptor Lake level: v3
    note: check built: 2022+ process: Intel 7 (10nm) family: 6 model-id: 0xBA (186) stepping: 2
    microcode: 0x4119
  Topology: cpus: 1x cores: 12 mt: 4 tpc: 2 st: 8 threads: 16 smt: enabled cache: L1: 1.1 MiB
    desc: d-8x32 KiB, 4x48 KiB; i-4x32 KiB, 8x64 KiB L2: 9 MiB desc: 4x1.2 MiB, 2x2 MiB L3: 18 MiB
    desc: 1x18 MiB
  Speed (MHz): avg: 655 high: 1154 min/max: 400/5000:3700 scaling: driver: intel_pstate
    governor: powersave cores: 1: 529 2: 1124 3: 964 4: 810 5: 959 6: 400 7: 1154 8: 400 9: 790
    10: 400 11: 954 12: 400 13: 400 14: 400 15: 400 16: 400 bogomips: 83558
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  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 status: Not affected
  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: Enhanced / Automatic IBRS, IBPB: conditional, RSB filling,
    PBRSB-eIBRS: SW sequence
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Raptor Lake-P [Iris Xe Graphics] vendor: IP3 Tech driver: i915 v: kernel
    arch: Gen-13 process: Intel 7 (10nm) built: 2022+ ports: active: eDP-1 empty: DP-1, DP-2,
    HDMI-A-1, HDMI-A-2, HDMI-A-3 bus-ID: 00:02.0 chip-ID: 8086:a7a0 class-ID: 0300
  Device-2: Microdia USB 2.0 Camera type: USB driver: uvcvideo bus-ID: 1-5:3 chip-ID: 0c45:636b
    class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22") s-diag: 582mm (22.93")
  Monitor-1: eDP-1 model: ChiMei InnoLux 0x14f2 built: 2018 res: 1920x1080 hz: 60 dpi: 158
    gamma: 1.2 size: 309x173mm (12.17x6.81") diag: 354mm (13.9") ratio: 16:9 modes: 1920x1080
  API: OpenGL v: 4.6 Mesa 23.1.2-1~mx23ahs renderer: Mesa Intel Graphics (RPL-P)
    direct-render: Yes
Audio:
  Device-1: Intel vendor: IP3 Tech driver: snd_hda_intel v: kernel alternate: snd_sof_pci_intel_tgl
    bus-ID: 00:1f.3 chip-ID: 8086:51ca class-ID: 0401
  API: ALSA v: k6.5.0-1mx-ahs-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 0.3.65 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: Intel Wi-Fi 6 AX210/AX211/AX411 160MHz driver: iwlwifi v: kernel modules: wl pcie:
    gen: 2 speed: 5 GT/s lanes: 1 bus-ID: 2c:00.0 chip-ID: 8086:2725 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX210 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-10:7 chip-ID: 8087:0032
    class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 1 state: down bt-service: N/A rfk-block: hardware: no
    software: no address: <filter>
  Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff link-mode: peripheral accept
Drives:
  Local Storage: total: 465.76 GiB used: 91.29 GiB (19.6%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 model: Star Drive PCIe SSD size: 465.76 GiB block-size:
    physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 type: SSD serial: <filter> rev: EIFM31.6
    temp: 35.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 73.24 GiB size: 71.54 GiB (97.68%) used: 14.37 GiB (20.1%) 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: 195.31 GiB size: 191.19 GiB (97.89%) used: 76.92 GiB (40.2%) 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: 43.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: pm: dpkg pkgs: 2182 libs: 1112 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 http://mxrepo.com/mx/repo/ bookworm main non-free
    2: deb http://mxrepo.com/mx/repo/ bookworm ahs
  Active apt repos in: /etc/apt/sources.list.d/slack.list
    1: deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main
  Active apt repos in: /etc/apt/sources.list.d/vivaldi.list
    1: deb [arch=amd64] https://repo.vivaldi.com/stable/deb/ stable main
Info:
  Processes: 349 Uptime: 16m wakeups: 2 Memory: 15.34 GiB used: 2.33 GiB (15.2%) 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
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

Charlie Brown

Re: suspend battery drain

#2 Post by Charlie Brown »

Maybe you also try (at least just to compare) with Liquorix 6.5 .

User avatar
dolphin_oracle
Developer
Posts: 22306
Joined: Sun Dec 16, 2007 12:17 pm

Re: suspend battery drain

#3 Post by dolphin_oracle »

unless they modified the installation image, light-locker shouldnt' be installed.

maybe check into tlp and tlp's settings.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

Charlie Brown

Re: suspend battery drain

#4 Post by Charlie Brown »

Yes, no light-locker on 23, there's the xfce4-screensaver ootb.

I, too would say tlp but then asked myself why is it better with 6.3, same settings, both tlp and the locker whichever it is ..

User avatar
Redacted
Posts: 294
Joined: Sat Apr 29, 2017 6:53 am

Re: suspend battery drain

#5 Post by Redacted »

dolphin_oracle wrote: Tue Oct 31, 2023 10:03 am unless they modified the installation image, light-locker shouldnt' be installed.
On my very close Starbook machine (6 cores instead of 12), light-locker was not pre-installed by Starlabs.
FWIW, instead of shutting down, I'll leave it on suspend tonight to see what happens.

User avatar
Jerry3904
Administrator
Posts: 23238
Joined: Wed Jul 19, 2006 6:13 am

Re: suspend battery drain

#6 Post by Jerry3904 »

--light-locker is installed by default and since there are reports of problems at times I wondered if I should remove it. xfce4-screensaver is there.

--looked at tlp using the handy tlpgui but wasn't exactly sure what was important...

--Found this a couple of places on the web, is it still valid? Mine does have s2idle as default:
I had discovered that the Linux Kernel post 5.4 defaults suspend to a hardware agnostic software suspend implementation called s2idle. This is guaranteed to work on all systems, but has the worst power efficiency. The default for devices used to be deep.

To see if your device can support deep suspend state run this command
cat /sys/power/mem_sleep

# Example output
[s2idle] deep
If you see that the selected default is s2idle, you need to add a kernel boot parameter to change the default back to deep.

You need to add this option

mem_sleep_default=deep
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
Jerry3904
Administrator
Posts: 23238
Joined: Wed Jul 19, 2006 6:13 am

Re: suspend battery drain

#7 Post by Jerry3904 »

@Redacted That would be helpful, thanks.
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

Charlie Brown

Re: suspend battery drain

#8 Post by Charlie Brown »

Yep.

But before applying the boot parameter, you can test temporarily (and immediately) for this session:

Code: Select all

su

Code: Select all

echo deep > /sys/power/mem_sleep
Now check it again as you did then test the suspend :)


In the meantime it seems light-locker was added to 23.1 iso , cause it wasn't there on 23, the initial release ...

User avatar
dolphin_oracle
Developer
Posts: 22306
Joined: Sun Dec 16, 2007 12:17 pm

Re: suspend battery drain

#9 Post by dolphin_oracle »

if light-locker is installed you should remove it.

looking at the build-iso package lists, it shouldn't be on our isos. going to check...
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

Charlie Brown

Re: suspend battery drain

#10 Post by Charlie Brown »

Till then: It's listed on Distrowatch's page:

• light-locker 1.8.0-3

Post Reply

Return to “MX Help”