No kernel support available for natacpi for TLP for Lenovo Legion Y540

Hi All,

I need some help with setting charge thresholds for my lenovo legion Y540.
I have tried to achieve the same using TLP and TLPUI, but it won't work. Also, tlp battery stats shows No kernel support for natacpi. As far as I know, natacpi should be supported by default for kernel > 4.17. Still for 4.19 and 5.3 it says not supported.

Please find the below details of my machine:

$ inxi -Fxxxza --no-host

System:    Kernel: 5.3.12-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.3-x86_64 root=UUID=9d3c96e7-82ea-4b79-ad94-ae1745a997aa rw quiet 
           udev.log_priority=3 
           Desktop: Xfce 4.14.1 tk: Gtk 3.24.12 info: xfce4-panel wm: xfwm4 dm: LightDM 1.30.0 Distro: Manjaro Linux 
Machine:   Type: Laptop System: LENOVO product: 81SY v: Lenovo Legion Y540-15IRH-PG0 serial: <filter> Chassis: type: 10 
           v: Lenovo Legion Y540-15IRH-PG0 serial: <filter> 
           Mobo: LENOVO model: LNVNB161216 v: SDK0Q55722 WIN serial: <filter> UEFI: LENOVO v: BHCN32WW date: 08/29/2019 
Battery:   ID-1: BAT0 charge: 53.0 Wh condition: 53.0/52.5 Wh (101%) volts: 12.9/11.3 model: LGC L17L3PG1 type: Li-poly 
           serial: <filter> status: Full cycles: 23 
CPU:       Topology: Quad Core model: Intel Core i5-9300H bits: 64 type: MT MCP arch: Kaby Lake family: 6 model-id: 9E (158) 
           stepping: A (10) microcode: CA L2 cache: 8192 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 38408 
           Speed: 4061 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 4067 2: 4063 3: 4059 4: 4093 5: 4082 6: 4096 7: 4009 
           8: 4006 
           Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel UHD Graphics 630 vendor: Lenovo driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:3e9b 
           Device-2: NVIDIA vendor: Lenovo driver: nvidia v: 440.31 bus ID: 01:00.0 chip ID: 10de:1f91 
           Display: x11 server: X.Org 1.20.5 driver: modesetting,nvidia resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 1650/PCIe/SSE2 v: 4.6.0 NVIDIA 440.31 direct render: Yes 
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Lenovo driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           chip ID: 8086:a348 
           Device-2: NVIDIA vendor: Lenovo driver: snd_hda_intel v: kernel bus ID: 01:00.1 chip ID: 10de:10fa 
           Sound Server: ALSA v: k5.3.12-1-MANJARO 
Network:   Device-1: Intel Wireless-AC 9560 [Jefferson Peak] driver: iwlwifi v: kernel port: 5000 bus ID: 00:14.3 
           chip ID: 8086:a370 
           IF: wlp0s20f3 state: up mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Lenovo driver: r8169 v: kernel port: 3000 
           bus ID: 07:00.0 chip ID: 10ec:8168 
           IF: enp7s0 state: down mac: <filter> 
Drives:    Local Storage: total: 476.94 GiB used: 64.67 GiB (13.6%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB512HBJQ-000L2 size: 476.94 GiB block size: physical: 512 B 
           logical: 512 B speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 3L1QEXF7 scheme: GPT 
Partition: ID-1: / raw size: 247.23 GiB size: 242.35 GiB (98.03%) used: 41.46 GiB (17.1%) fs: ext4 dev: /dev/nvme0n1p2 
Sensors:   System Temperatures: cpu: 64.0 C mobo: N/A gpu: nvidia temp: 57 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 244 Uptime: 17m Memory: 7.66 GiB used: 1.55 GiB (20.3%) Init: systemd v: 242 Compilers: gcc: 9.2.0 
           alt: 7/8 Shell: bash v: 5.0.11 running in: xfce4-terminal inxi: 3.0.36 

$ systemctl status systemd-modules-load

● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static; vendor preset: disabled)
   Active: active (exited) since Fri 2019-12-06 10:05:32 IST; 10h left
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
 Main PID: 304 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   Memory: 0B
   CGroup: /system.slice/systemd-modules-load.service

Dec 06 10:05:31 AndroITKing-009 systemd-modules-load[304]: Inserted module 'nvidia'
Dec 06 10:05:32 AndroITKing-009 systemd-modules-load[304]: Inserted module 'nvidia_drm'
Dec 06 10:05:32 AndroITKing-009 systemd-modules-load[304]: Inserted module 'acpi_call'
Dec 06 10:05:32 AndroITKing-009 systemd-modules-load[304]: Inserted module 'crypto_user'
Dec 06 10:05:32 AndroITKing-009 systemd-modules-load[304]: Inserted module 'uinput'
Dec 06 10:05:32 AndroITKing-009 systemd[1]: Started Load Kernel Modules.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

