T42: Simulation der oberen Ladeschwelle

Martin75

New member
Registriert
22 Apr. 2014
Beiträge
13
Ich habe ein Thinkpad T42 und habe es heute schon mal geschafft auf /sys/devices/platform/smapi/BAT0/start_charge_thresh zuzugreifen und einen Wert zu setzen,
Ebenso hat ein auslesen von /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes mittel cat funktioniert.

Nach einem Neustart kann ich plötzlich nicht mehr darauf zugreifen,

Nun zeigt mit ein "tlp stat" folendes an:

/sys/devices/platform/smapi/BAT0/start_charge_thresh = (not available)
/sys/devices/platform/smapi/BAT0/stop_charge_thresh = (not available)
/sys/devices/platform/smapi/BAT0/force_discharge = (not available)

ein auslesen mittels cat ergibt folgenden fehler:
cat: /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes: Kein passendes Gerät bzw. keine passende Adresse gefunden

Weis jemand wie man wieder drauf zugreifen kann ?
Ich habe bereits probiert die Module tp_smapi und thinkpad_ec zu entladen und zu laden.

Brachte aber keine Besserung
Bitte um Hilfe/Tipps
 
@Martin75: es fehlen verwertbare Infos.

1. Falls Du Support für TLP haben möchtest, dann sag bitte zuerst, was dein eigentliches Ziel ist: Ladeschwellen? Rekalibrieren? – und zeig bitte die notwendigen Ausgaben:
Code:
sudo tlp-stat -s -c -b
tlp-stat hat eine Diagnose eingebaut, spart das heitere Probleme-Raten.

Wenn die tp-smapi-Kernelmodule nicht laden, dann arbeite bitte die FAQ ab. Und zeig ggf. die Ausgabe der modprobe-Kommandos.

2. Falls Du hingegen händisch etwas spezielles an den tp-smapi Sysfiles (inhibit_charge_minutes?) tun möchtest, dann eröffne bitte einen eigenen Thread. Hier geht es nur um TLP.

Bedenke auch, dass das T42 keine obere Ladeschwelle unterstützt --> http://www.thinkwiki.org/wiki/Tp_smapi#T_series

EDITH lichtet den Nebel: https://forum.ubuntuusers.de/topic/akku-bei-thinkpad-t40-rekalibrieren/#post-8870478
 
Zuletzt bearbeitet:
Hallo, ich musste erst meine Nachricht wiederfinden, sie wurde ja in einen eigenen Thread ausgelagert.
Ja, der Titel simulation der oberen Ladeschwelle trifft es recht gut.

Das T42 wird hauptsächlich am Netz betrieben und deshalb möchte ich den Akku zwischen 40 und 60 % Ladung lassen, weil das auch der empfohlene Bereich ist in dem man den Akku lagert.

Das Netzteil hängt an einer schaltbaren Steckdosenleiste welche nur eingeschaltet wird, wenn der Laptop benutzt wird, deswegen ist es nicht schlimm wenn die Ladegrenze im ausgeschaltenen Zustand nicht funktioniert.

Ausbauen möchte ich den Akku aber auch nicht, weil man will vielleicht doch mal in einen anderen Raum gehen ohne dass der Laptop ausgeht,

Hier die Ausgabe von "sudo tlp-stat -s -c -b"

Code:
martin@T42:~$ sudo tlp-stat -s -c -b
[sudo] Passwort für martin: 
--- TLP 0.8 --------------------------------------------

+++ Configured Settings: /etc/default/tlp
TLP_ENABLE=1
TLP_DEFAULT_MODE=AC
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=2
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1
NMI_WATCHDOG=0
ENERGY_PERF_POLICY_ON_AC=performance
ENERGY_PERF_POLICY_ON_BAT=powersave
DISK_DEVICES="sda sdb"
DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="128 128"
SATA_LINKPWR_ON_AC=max_performance
SATA_LINKPWR_ON_BAT=min_power
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave
RADEON_POWER_PROFILE_ON_AC=high
RADEON_POWER_PROFILE_ON_BAT=low
RADEON_DPM_STATE_ON_AC=performance
RADEON_DPM_STATE_ON_BAT=battery
RADEON_DPM_PERF_LEVEL_ON_AC=auto
RADEON_DPM_PERF_LEVEL_ON_BAT=auto
WIFI_PWR_ON_AC=1
WIFI_PWR_ON_BAT=5
WOL_DISABLE=Y
SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=1
SOUND_POWER_SAVE_CONTROLLER=Y
BAY_POWEROFF_ON_BAT=0
BAY_DEVICE="sr0"
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto
RUNTIME_PM_ALL=1
RUNTIME_PM_DRIVER_BLACKLIST="radeon nouveau"
USB_AUTOSUSPEND=1
USB_BLACKLIST_WWAN=1
RESTORE_DEVICE_STATE_ON_STARTUP=0

