Site Tools


batterie:maintenance_sous_linux


Previous revision
batterie:maintenance_sous_linux [2023/05/19 09:10] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Batterie: maintenance sous Linux ======
 +
 +Mots-clés: batterie, li-ion, image iso, grub, menu de grub, liens symboliques, périphérique virtuel (loop device)...
 +
 +Cette section s'appuie sur les mêmes procédures que l'article Icaunux [[http://icaunux.org/doku.php?id=bios_upgrade_avec_grub|BIOS Upgrade avec Grub]]
 +
 +Il s'agit de récupérer des fichiers IMA ou ISO contenant les programmes voulus, puis de les ajouter dans le répertoire boot, enfin de modifier Grub.
 +
 +===== Utilité: rénover ! =====
 +
 +==== Sous windows et un Thinkpad IBM ====
 +
 +Un programme existe chez IBM/Lenovo qui permet de "rénover" une batterie en la déchargeant,
 + puis en la rechargeant plusieurs fois.
 +
 +Le PC ne doit pas être utilisé; le processus est assez long,
 + mais on peut récupérer de 10 à 20 % de la capacité de la batterie selon son état au moment de l'opération.
 +
 +Le programme (en exe pour windows) est disponible pour les portables IBM /Lenovo, sur le site d'IBM.
 + Il  peut être utilisé moyennant quelques manipulations sous linux !
 +
 +Si une image ISO existe, la préférer.
 +
 +==== Critiques de ce programme ====
 +
 +[[http://www.thinkwiki.org/wiki/Maintenance#Battery_health|Battery_health]]
 +
 +This will do nothing to improve the performance of a dying battery.
 + It **serves only to recalibrate the battery charge controller**.
 + The "Battery Rundown" function of IBMs "PC Doctor for DOS" has no intelligence.
 +
 + It merely runs a series of dumb operations to consume battery power, 
 +and it cannot detect whether a battery is present or not.
 +
 + If you leave the mains connected while running "Battery Rundown", it will have no effect,
 + as the battery will simply keep charging. 
 +
 +====== Info sur cycles de charge sous linux ======
 +https://www.thinkwiki.org/wiki/Tp_smapi#Installation_on_Debian_and_Ubuntu
 +
 +Tp_smapi ok pour pc anciens.
 +
 +If you are installing on a recent Thinkpad that has an Ivy Bridge or newer processor (X230, T430, T530, etc.), tp_smapi will not work. You will be mostly limited to thinkpad-acpi capabilities. You can however set battery charge thresholds with tpacpi-bat. 
 +
 +Donc pas d'infos sur les cycles de charge... 
 +
 +
 +The tp_smapi module, if installed, will report the number of charge cycles the battery has 
 +had since it was manufactured. 
 +
 +If that number is high, the battery's poor performance is almost certainly due to its age
 +
 +
 +
 +====== Procédures ======
 +
 +Rénover sa batterie de lenovo depuis linux
 +[[http://www.thinkwiki.org/wiki/Maintenance#Reviving_batteries]Maintenance#Reviving_batteries|Reviving_batteries]]
 +
 +====== Avec un exe ======
 +===== Utiliser wine =====
 +
 +Lancer l'exe avec wine. Cet exe est en fait un fichier compressé.
 +
 +L'exécuter va le décompresser avec wine. La décompression s' effectue où l'on veut.
 +
 +===== Monter l'ISO comme périphérique virtuel =====
 +
 +==== loop device ====
 +
 +[[http://lists.debian.org/debian-l10n-french/2001/11/msg00038.html|debian-l10n-french_Traduction_loop-device]]
 +
 +
 +Thomas a écrit:  "Mon point de vue sur la traduction de "loop device" serait périphérique
 +virtuel. Il existe la possibilité de monter un système de fichier
 +complet à partir d'une image ISO par la commande mount -o loop votre
 +fichier /mnt/iso"
 +
 +"Car même si on connait l'interface réseau lo pour le loopback
 +réseau, le rajout de réseau me semble abusif sauf si le contexte est
 +clairement orienté réseau. Sinon, il faudra prendre périphérique
 +virtuel".
 +
 +
 +   mount -o loop 1ety48ww.iso /mnt/floppy 
 +
 +===== Copier & extraire l'ISO dans floppy =====
 +
 +Copier et extraire ensuite l' iso dans le rép floppy ( le créer s'il n'existe pas) puis le monter.
 +
 +<note>Vérifier cette partie du tutoriel car la commande de copie de l' ISO dans le floppy n'est pas présente !!</note>
 +On devrait avoir :
 +
 +  cp 1ety48ww.iso /mnt/floppy
 +
 +puis 
 +
 +  cd /mnt/floppy 
 +
 +Ensuite copier le **fichier IMA** de cette iso dans le rép boot.
 +
 +  cp 1ety48ww.IMA /boot 
 +
 +Il faudra ensuite modifier grub2 pour y ajouter une entrée supplémentaire dans le menu.
 +ce qui permettra de temps à autre de lancer cet utilitaire au démarrage.
 +
 +Ci-dessous, la méthode plus simple si on dispose d'une ISO.
 +
 +Puis suite de la prodédure, valable dans les deux cas de figure au paragraphe: "Créez l'entrée de boot dans Grub2"
 +
 +====== Méthode avec une ISO ======
 +
 +===== Copiez l'iso dans le répertoire boot =====
 +
 +<file>
 +sudo su -
 +cd /boot
 +cp /home/youruser/Downloads/1ety48ww.iso
 +</file>
 +
 +===== Créez un lien symbolique =====
 +
 +==== Lien symbolique ====
 +
 +symlink en anglais.
 +
 +Le lien symbolique permet d'attribuer un autre chemin d'accès à un fichier en pointant sur un nom de fichier. 
 +
 +[[http://doc.ubuntu-fr.org/lien_physique_et_symbolique?s[]=lien&s[]=symbolique#exemple_de_lien_symbolique|lien_symbolique]]
 +
 +Créez un lien symbolique, ainsi vous n' aurez plus à modifier la configuration de Grub lors des prochains upgrades.
 +
 +<file>ln -s 1ety48ww.iso maintenance-batterie.iso </file>
 +
 +
 +====== Créez l'entrée de boot dans Grub2 ======
 +
 +Vous devez connaître votre partition de boot.Elle ne se nomme par forcément (hd0,1).
 +
 +Nous avons affaire avec grub2 reconnaissable à son menu configurable en sous-sections (ex: 40_custom...)
 +
 +===== Méthode avec la commande cat =====
 +
 +Elle affiche le contenu d'un fichier. Mais la syntaxe ci-dessous telle quelle est inopérante dans Ubuntu.
 +
 +
 +<file>
 +cat >> /etc/grub.d/40_custom <<EOF
 +menuentry "Maintenance Batterie" {
 +    set root=(hd0,1)  # <-- vérifier que c'est votre partition !!
 +    linux16 /boot/memdisk iso
 +    initrd16 /boot/1ety48ww.iso.iso
 +}
 +EOF
 +</file>
 +
 +===== Méthode classique =====
 +
 +  sudo gedit /boot/grub/grub.cfg
 +
 +With grub2, one would append the following to /boot/grub/grub.cfg:
 +Ajouter ce qui suit au fichier grub.cfg
 +
 +menuentry "Maintenance Batterie" {
 +set root=(hd0,1) #should match the others in your grub.cfg
 +linux16 /boot/memdisk
 +initrd16 /boot/1ety48ww.IMA #or whatever yours is
 +}
 +
 +===== update-grub =====
 +
 +  update-grub
 +
 +===== Redémarrer =====
 +
 +===== Maintenance batterie =====
 +
 +Sélectionnez Maintenance Batterie .
 +
 +====== Information sur les batteries par buchmann.ca ======
 +
 +===== Simple Guidelines =====
 +
 +    * Charge the Li-ion often**, except before a long storage. Avoid repeated deep discharges.
 +    * Keep the Li-ion battery **cool**. Prevent storage in a hot car. Never freeze a battery.
 +    * If your laptop is capable of running without a battery and fixed power is used most of the time, remove the battery and store it in a cool place.
 +    * Avoid purchasing spare Li-ion batteries for later use.Observe manufacturing date when purchasing.Do not buy old stock, even if sold at clearance prices.
 +
 +  * Charger la batterie souvent sauf avant long remisage. eviter les décharges profondes.
 +  * Garder la batterie la plus fraîche possible. Eviter de la stocker dans une auto au soleil (comme tout appareil électronique d'ailleurs)
 +  * Ne jamais congeler une batterie (ou la mettre au grand froid)
 +  * Si votre portable peut fonctionner sans batterie et reste branché au secteur en permanence, enlever la batterie et la stocker au frais.
 +  * Evitez d'acheter d'avance.Essayez de connaître sa date de fabrication. N'achetez pas de vieux stocks, même si à prix bradé !
 +====== Information sur les batteries par lenovo ======
 +In general, rechargeable batteries store electrical energy through chemical reaction, therefore, capacity will change by temperature, unused storage period, load condition, and number of cycles used.The following instructions provides tips on how to obtain the best battery condition to extend battery rundown time: 
 +    * Once you have started charging the battery pack, do not use it until it is fully charged.
 +    * If your battery is brand new and you are charging it for the first time,your battery may not be charged to full capacity due to characteristics of chemicals in the cell. 
 +
 +To obtain maximum performance, all chemical materials in the battery must be fully activated. In order to achieve this:
 +
 +  * Cycle the battery (fully charge, then fully discharge) three times.
 +  * Cycling the battery three times is also recommended if you have stored the battery for a few months.
 +  * Do not charge the battery pack until all of its power is used.Partial charge or discharge causes a lack of uniformity of activated chemicals in the cell, and may cause performance degradation. 
 +===== Ni-MH battery =====
 +It is recommended that you deep-discharge your Ni-MH battery every few months for optimum performance. Deep-discharge occurs when your ThinkPad system is used on battery power until the charge is at 0% (the system will automatically go into hibernation). At this point, attach the AC adapter and charge to 100%.
 +
 +===== Les batteries Li-Ion (plus dans les portables)  =====
 +
 +Do not deep-discharge Lithium Ion batteries. Batteries can degrade when they are left unused for long periods of time.For some rechargeable batteries (particularly Lithium Ion batteries), leaving a battery unused in a discharged state could increase the risk of a battery short circuit, 
 +which could shorten the life of the battery and can also pose a safety hazard.Do not let rechargeable Lithium-Ion batteries completely discharge or store these batteries in a discharged state.
 +
 +====== Bibliographie ======
 +
 +Batteries in a Portable World: A Handbook on Rechargeable Batteries for Non-Engineers, Second Edition
 +Third Edition by Isidor Buchmann (Apr 11, 2011)
 +====== Liens ======
 +
 +[[http://www.thinkwiki.org/wiki/Maintenance#Reviving_batteries]Maintenance#Reviving_batteries|Reviving_batteries]]
 +
 +[[http://support.lenovo.com/en_US/detail.page?LegacyDocID=PFAN-3QNQJN|How to get the most out of your battery]]
 +
 +[[http://icaunux.org/doku.php?id=bios_upgrade_avec_grub|BIOS Upgrade avec Grub]]
 +
 +[[http://doc.ubuntu-fr.org/lien_physique_et_symbolique?s[]=lien&s[]=symbolique#exemple_de_lien_symbolique|lien_symbolique]]
 +
 +[[http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries|how_to_prolong_lithium_based_batteries]]
 +
 +[[http://batteryuniversity.com/learn/article/aftermarket_batteries_and_what_everyone_should_know|aftermarket_batteries_and_what_everyone_should_know]]
 +
 +[[http://batteryuniversity.com/learn/article/how_to_know_end_of_battery_life|how_to_know_end_of_battery_life]]
 +
 +[[http://www.buchmann.ca/Chap10-page6.asp|How to Prolong Lithium-based Batteries]]
 +
 +
 +===== =====
 +
 +{{tag>outils Batterie_maintenance_sous_linux}}