sudo tlp-stat -b
[sudo] password for PC:
 
--- TLP 1.2.2 --------------------------------------------

+++ Battery Features: Charge Thresholds and Recalibrate
natacpi    = inactive (no kernel support)
tpacpi-bat = inactive (laptop not supported)
tp-smapi   = inactive (laptop not supported)

+++ Battery Status: BAT0
/sys/class/power_supply/BAT0/manufacturer                   = LGC
/sys/class/power_supply/BAT0/model_name                     = L17L3PG1
/sys/class/power_supply/BAT0/cycle_count                    =     23
/sys/class/power_supply/BAT0/energy_full_design             =  52500 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  53000 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  53000 [mWh]
/sys/class/power_supply/BAT0/power_now                      =      0 [mW]
/sys/class/power_supply/BAT0/status                         = Full


Charge                                                      =  100.0 [%]
Capacity                                                    =  101.0 [%]

image

Thanks in advance for your help on the same.

Thanks and Regards,
UserManjaro.

1 Like

If the thread should be in some other section, mod can move this thread to the Newbie Corner.

This seems like a pretty new system to the market, so it not likely that the older kernels will support everything yet. You can try the new 5.4 kernel. In another week or so the 5.5-rc1 should be out, though it is not generally recommended to rely on an rc (release candidate) kernel. The kernel maintainers often need more time for power management support than the more basic hardware functions.

The not supported messages literally means that the kernel does not know about this device (yet.)

1 Like

Hi,

Thank you for your reply.

I understand adding a new module to a working system, always has risk of breaking something else.
So this will take time :sweat_smile: Thank you kernel maintainers for your hard work and patience :smiley:

So basically, this should work with newer versions of the kernel, if I'm understanding it correctly. If we with the newer kernel, the natacpi support seems ok, then setting charge thresholds would be possible?

If answer is yes for both the above question, then I'll have to wait for the newer kernels, right? In the meantime, should I send a feature request for the support of natacpi and setting charge thresholds for the upcoming kernels? How to do that, can you guide me please :slight_smile:

Thanks and Have a good day ahead :relaxed:

Getting the support request to the right place is not something I've mastered. You could start at bugzilla.kernel.org. Maybe a search at the Lenovo forums might yield something. Do try kernel 5.4, first, you can always uninstall it if it doesn't help.

Thank you for the suggestion. Tried that, still doesn't work. Instead, 5.4 doesn't even load acpi_call modules :sweat_smile: So will have to revert back to the 5.3.

systemctl status systemd-modules-load
● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2019-12-10 08:23:45 IST; 10h left
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
 Main PID: 737 (code=exited, status=1/FAILURE)

Dec 10 08:23:45 AndroITKing-009 systemd[1]: Starting Load Kernel Modules...
Dec 10 08:23:45 AndroITKing-009 systemd-modules-load[737]: Failed to find module 'acpi_call'
Dec 10 08:23:45 AndroITKing-009 systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Dec 10 08:23:45 AndroITKing-009 systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
Dec 10 08:23:45 AndroITKing-009 systemd[1]: Failed to start Load Kernel Modules.
--- TLP 1.2.2 --------------------------------------------

+++ Battery Features: Charge Thresholds and Recalibrate
natacpi    = inactive (no kernel support)
tpacpi-bat = inactive (laptop not supported)
tp-smapi   = inactive (laptop not supported)

+++ Battery Status: BAT0
/sys/class/power_supply/BAT0/manufacturer                   = LGC
/sys/class/power_supply/BAT0/model_name                     = L17L3PG1
/sys/class/power_supply/BAT0/cycle_count                    =     25
/sys/class/power_supply/BAT0/energy_full_design             =  52500 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  53000 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  52480 [mWh]
/sys/class/power_supply/BAT0/power_now                      =   4434 [mW]
/sys/class/power_supply/BAT0/status                         = Charging


Charge                                                      =   99.0 [%]
Capacity                                                    =  101.0 [%]

Posted the question there, nope help regarding natacpi yet. No previous questions asked regarding the same for non-thinkpads atleast.

Let's see, how it progresses.
Thanks for your help though :slight_smile:

This topic was automatically closed after 180 days. New replies are no longer allowed.

Forum kindly sponsored by