+++ System Info
System         = IBM ThinkPad T42 2373W5N
BIOS           = 1RETDHWW (3.13 )
Release        = Ubuntu 16.04.2 LTS
Kernel         = 4.10.0-27-generic #30~16.04.2-Ubuntu SMP Thu Jun 29 16:09:18 UTC 2017 i686
/proc/cmdline  = BOOT_IMAGE=/boot/vmlinuz-4.10.0-27-generic root=UUID=9be7a15d-3f61-44c5-b2d5-3a016a20702a ro forcepae quiet splash vt.handoff=7
Init system    = systemd

+++ System Status
TLP power save = enabled
power source   = battery

+++ ThinkPad Extended Battery Functions
tp-smapi   = active
tpacpi-bat = inactive (unsupported hardware)

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/devices/platform/smapi/BAT0/manufacturer               = SANYO
/sys/devices/platform/smapi/BAT0/model                      = IBM-92P1087
/sys/devices/platform/smapi/BAT0/manufacture_date           = 2006-11-23
/sys/devices/platform/smapi/BAT0/first_use_date             = 2007-09-05
/sys/devices/platform/smapi/BAT0/cycle_count                =    184
/sys/devices/platform/smapi/BAT0/design_capacity            =  51840 [mWh]
/sys/devices/platform/smapi/BAT0/last_full_capacity         =  37850 [mWh]
/sys/devices/platform/smapi/BAT0/remaining_capacity         =  23520 [mWh]
/sys/devices/platform/smapi/BAT0/remaining_percent          =     63 [%]
/sys/devices/platform/smapi/BAT0/remaining_running_time_now =     85 [min]
/sys/devices/platform/smapi/BAT0/remaining_charging_time    = not_charging [min]
/sys/devices/platform/smapi/BAT0/power_now                  = -15386 [mW]
/sys/devices/platform/smapi/BAT0/power_avg                  = -14592 [mW]
/sys/devices/platform/smapi/BAT0/state                      = discharging

/sys/devices/platform/smapi/BAT0/start_charge_thresh        = (not available) 
/sys/devices/platform/smapi/BAT0/stop_charge_thresh         = (not available) 
/sys/devices/platform/smapi/BAT0/force_discharge            = (not available)

martin@T42:~$

Ich benutzt Lubuntu 16.04.02 LTS und habe dieses Paket nachinstalliert:
tp-smapi-dkms_0.42-1_all.deb
(so wie es im tp_smapi - Wiki seht)

Und ich konnte gestern mit
Code:
sudo sh -c "echo 75 > /sys/devices/platform/smapi/BAT0/start_charge_thresh"

die untere Ladeschwelle setzen und auch mit cat wieder auslesen.
Ebenso konnte ich "inhibit_charge_minutes" setzen und wieder auslesen.

Nun passpiert folgendes:
Code:
martin@T42:~$ cat /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes 
cat: /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes: Kein passendes Gerät bzw. keine passende Adresse gefunden

- - - Beitrag zusammengeführt - - -

was vielleicht noch hilfreich sein könnte:
Code:
dmesg | grep thinkpad_ec 
[  292.919851] thinkpad_ec: loading out-of-tree module taints kernel.
[  292.919937] thinkpad_ec: module verification failed: signature and/or required key missing - tainting kernel
[  292.941044] thinkpad_ec: thinkpad_ec 0.42 loaded.

- - - Beitrag zusammengeführt - - -

