General TC > General TC Talk

battery depleted too fast with just firefox + flwm

<< < (3/5) > >>

Juanito:
powertop added to x86 and x86_64 repos

nick65go:
@Juanito: thank you, I will try it.
@jazzbiker:
1 . "As the CPU eats more than GPU its appetite must be minimized prior to sophisticated GPU tuning, i think." Interesting, I did not think about it, because APU=cpu+gpu. I will try the "cpupower frequency-set -g powersave".
2. "Aren't You the "master" of Your Linux ?" -> No, I am the jack of all trades, master of nothing ;)
I hope my laptop (it is 5 years old) will not crash on me soon, I mean HDD, UEFI etc.The choise of grub2 parameter "pcie_aspm=force" fail me (this time). Because I run HP-UEFI diagnostic, and all were OK, but then I rebooted and in tinycore I had no sound, neither wifi devices. Maybe they were put in too deep sleep by my "pcie_aspm=force".A little upset that I distroied my laptop, I rebooted in win10. Et voila! The bloated win10 sees and uses the wifi and sound card. Sigh, I am lucky.I lost a battle, but not the war.

nick65go:
@all: I made a mistake, sorry. Sound and wifi work, even with grub2 parameter "pcie_aspm=force".The mistake was that I killed the udevd too early (from/home/tc/.X.d/*) and only then I tried to load ALSA or WIFI. Which of course add kernel modules which need to be detected etc.now testing with
--- Code: ---tc@box:~$ sudo cpupower frequency-set -g powersave
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
--- End code ---

--- Code: ---tc@box:~$ sudo cpupower frequency-info
analyzing CPU 0:
  available frequency steps:  1.80 GHz, 1.60 GHz, 1.40 GHz, 1.20 GHz, 1000 MHz
  available cpufreq governors: powersave userspace conservative ondemand performance schedutil
  current policy: frequency should be within 1000 MHz and 1.80 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: 1000 MHz (asserted by call to hardware)
--- End code ---
and playing with powertop.tcz

jazzbiker:
Hi, nick65go!

By the way, results of the governor job can be checked in

--- Code: ---cat /sys/devices/system/cpufreq/policyX/stats/time_in_state

--- End code ---

Good luck!

nick65go:
Thanks to powertop, I manage to identify and sort the things that deplete the battery. Few settings were already correctly setup, but most not. So I identified the main pieces:

--- Code: ---tc@box:~$ lspci -nn
00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1566]
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics] [1002:9851]
00:01.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Kabini HDMI/DP Audio [1002:9840]
00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:156b]
00:02.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Functions 5:1 [1022:1439]
00:02.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Functions 5:1 [1022:1439]
00:02.5 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Functions 5:1 [1022:1439]
00:08.0 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Device [1022:1537]
00:10.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller [1022:7814] (rev 11)
00:11.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7804] (rev 39)
00:12.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller [1022:7808] (rev 39)
00:13.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller [1022:7808] (rev 39)
00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:780b] (rev 42)
00:14.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller [1022:780d] (rev 02)
00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:780e] (rev 11)
00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1580]
00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1581]
00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1582]
00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1583]
00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1584]
00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1585]
01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller [10ec:8136] (rev 07)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader [10ec:5229] (rev 01)
--- End code ---

and their tree connections:
--- Code: ---tc@box:~$ lspci -tvv
-[0000:00]-+-00.0  Advanced Micro Devices, Inc. [AMD] Device 1566
           +-01.0  Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics]
           +-01.1  Advanced Micro Devices, Inc. [AMD/ATI] Kabini HDMI/DP Audio
           +-02.0  Advanced Micro Devices, Inc. [AMD] Device 156b
           +-02.2-[01]----00.0  Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter
           +-02.3-[02]----00.0  Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
           +-02.5-[03]----00.0  Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader
           +-08.0  Advanced Micro Devices, Inc. [AMD] Device 1537
           +-10.0  Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller
           +-11.0  Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode]
           +-12.0  Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller
           +-13.0  Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller
           +-14.0  Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller
           +-14.2  Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller
           +-14.3  Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge
           +-18.0  Advanced Micro Devices, Inc. [AMD] Device 1580
           +-18.1  Advanced Micro Devices, Inc. [AMD] Device 1581
           +-18.2  Advanced Micro Devices, Inc. [AMD] Device 1582
           +-18.3  Advanced Micro Devices, Inc. [AMD] Device 1583
           +-18.4  Advanced Micro Devices, Inc. [AMD] Device 1584
           \-18.5  Advanced Micro Devices, Inc. [AMD] Device 1585
tc@box:~$
--- End code ---
and then used powertop to see/swich the bad/good settings. For my peace of mind, I sorted the powertop actions to be done by connections:

--- Code: ---# 000:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1566]
echo 'auto' > '/sys/bus/pci/devices/0000:00:00.0/power/control'

#00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics] [1002:9851]
echo 'auto' > '/sys/bus/pci/devices/0000:00:01.0/power/control'

#00:01.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Kabini HDMI/DP Audio [1002:9840]
echo "HDMI/DP Audio is OK"

#00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:156b] <- APU
echo 'auto' > '/sys/bus/pci/devices/0000:00:02.0/power/control'

#00:08.0 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Device [1022:1537]
echo 'auto' > '/sys/bus/pci/devices/0000:00:08.0/power/control'

#00:10.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller [1022:7814]
echo 'auto' > '/sys/bus/pci/devices/0000:00:10.0/power/control'

#00:11.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7804]
echo 'auto' > '/sys/bus/pci/devices/0000:00:11.0/power/control'
echo 'auto' > '/sys/bus/pci/devices/0000:00:11.0/ata1/power/control'
echo 'auto' > '/sys/bus/pci/devices/0000:00:11.0/ata2/power/control'
echo 'auto' > '/sys/block/sda/device/power/control'
echo 'med_power_with_dipm' > '/sys/class/scsi_host/host0/link_power_management_policy'
echo 'med_power_with_dipm' > '/sys/class/scsi_host/host1/link_power_management_policy'

#00:12.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller [1022:7808]
echo 'auto' > '/sys/bus/pci/devices/0000:00:12.0/power/control'

#00:13.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller [1022:7808]
echo 'auto' > '/sys/bus/pci/devices/0000:00:13.0/power/control'

#00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:780b]
echo 'auto' > '/sys/bus/pci/devices/0000:00:14.0/power/control'
echo 'auto' > '/sys/bus/i2c/devices/i2c-0/device/power/control'
echo 'auto' > '/sys/bus/i2c/devices/i2c-1/device/power/control'
echo 'auto' > '/sys/bus/i2c/devices/i2c-2/device/power/control'

#00:14.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller [1022:780d]
echo 'auto' > '/sys/bus/pci/devices/0000:00:14.2/power/control'
echo '1' > '/sys/module/snd_hda_intel/parameters/power_save';

#00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:780e]
echo 'auto' > '/sys/bus/pci/devices/0000:00:14.3/power/control'

#00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1580] /1581/1582/1583/1584/1585
echo 'auto' > '/sys/bus/pci/devices/0000:00:18.0/power/control'
echo 'auto' > '/sys/bus/pci/devices/0000:00:18.1/power/control'
echo 'auto' > '/sys/bus/pci/devices/0000:00:18.2/power/control'
echo 'auto' > '/sys/bus/pci/devices/0000:00:18.3/power/control'
echo 'auto' > '/sys/bus/pci/devices/0000:00:18.4/power/control'
echo 'auto' > '/sys/bus/pci/devices/0000:00:18.5/power/control'

#01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]
echo 'auto' > '/sys/bus/pci/devices/0000:01:00.0/power/control'

#02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller [10ec:8136]
echo 'auto' > '/sys/bus/pci/devices/0000:02:00.0/power/control'

#03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader [10ec:5229]
echo 'auto' > '/sys/bus/pci/devices/0000:03:00.0/power/control'

#Runtime PM for I2C Adapter i2c-6 (Radeon i2c bit bus 0x90) / 91/92/93/94/95/96/97
echo 'auto' > '/sys/bus/i2c/devices/i2c-3/device/power/control'
echo 'auto' > '/sys/bus/i2c/devices/i2c-4/device/power/control'
echo 'auto' > '/sys/bus/i2c/devices/i2c-5/device/power/control'
echo 'auto' > '/sys/bus/i2c/devices/i2c-6/device/power/control'
echo 'auto' > '/sys/bus/i2c/devices/i2c-7/device/power/control'
echo 'auto' > '/sys/bus/i2c/devices/i2c-8/device/power/control'
echo 'auto' > '/sys/bus/i2c/devices/i2c-9/device/power/control'
echo 'auto' > '/sys/bus/i2c/devices/i2c-10/device/power/control'

# VM writeback timeout;
echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs'

#Autosuspend for USB device HP Webcam [Generic]
echo 'auto' > '/sys/bus/usb/devices/2-1.2/power/control'

#Autosuspend for USB device Bluetooth Radio  [Realtek ]
echo 'auto' > '/sys/bus/usb/devices/1-1.3/power/control'

#Autosuspend for USB device PS/2+USB Mouse [3-2]
## echo 'auto' > '/sys/bus/usb/devices/3-2/power/control'
--- End code ---

when the battery will be full charged 100% I will start testing.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version