General TC > General TC Talk

battery depleted too fast with just firefox + flwm

<< < (5/5)

nick65go:
Here below is why my UEFI (badly written by HP,as usually!) is misleading linux, on my laptop.This info was from reading with
--- Code: ---tc@box:~$ dmesg
--- End code ---
ACPI BIOS Warning (bug): Optional FADT field Pm2ControlBlock has valid Length but zero Address: 0x0000000000000000/0x1 (20190816/tbfadt-615)
...
BIOS may not properly restore RDRAND after suspend, hiding RDRAND via CPUID. Use rdrand=force to reenable.
...
ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
...
acpi PNP0A03:00: _OSC: platform does not support [PME LTR] <- wrong, it does!
pci 0000:00:12.0: PME# does not work under D3, disabling it
pci 0000:00:13.0: PME# does not work under D3, disabling it
   00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 39)
   00:13.0 USB c ontroller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 39)

Trying to unpack rootfs image as initramfs..
AMD-Vi: AMD IOMMUv2 functionality not available on this system <--??

ata1.00: LPM support broken, forcing max_power
   ata1.00: ATA-9: ST1000LM024 HN-M101MBB, 2BA30001, max UDMA/133  <--Realy? should be SATA2!!
      scsi 0:0:0:0: Direct-Access     ATA      ST1000LM024 HN-M 0001 PQ: 0 ANSI: 5
      sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
      sd 0:0:0:0: [sda] 4096-byte physical blocks
   ata2.00: ATAPI: hp DVDRW  SU208GB, HH00, max UDMA/100
     scsi 1:0:0:0: CD-ROM  hp DVDRW  SU208GB   HH00 PQ: 0 ANSI: 5
     sr 1:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray

hp_wmi: query 0xd returned error 0x5

nick65go:
and here is the generic script, according to powertop:
--- Code: ---tc@box:~$ for i in `ls /sys/bus/pci/devices`; do cat /sys/bus/pci/devices/$i/power/control; done;
tc@box:~$ for i in `ls /sys/bus/pci/devices`; do echo "auto" | sudo tee /sys/bus/pci/devices/$i/power/control; done;

tc@box:~$ for i in `ls /sys/bus/i2c/devices`; do cat /sys/bus/i2c/devices/$i/device/power/control; done;
tc@box:~$ for i in `ls /sys/bus/i2c/devices`; do echo "auto" | sudo tee /sys/bus/i2c/devices/$i/device/power/control; done;

tc@box:~$ for i in `ls /sys/bus/usb/devices | grep usb`; do cat /sys/bus/usb/devices/$i/power/control; done;
tc@box:~$ for i in `ls /sys/bus/usb/devices | grep usb`; do echo "auto" | sudo tee /sys/bus/usb/devices/$i/power/control; done;

--- End code ---

nick65go:
I think now I have an optimized script. Maybe is useful for someone. you are welcome to improve it.
--- Code: ---#!/bin/sh
# lower energy consumption

echo "auto" | sudo tee /sys/block/sda/device/power/control
echo 1500 | sudo tee /proc/sys/vm/dirty_writeback_centisecs

for g in `ls /sys/module/snd*/parameters/power_save`; do echo 1 | sudo tee $g; done;
for h in `ls /sys/bus/pci/devices/*/ata*/power/control`; do echo "auto" | sudo tee $h; done;
for i in `ls /sys/bus/pci/devices/*/power/control`; do echo "auto" | sudo tee $i; done;
for j in `ls /sys/bus/i2c/devices/*/device/power/control`; do echo "auto" | sudo tee $j; done;
for k in `ls /sys/bus/usb/devices/*//power/control`; do echo "auto" | sudo tee $k; done;
for m in `ls /sys/class/scsi_host/*/link_power_management_policy`; do echo "med_power_with_dipm" | sudo tee $m; done;
--- End code ---

Navigation

[0] Message Index

[*] Previous page

Go to full version