Kann jemand die Ausgabe von:
Code:
grep '.*' /sys/devices/platform/smapi/BAT0/*
auf einem Thinkpad t42 unter (L)(X)Ubuntu posten ?

Code:
 /sys/devices/platform/smapi/BAT0/barcoding:1ZA7K6BP121
/sys/devices/platform/smapi/BAT0/charging_max_current:2800
/sys/devices/platform/smapi/BAT0/charging_max_voltage:12600
/sys/devices/platform/smapi/BAT0/chemistry:LION
/sys/devices/platform/smapi/BAT0/current_avg:0
/sys/devices/platform/smapi/BAT0/current_now:0
/sys/devices/platform/smapi/BAT0/cycle_count:185
/sys/devices/platform/smapi/BAT0/design_capacity:51840
/sys/devices/platform/smapi/BAT0/design_voltage:10800
/sys/devices/platform/smapi/BAT0/dump:c0 80 01 00 80 00 00 00 00 00 00 00 00 00 00 00 
/sys/devices/platform/smapi/BAT0/dump:c0 c0 00 80 cd 0b d9 2f 00 00 00 00 58 00 f0 0c 
/sys/devices/platform/smapi/BAT0/dump:c0 c0 c9 0e ff ff ff ff ff ff c0 00 b9 00 -- 00 
/sys/devices/platform/smapi/BAT0/dump:c0 c0 40 14 30 2a 31 00 77 35 59 05 -- -- -- 00 
/sys/devices/platform/smapi/BAT0/dump:c0 c0 53 41 4e 59 4f 00 00 00 00 00 00 00 00 00 
/sys/devices/platform/smapi/BAT0/dump:c0 c0 49 42 4d 2d 39 32 50 31 30 38 37 00 00 00 
/sys/devices/platform/smapi/BAT0/dump:c0 c0 4c 49 4f 4e 00 17 44 01 00 00 00 00 00 00 
/sys/devices/platform/smapi/BAT0/dump:c0 c0 31 5a 41 37 4b 36 42 50 31 32 31 00 00 00 
/sys/devices/platform/smapi/BAT0/dump:c0 c0 25 37 -- -- -- -- -- -- -- -- -- -- -- 00 
/sys/devices/platform/smapi/BAT0/dump:c0 c0 18 00 15 00 f0 0a 38 31 -- -- -- -- -- 00 
/sys/devices/platform/smapi/BAT0/dump:c0 c0 42 17 44 01 00 00 f6 0f eb 0f f8 0f 00 00 
/sys/devices/platform/smapi/BAT0/first_use_date:2007-09-05
grep: /sys/devices/platform/smapi/BAT0/force_discharge: Kein passendes Gerät bzw. keine passende Adresse gefunden
/sys/devices/platform/smapi/BAT0/group0_voltage:4088
/sys/devices/platform/smapi/BAT0/group1_voltage:4075
/sys/devices/platform/smapi/BAT0/group2_voltage:4086
/sys/devices/platform/smapi/BAT0/group3_voltage:0
grep: /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes: Kein passendes Gerät bzw. keine passende Adresse gefunden
/sys/devices/platform/smapi/BAT0/installed:1
/sys/devices/platform/smapi/BAT0/last_full_capacity:37850
/sys/devices/platform/smapi/BAT0/manufacture_date:2006-11-23
/sys/devices/platform/smapi/BAT0/manufacturer:SANYO
/sys/devices/platform/smapi/BAT0/model:IBM-92P1087
/sys/devices/platform/smapi/BAT0/power_avg:0
/sys/devices/platform/smapi/BAT0/power_now:0
/sys/devices/platform/smapi/BAT0/remaining_capacity:33120
/sys/devices/platform/smapi/BAT0/remaining_charging_time:not_charging
/sys/devices/platform/smapi/BAT0/remaining_percent:88
/sys/devices/platform/smapi/BAT0/remaining_percent_error:21
/sys/devices/platform/smapi/BAT0/remaining_running_time:not_discharging
/sys/devices/platform/smapi/BAT0/remaining_running_time_now:not_discharging
/sys/devices/platform/smapi/BAT0/serial:1369
grep: /sys/devices/platform/smapi/BAT0/start_charge_thresh: Kein passendes Gerät bzw. keine passende Adresse gefunden
/sys/devices/platform/smapi/BAT0/state:idle
grep: /sys/devices/platform/smapi/BAT0/stop_charge_thresh: Kein passendes Gerät bzw. keine passende Adresse gefunden
/sys/devices/platform/smapi/BAT0/temperature:29000
/sys/devices/platform/smapi/BAT0/voltage:12249

Würde ich gerne vergleichen, Danke
 
Zuletzt bearbeitet:
In deiner PN bei uu.de hast Du geschrieben, dass der Zugriff auf die beschreibbaren Files in smapi/BAT0 nur sporadisch funktioniert.

Das könnte ein Softwarebug sein, entweder in der EC Firmware oder in tp-smapi. Vielleicht eine Race Condition (Zeitabhängigkeit) im Zusammenspiel der beiden.

Weder für die EC Firmware noch für tp-smapi wirst Du Fixes oder Support für dein altes Schätzchen bekommen. Du kannst natürlich prüfen, ob das BIOS samt EC Firmware auf dem allerletzten Stand ist.

ps. Quellcode ist übrigens hier zu finden falls Du Kernel-Debugging und -programmierung beherrschst. Spar dir bitte den Versuch dort ein Issue für dein Problem zu eröffnen. Evgeni nimmt allerdings durchaus Pull Requests zur Fehlerbehebung entgegen.
 
Zuletzt bearbeitet:
Danke für die Info, das bestätigt meine Vermutung..

Ich habe heute mal die LiveCD von Ubuntu 10.04 gestartet und danach tp-smapi-dkms von dieser Seite nachinstalliert:
https://launchpad.net/ubuntu/lucid/i386/tp-smapi-dkms/0.40-7


Hier hat das auslesen und schreiben sofort geklappt.


Nun Frage ich mich ob der "Fehler" daran liegt dass 16.04 einen neuen Kernel verwendet, oder
an der neuen Version von tp-smapi-dkms (0.41-1)

Bei 16.04 funktioniert ja das Paket aus den Paketquellen (0.41-1) nicht und man muss das von 16.10 (0.42-1) benutzen.

(Ich glaube du betreibt auch ein PPA wo ein backport für 16.04 dabei ist ?, Das könnte ich auch noch testen)
Kannst du mir genauere Infos darüber geben ?


Aktuell lade ich grade Ubuntu 14.04 herunter und teste das anschließend.

PS: Muss ich beim installierten des tp-smapi-dkms pakets auf die Architektur achten ?
Bei manchen steht "all" dabei, bei machen "amd64", ich habe jedoch eine i386 Version von ubuntu
 
Der Inhalt des Pakets im PPA entspricht dem in 16.10. DKMS-Pakete sind eigentlich immer _all, da nichts binäres enthalten ist.
 
Danke für die Info...

ich habe nun Ubuntu 16.04 (Lubuntu), 14.04.1 (Ubuntu), 12.04.1 (Ubuntu) ausprobiert... überall wird tp-smapi in version 0.41-1 oder höher benötigt.
Und bei keinem funktioniert der schreib/lesezugriff vernünftig..

Geschafft habe ich es nur ein paar mal bei Lubuntu 16.04 , bei etwa 1 von 20 oder mehr Versuchen.

Bei Ubuntu 10.04 ist Kernel 2.6 und tp-smapi-dkms in version 0.40-7 vorhanden.. und damit klappt es auf anhieb.

Hier nochmal die Ausgabe von:
grep '.*' /sys/devices/platform/smapi/BAT0/*

Code:
/sys/devices/platform/smapi/BAT0/barcoding:1ZA7K6BP121
/sys/devices/platform/smapi/BAT0/charging_max_current:2800
/sys/devices/platform/smapi/BAT0/charging_max_voltage:12600
/sys/devices/platform/smapi/BAT0/chemistry:LION
/sys/devices/platform/smapi/BAT0/current_avg:124
/sys/devices/platform/smapi/BAT0/current_now:124
/sys/devices/platform/smapi/BAT0/cycle_count:187
/sys/devices/platform/smapi/BAT0/design_capacity:51840
/sys/devices/platform/smapi/BAT0/design_voltage:10800
/sys/devices/platform/smapi/BAT0/dump:c0 80 01 00 80 00 00 00 00 00 00 00 00 00 00 00 
/sys/devices/platform/smapi/BAT0/dump:c0 e0 00 80 b8 0b de 30 7c 00 7c 00 63 00 27 0d 
/sys/devices/platform/smapi/BAT0/dump:c0 e0 59 0d ff ff ff ff 07 00 80 00 bb 00 -- 00 
/sys/devices/platform/smapi/BAT0/dump:c0 e0 40 14 30 2a 31 00 77 35 59 05 -- -- -- 00 
/sys/devices/platform/smapi/BAT0/dump:c0 e0 53 41 4e 59 4f 00 00 00 00 00 00 00 00 00 
/sys/devices/platform/smapi/BAT0/dump:c0 e0 49 42 4d 2d 39 32 50 31 30 38 37 00 00 00 
/sys/devices/platform/smapi/BAT0/dump:c0 e0 4c 49 4f 4e 00 17 44 01 00 00 00 00 00 00 
/sys/devices/platform/smapi/BAT0/dump:c0 e0 31 5a 41 37 4b 36 42 50 31 32 31 00 00 00 
/sys/devices/platform/smapi/BAT0/dump:c0 e0 25 37 -- -- -- -- -- -- -- -- -- -- -- 00 
/sys/devices/platform/smapi/BAT0/dump:c0 e0 18 00 08 00 f0 0a 38 31 -- -- -- -- -- 00 
/sys/devices/platform/smapi/BAT0/dump:c0 e0 42 17 44 01 00 00 4c 10 45 10 4d 10 00 00 
/sys/devices/platform/smapi/BAT0/first_use_date:2007-09-05
/sys/devices/platform/smapi/BAT0/force_discharge:0
/sys/devices/platform/smapi/BAT0/group0_voltage:4173
/sys/devices/platform/smapi/BAT0/group1_voltage:4165
/sys/devices/platform/smapi/BAT0/group2_voltage:4172
/sys/devices/platform/smapi/BAT0/group3_voltage:0
/sys/devices/platform/smapi/BAT0/inhibit_charge_minutes:0
/sys/devices/platform/smapi/BAT0/installed:1
/sys/devices/platform/smapi/BAT0/last_full_capacity:34170
/sys/devices/platform/smapi/BAT0/manufacture_date:2006-11-23
/sys/devices/platform/smapi/BAT0/manufacturer:SANYO
/sys/devices/platform/smapi/BAT0/model:IBM-92P1087
/sys/devices/platform/smapi/BAT0/power_avg:1551
/sys/devices/platform/smapi/BAT0/power_now:1551
/sys/devices/platform/smapi/BAT0/remaining_capacity:33670
/sys/devices/platform/smapi/BAT0/remaining_charging_time:7
/sys/devices/platform/smapi/BAT0/remaining_percent:99
/sys/devices/platform/smapi/BAT0/remaining_percent_error:8
/sys/devices/platform/smapi/BAT0/remaining_running_time:not_discharging
/sys/devices/platform/smapi/BAT0/remaining_running_time_now:not_discharging
/sys/devices/platform/smapi/BAT0/serial:1369
/sys/devices/platform/smapi/BAT0/start_charge_thresh:96
/sys/devices/platform/smapi/BAT0/state:charging
grep: /sys/devices/platform/smapi/BAT0/stop_charge_thresh: Operation not supported
/sys/devices/platform/smapi/BAT0/temperature:26900
/sys/devices/platform/smapi/BAT0/voltage:12510

hiermit ist ein Zugriff auf:
start_charge_thresh, force_discharge und inhibit_charge_minutes lesend und schreibend möglich.

An der Stelle bin ich mit meinen Linux Kenntnissen am Ende.
Ob man die Version 040-7 auch so patchen kann dass sie auf neueren Systemen läuft ?

Bleiben wohl nur 3 Möglichkeiten:

- Bei 10.04 bleiben (veraltet)
- Lubuntu 16.04 benutzen und Akku ausbauen oder bei jedem Start 1x Windows booten um die Ladeschwellen zu setzen.
- Windows 7 benutzen

- - - Beitrag zusammengeführt - - -

PS: Bios hab ich inzwischen von 3.13 auf 3.23 geflasht.
Die verschiedenen Linux Versionen wurden mit dem Bios 3.23 getestet.
 
Zuletzt bearbeitet:
  • ok1.de
  • ok2.de
  • thinkstore24.de
  • Preiswerte-IT - Gebrauchte Lenovo Notebooks kaufen

Werbung

Zurück
Oben