Jump to content

Regression: Increased Power Consumption with Kernel 5.10.160


ct100

Recommended Posts

I did a lot of power consumption tests with my NanoPi R6C and noticed something strange when switching from kernel 5.10.110 to kernel 5.10.160.

 

Hardware

NanoPi R6C 4GB

32GB Sandisk High Endurance microSD Card

Ugreen 18W USB Power Supply

 

Software

Armbian 23.5.1 Nanopi-r6s bookworm

Default settings (only changing fdtfile=rockchip/rk3588s-nanopi-r6s.dtb to fdtfile=rockchip/rk3588s-nanopi-r6c.dtb in /boot/armbianEnv.txt)

Switching between legacy 5.10.160 and legacy 5.10.110 kernels with armbian-config

 

With just 1Gbit Ethernet and the power supply connected in idle (measured at wall):

 

kernel 5.10.110: 0,92W

kernel 5.10.160: 1,21W

 

I also tested different M.2 SSD, with ASPM L1 enabled/disabled, HDMI and USB devices connected/not connected. I even tried different usb power supply. In every case the power consumption with kernel 5.10.160 is higher with no apparent benefit. You could argue that it is not a big difference but when running the system from a battery it is!

 

What is causing this increased power consumption? I tried to run a lot of commands to find the difference between the 2 kernels but could not find a significant one.

 

WinDiff between the 2 kernels:

 

Spoiler

    > uname -a
 <! Linux nanopi-r6s 5.10.110-rockchip-rk3588 #23.02.2 SMP Fri Feb 17 23:59:20 UTC 2023 aarch64 GNU/Linux
 !> Linux nanopi-r6s 5.10.160-rockchip-rk3588 #1 SMP Fri May 26 08:01:48 UTC 2023 aarch64 GNU/Linux
    
    
    > lspci -vvv
    0003:30:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01) (prog-if 00 [Normal decode])
            Device tree node: /sys/firmware/devicetree/base/pcie@fe180000/pcie@30
            Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
            Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
            Latency: 0
            Interrupt: pin A routed to IRQ 108
            Bus: primary=30, secondary=31, subordinate=31, sec-latency=0
            I/O behind bridge: 1000-1fff [size=4K] [16-bit]
            Memory behind bridge: f3200000-f32fffff [size=1M] [32-bit]
            Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled] [64-bit]
            Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
            Expansion ROM at f3300000 [virtual] [disabled] [size=64K]
            BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
                    PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
            Capabilities: [40] Power Management version 3
                    Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2-,D3hot+,D3cold-)
                    Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
            Capabilities: [50] MSI: Enable+ Count=16/32 Maskable- 64bit+
                    Address: 00000000fe650040  Data: 0000
            Capabilities: [70] Express (v2) Root Port (Slot-), MSI 08
                    DevCap: MaxPayload 256 bytes, PhantFunc 0
                            ExtTag- RBE+
                    DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                            RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                            MaxPayload 128 bytes, MaxReadReq 512 bytes
                    DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                    LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L1, Exit Latency L1 <16us
                            ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
                    LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
                            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                    LnkSta: Speed 5GT/s, Width x1
                            TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt+
                    RootCap: CRSVisible+
                    RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+
                    RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                    DevCap2: Completion Timeout: Not Supported, TimeoutDis+ NROPrPrP+ LTR+
                             10BitTagComp- 10BitTagReq- OBFF Via message/WAKE#, ExtFmt+ EETLPPrefix+, MaxEETLPPrefixes 1
                             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                             FRS- LN System CLS Not Supported, TPHComp- ExtTPHComp- ARIFwd+
                             AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS-
                    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ 10BitTagReq- OBFF Disabled, ARIFwd-
                             AtomicOpsCtl: ReqEn- EgressBlck-
                    LnkCap2: Supported Link Speeds: 2.5-5GT/s, Crosslink- Retimer- 2Retimers- DRS-
                    LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
                             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                             Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                    LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
                             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                             Retimer- 2Retimers- CrosslinkRes: unsupported
            Capabilities: [b0] MSI-X: Enable- Count=128 Masked-
                    Vector table: BAR=4 offset=00020000
                    PBA: BAR=4 offset=00028000
            Capabilities: [100 v2] Advanced Error Reporting
                    UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                    CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                    CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                    AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
                            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                    HeaderLog: 00000000 00000000 00000000 00000000
                    RootCmd: CERptEn- NFERptEn- FERptEn-
                    RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd-
                             FirstFatal- NonFatalMsg- FatalMsg- IntMsg 9
                    ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000
            Capabilities: [148 v1] Secondary PCI Express
                    LnkCtl3: LnkEquIntrruptEn- PerformEqu-
                    LaneErrStat: 0
            Capabilities: [180 v1] L1 PM Substates
                    L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2- ASPM_L1.1- L1_PM_Substates-
                              PortCommonModeRestoreTime=10us PortTPowerOnTime=10us
                    L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
                               T_CommonMode=10us
                    L1SubCtl2: T_PwrOn=10us
            Capabilities: [190 v1] Vendor Specific Information: ID=0002 Rev=4 Len=100 <?>
            Kernel driver in use: pcieport
    
    0003:31:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
            Subsystem: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller
            Device tree node: /sys/firmware/devicetree/base/pcie@fe180000/pcie@30/pcie@30,0
            Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
            Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
            Latency: 0, Cache Line Size: 64 bytes
            Interrupt: pin A routed to IRQ 107
            Region 0: I/O ports at 1000 [size=256]
            Region 2: Memory at f3200000 (64-bit, non-prefetchable) [size=64K]
            Region 4: Memory at f3210000 (64-bit, non-prefetchable) [size=16K]
            Capabilities: [40] Power Management version 3
                    Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                    Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
            Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
                    Address: 0000000000000000  Data: 0000
                    Masking: 00000000  Pending: 00000000
            Capabilities: [70] Express (v2) Endpoint, MSI 01
                    DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
                            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0W
                    DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                            RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                            MaxPayload 128 bytes, MaxReadReq 4096 bytes
                    DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
                    LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 <64us
                            ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                    LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
                            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                    LnkSta: Speed 5GT/s, Width x1
                            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                    DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- LTR+
                             10BitTagComp- 10BitTagReq- OBFF Via message/WAKE#, ExtFmt- EETLPPrefix-
                             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                             FRS- TPHComp+ ExtTPHComp-
                             AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ 10BitTagReq- OBFF Disabled,
                             AtomicOpsCtl: ReqEn-
                    LnkCap2: Supported Link Speeds: 2.5-5GT/s, Crosslink- Retimer- 2Retimers- DRS-
                    LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
                             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                             Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                    LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
                             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                             Retimer- 2Retimers- CrosslinkRes: unsupported
            Capabilities: [b0] MSI-X: Enable+ Count=32 Masked-
                    Vector table: BAR=4 offset=00000000
                    PBA: BAR=4 offset=00000800
            Capabilities: [d0] Vital Product Data
    pcilib: sysfs_read_vpd: read failed: Input/output error
                    Not readable
            Capabilities: [100 v2] Advanced Error Reporting
                    UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                    UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                    CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                    CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                    AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
                            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                    HeaderLog: 00000000 00000000 00000000 00000000
            Capabilities: [148 v1] Virtual Channel
                    Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                    Arb:    Fixed- WRR32- WRR64- WRR128-
                    Ctrl:   ArbSelect=Fixed
                    Status: InProgress-
                    VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                            Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                            Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                            Status: NegoPending- InProgress-
            Capabilities: [168 v1] Device Serial Number 00-00-00-00-00-00-00-00
            Capabilities: [178 v1] Transaction Processing Hints
                    No steering table available
            Capabilities: [204 v1] Latency Tolerance Reporting
                    Max snoop latency: 0ns
                    Max no snoop latency: 0ns
            Capabilities: [20c v1] L1 PM Substates
                    L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
                              PortCommonModeRestoreTime=150us PortTPowerOnTime=150us
                    L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
                               T_CommonMode=0us LTR1.2_Threshold=0ns
                    L1SubCtl2: T_PwrOn=10us
            Capabilities: [21c v1] Vendor Specific Information: ID=0002 Rev=4 Len=100 <?>
            Kernel driver in use: r8125
            Kernel modules: pgdrv
    
    
    > lscpu
    Architecture:           aarch64
      CPU op-mode(s):       32-bit, 64-bit
      Byte Order:           Little Endian
    CPU(s):                 8
      On-line CPU(s) list:  0-7
    Vendor ID:              ARM
      Model name:           Cortex-A55
        Model:              0
        Thread(s) per core: 1
        Core(s) per socket: 4
        Socket(s):          1
        Stepping:           r2p0
        CPU(s) scaling MHz: 23%
        CPU max MHz:        1800.0000
        CPU min MHz:        408.0000
        BogoMIPS:           48.00
        Flags:              fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcp
                            op asimddp
      Model name:           Cortex-A76
        Model:              0
        Thread(s) per core: 1
        Core(s) per socket: 2
        Socket(s):          2
        Stepping:           r4p0
        CPU(s) scaling MHz: 18%
        CPU max MHz:        2304.0000
        CPU min MHz:        408.0000
        BogoMIPS:           48.00
        Flags:              fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcp
                            op asimddp
    Caches (sum of all):
      L1d:                  384 KiB (8 instances)
      L1i:                  384 KiB (8 instances)
      L2:                   2.5 MiB (8 instances)
      L3:                   3 MiB (1 instance)
    Vulnerabilities:
      Itlb multihit:        Not affected
      L1tf:                 Not affected
      Mds:                  Not affected
      Meltdown:             Not affected
 !>   Mmio stale data:      Not affected
 !>   Retbleed:             Not affected
      Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl
      Spectre v1:           Mitigation; __user pointer sanitization
      Spectre v2:           Vulnerable: Unprivileged eBPF enabled
      Srbds:                Not affected
      Tsx async abort:      Not affected
    
    
    > dmesg | grep MHz
 <! [    4.679996] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
 !> [    4.736876] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
 <! [    4.680015] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
 !> [    4.736895] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
    
    
    > lsusb
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    
    
    > cpufreq-info
    cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
    Report errors and bugs to cpufreq@vger.kernel.org, please.
    analyzing CPU 0:
      driver: cpufreq-dt
      CPUs which run at the same hardware frequency: 0 1 2 3
      CPUs which need to have their frequency coordinated by software: 0 1 2 3
      maximum transition latency: 84.0 us.
      hardware limits: 408 MHz - 1.80 GHz
      available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.61 GHz, 1.80 GHz
      available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
      current policy: frequency should be within 408 MHz and 1.80 GHz.
                      The governor "ondemand" may decide which speed to use
                      within this range.
      current CPU frequency is 408 MHz (asserted by call to hardware).
 <!   cpufreq stats: 408 MHz:89.85%, 600 MHz:0.47%, 816 MHz:0.20%, 1.01 GHz:0.09%, 1.20 GHz:0.22%, 1.42 GHz:0.14%, 1.61 GHz:0.10%, 1.80 GHz:8.94%  (425)
 !>   cpufreq stats: 408 MHz:96.17%, 600 MHz:0.38%, 816 MHz:0.12%, 1.01 GHz:0.03%, 1.20 GHz:0.06%, 1.42 GHz:0.04%, 1.61 GHz:0.03%, 1.80 GHz:3.16%  (446)
    analyzing CPU 1:
      driver: cpufreq-dt
      CPUs which run at the same hardware frequency: 0 1 2 3
      CPUs which need to have their frequency coordinated by software: 0 1 2 3
      maximum transition latency: 84.0 us.
      hardware limits: 408 MHz - 1.80 GHz
      available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.61 GHz, 1.80 GHz
      available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
      current policy: frequency should be within 408 MHz and 1.80 GHz.
                      The governor "ondemand" may decide which speed to use
                      within this range.
      current CPU frequency is 408 MHz (asserted by call to hardware).
 <!   cpufreq stats: 408 MHz:89.85%, 600 MHz:0.47%, 816 MHz:0.20%, 1.01 GHz:0.09%, 1.20 GHz:0.22%, 1.42 GHz:0.14%, 1.61 GHz:0.10%, 1.80 GHz:8.94%  (425)
 !>   cpufreq stats: 408 MHz:96.17%, 600 MHz:0.38%, 816 MHz:0.12%, 1.01 GHz:0.03%, 1.20 GHz:0.06%, 1.42 GHz:0.04%, 1.61 GHz:0.03%, 1.80 GHz:3.16%  (446)
    analyzing CPU 2:
      driver: cpufreq-dt
      CPUs which run at the same hardware frequency: 0 1 2 3
      CPUs which need to have their frequency coordinated by software: 0 1 2 3
      maximum transition latency: 84.0 us.
      hardware limits: 408 MHz - 1.80 GHz
      available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.61 GHz, 1.80 GHz
      available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
      current policy: frequency should be within 408 MHz and 1.80 GHz.
                      The governor "ondemand" may decide which speed to use
                      within this range.
      current CPU frequency is 408 MHz (asserted by call to hardware).
 <!   cpufreq stats: 408 MHz:89.85%, 600 MHz:0.47%, 816 MHz:0.20%, 1.01 GHz:0.09%, 1.20 GHz:0.22%, 1.42 GHz:0.14%, 1.61 GHz:0.10%, 1.80 GHz:8.94%  (425)
 !>   cpufreq stats: 408 MHz:96.17%, 600 MHz:0.38%, 816 MHz:0.12%, 1.01 GHz:0.03%, 1.20 GHz:0.06%, 1.42 GHz:0.04%, 1.61 GHz:0.03%, 1.80 GHz:3.16%  (446)
    analyzing CPU 3:
      driver: cpufreq-dt
      CPUs which run at the same hardware frequency: 0 1 2 3
      CPUs which need to have their frequency coordinated by software: 0 1 2 3
      maximum transition latency: 84.0 us.
      hardware limits: 408 MHz - 1.80 GHz
      available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.61 GHz, 1.80 GHz
      available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
      current policy: frequency should be within 408 MHz and 1.80 GHz.
                      The governor "ondemand" may decide which speed to use
                      within this range.
      current CPU frequency is 408 MHz (asserted by call to hardware).
 <!   cpufreq stats: 408 MHz:89.85%, 600 MHz:0.47%, 816 MHz:0.20%, 1.01 GHz:0.09%, 1.20 GHz:0.22%, 1.42 GHz:0.14%, 1.61 GHz:0.10%, 1.80 GHz:8.94%  (425)
 !>   cpufreq stats: 408 MHz:96.17%, 600 MHz:0.38%, 816 MHz:0.12%, 1.01 GHz:0.03%, 1.20 GHz:0.06%, 1.42 GHz:0.04%, 1.61 GHz:0.03%, 1.80 GHz:3.16%  (446)
    analyzing CPU 4:
      driver: cpufreq-dt
      CPUs which run at the same hardware frequency: 4 5
      CPUs which need to have their frequency coordinated by software: 4 5
      maximum transition latency: 324 us.
      hardware limits: 408 MHz - 2.26 GHz
      available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.61 GHz, 1.80 GHz, 2.02 GHz, 2.21 GHz, 2.26 GHz
      available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
      current policy: frequency should be within 408 MHz and 2.26 GHz.
                      The governor "ondemand" may decide which speed to use
                      within this range.
      current CPU frequency is 408 MHz (asserted by call to hardware).
 <!   cpufreq stats: 408 MHz:96.52%, 600 MHz:0.13%, 816 MHz:0.15%, 1.01 GHz:0.06%, 1.20 GHz:0.04%, 1.42 GHz:0.06%, 1.61 GHz:0.04%, 1.80 GHz:0.02%, 2.02 GHz:0.03%, 2.21 GHz:0.03%, 2.26 GHz:2.92%  (206)
 !>   cpufreq stats: 408 MHz:98.14%, 600 MHz:0.10%, 816 MHz:0.09%, 1.01 GHz:0.02%, 1.20 GHz:0.01%, 1.42 GHz:0.01%, 1.61 GHz:0.01%, 1.80 GHz:0.00%, 2.02 GHz:0.01%, 2.21 GHz:0.01%, 2.26 GHz:1.59%  (213)
    analyzing CPU 5:
      driver: cpufreq-dt
      CPUs which run at the same hardware frequency: 4 5
      CPUs which need to have their frequency coordinated by software: 4 5
      maximum transition latency: 324 us.
      hardware limits: 408 MHz - 2.26 GHz
      available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.61 GHz, 1.80 GHz, 2.02 GHz, 2.21 GHz, 2.26 GHz
      available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
      current policy: frequency should be within 408 MHz and 2.26 GHz.
                      The governor "ondemand" may decide which speed to use
                      within this range.
      current CPU frequency is 408 MHz (asserted by call to hardware).
 <!   cpufreq stats: 408 MHz:96.52%, 600 MHz:0.13%, 816 MHz:0.15%, 1.01 GHz:0.06%, 1.20 GHz:0.04%, 1.42 GHz:0.06%, 1.61 GHz:0.04%, 1.80 GHz:0.02%, 2.02 GHz:0.03%, 2.21 GHz:0.03%, 2.26 GHz:2.92%  (206)
 !>   cpufreq stats: 408 MHz:98.14%, 600 MHz:0.10%, 816 MHz:0.09%, 1.01 GHz:0.02%, 1.20 GHz:0.01%, 1.42 GHz:0.01%, 1.61 GHz:0.01%, 1.80 GHz:0.00%, 2.02 GHz:0.01%, 2.21 GHz:0.01%, 2.26 GHz:1.59%  (213)
    analyzing CPU 6:
      driver: cpufreq-dt
      CPUs which run at the same hardware frequency: 6 7
      CPUs which need to have their frequency coordinated by software: 6 7
      maximum transition latency: 324 us.
      hardware limits: 408 MHz - 2.30 GHz
      available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.61 GHz, 1.80 GHz, 2.02 GHz, 2.21 GHz, 2.30 GHz
      available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
      current policy: frequency should be within 408 MHz and 2.30 GHz.
                      The governor "ondemand" may decide which speed to use
                      within this range.
      current CPU frequency is 408 MHz (asserted by call to hardware).
 <!   cpufreq stats: 408 MHz:96.70%, 600 MHz:0.04%, 816 MHz:0.04%, 1.01 GHz:0.03%, 1.20 GHz:0.03%, 1.42 GHz:0.05%, 1.61 GHz:0.05%, 1.80 GHz:0.02%, 2.02 GHz:0.02%, 2.21 GHz:0.02%, 2.30 GHz:3.01%  (142)
 !>   cpufreq stats: 408 MHz:97.92%, 600 MHz:0.04%, 816 MHz:0.04%, 1.01 GHz:0.01%, 1.20 GHz:0.01%, 1.42 GHz:0.01%, 1.61 GHz:0.02%, 1.80 GHz:0.01%, 2.02 GHz:0.01%, 2.21 GHz:0.01%, 2.30 GHz:1.93%  (184)
    analyzing CPU 7:
      driver: cpufreq-dt
      CPUs which run at the same hardware frequency: 6 7
      CPUs which need to have their frequency coordinated by software: 6 7
      maximum transition latency: 324 us.
      hardware limits: 408 MHz - 2.30 GHz
      available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.61 GHz, 1.80 GHz, 2.02 GHz, 2.21 GHz, 2.30 GHz
      available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
      current policy: frequency should be within 408 MHz and 2.30 GHz.
                      The governor "ondemand" may decide which speed to use
                      within this range.
      current CPU frequency is 408 MHz (asserted by call to hardware).
 <!   cpufreq stats: 408 MHz:96.70%, 600 MHz:0.04%, 816 MHz:0.04%, 1.01 GHz:0.03%, 1.20 GHz:0.03%, 1.42 GHz:0.05%, 1.61 GHz:0.05%, 1.80 GHz:0.02%, 2.02 GHz:0.02%, 2.21 GHz:0.02%, 2.30 GHz:3.01%  (142)
 !>   cpufreq stats: 408 MHz:97.92%, 600 MHz:0.04%, 816 MHz:0.04%, 1.01 GHz:0.01%, 1.20 GHz:0.01%, 1.42 GHz:0.01%, 1.61 GHz:0.02%, 1.80 GHz:0.01%, 2.02 GHz:0.01%, 2.21 GHz:0.01%, 2.30 GHz:1.93%  (184)
    
    
    >lshw
    nanopi-r6s
        description: Computer
        product: FriendlyElec NanoPi R6C
        serial: a4544d4df4fb8ccc
        width: 64 bits
        capabilities: smp cp15_barrier setend swp tagged_addr_disabled
      *-core
           description: Motherboard
           physical id: 0
         *-cpu:0
              description: CPU
              product: cpu
              physical id: 1
              bus info: cpu@0
              size: 1800MHz
              capacity: 1800MHz
              capabilities: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp cpufreq
            *-cache
                 description: L1 Cache
                 physical id: 0
                 size: 32KiB
         *-cpu:1
              description: CPU
              product: cpu
              physical id: 2
              bus info: cpu@1
              size: 1800MHz
              capacity: 1800MHz
              capabilities: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp cpufreq
            *-cache
                 description: L1 Cache
                 physical id: 0
                 size: 32KiB
         *-cpu:2
              description: CPU
              product: cpu
              physical id: 3
              bus info: cpu@2
              size: 1800MHz
              capacity: 1800MHz
              capabilities: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp cpufreq
            *-cache
                 description: L1 Cache
                 physical id: 0
                 size: 32KiB
         *-cpu:3
              description: CPU
              product: cpu
              physical id: 4
              bus info: cpu@3
              size: 1800MHz
              capacity: 1800MHz
              capabilities: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp cpufreq
            *-cache
                 description: L1 Cache
                 physical id: 0
                 size: 32KiB
         *-cpu:4
              description: CPU
              product: cpu
              physical id: 5
              bus info: cpu@4
              size: 2256MHz
              capacity: 2256MHz
              capabilities: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp cpufreq
            *-cache
                 description: L1 Cache
                 physical id: 0
                 size: 64KiB
         *-cpu:5
              description: CPU
              product: cpu
              physical id: 6
              bus info: cpu@5
              size: 2256MHz
              capacity: 2256MHz
              capabilities: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp cpufreq
            *-cache
                 description: L1 Cache
                 physical id: 0
                 size: 64KiB
         *-cpu:6
              description: CPU
              product: cpu
              physical id: 7
              bus info: cpu@6
              size: 408MHz
              capacity: 2304MHz
              capabilities: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp cpufreq
            *-cache
                 description: L1 Cache
                 physical id: 0
                 size: 64KiB
         *-cpu:7
              description: CPU
              product: cpu
              physical id: 8
              bus info: cpu@7
              size: 408MHz
              capacity: 2304MHz
              capabilities: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp cpufreq
            *-cache
                 description: L1 Cache
                 physical id: 0
                 size: 64KiB
         *-cpu:8 DISABLED
              description: CPU
              product: cpu-map
              physical id: 9
              bus info: cpu@8
         *-cpu:9 DISABLED
              description: CPU
              product: idle-states
              physical id: a
              bus info: cpu@9
         *-cpu:10 DISABLED
              description: CPU
              product: l2-cache-b0
              physical id: b
              bus info: cpu@10
         *-cpu:11 DISABLED
              description: CPU
              product: l2-cache-b1
              physical id: c
              bus info: cpu@11
         *-cpu:12 DISABLED
              description: CPU
              product: l2-cache-b2
              physical id: d
              bus info: cpu@12
         *-cpu:13 DISABLED
              description: CPU
              product: l2-cache-b3
              physical id: e
              bus info: cpu@13
         *-cpu:14 DISABLED
              description: CPU
              product: l2-cache-l0
              physical id: f
              bus info: cpu@14
         *-cpu:15 DISABLED
              description: CPU
              product: l2-cache-l1
              physical id: 10
              bus info: cpu@15
         *-cpu:16 DISABLED
              description: CPU
              product: l2-cache-l2
              physical id: 11
              bus info: cpu@16
         *-cpu:17 DISABLED
              description: CPU
              product: l2-cache-l3
              physical id: 12
              bus info: cpu@17
         *-cpu:18 DISABLED
              description: CPU
              product: l3-cache
              physical id: 13
              bus info: cpu@18
         *-memory
              description: System memory
              physical id: 14
              size: 3735MiB
         *-pci
              description: PCI bridge
              product: RK3588
              vendor: Rockchip Electronics Co., Ltd
              physical id: 0
              bus info: pci@0003:30:00.0
              version: 01
              width: 32 bits
              clock: 33MHz
              capabilities: pci pm msi pciexpress msix normal_decode bus_master cap_list rom
              configuration: driver=pcieport
 <!           resources: irq:108 memory:f3300000-f330ffff ioport:1000(size=4096) memory:f3200000-f32fffff
 !>           resources: irq:108 memory:f3300000-f330ffff ioport:100000(size=4096) memory:f3200000-f32fffff
            *-network
                 description: Ethernet interface
                 product: RTL8125 2.5GbE Controller
                 vendor: Realtek Semiconductor Co., Ltd.
                 physical id: 0
                 bus info: pci@0003:31:00.0
                 logical name: end0
                 version: 05
 <!              serial: 86:4f:f8:96:4c:86
 !>              serial: 0e:28:b7:54:47:eb
                 capacity: 1Gbit/s
                 width: 64 bits
                 clock: 33MHz
                 capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
                 configuration: autonegotiation=on broadcast=yes driver=r8125 driverversion=9.009.00-NAPI-RSS latency=0 link=no multicast=yes port=twisted pair
 <!              resources: irq:107 ioport:1000(size=256) memory:f3200000-f320ffff memory:f3210000-f3213fff
 !>              resources: irq:107 ioport:100000(size=256) memory:f3200000-f320ffff memory:f3210000-f3213fff
      *-usbhost:0
           product: EHCI Host Controller
 <!        vendor: Linux 5.10.110-rockchip-rk3588 ehci_hcd
 !>        vendor: Linux 5.10.160-rockchip-rk3588 ehci_hcd
           physical id: 1
           bus info: usb@1
           logical name: usb1
           version: 5.10
           capabilities: usb-2.00
           configuration: driver=hub slots=1 speed=480Mbit/s
      *-usbhost:1
           product: Generic Platform OHCI controller
 <!        vendor: Linux 5.10.110-rockchip-rk3588 ohci_hcd
 !>        vendor: Linux 5.10.160-rockchip-rk3588 ohci_hcd
           physical id: 2
           bus info: usb@2
           logical name: usb2
           version: 5.10
           capabilities: usb-1.10
           configuration: driver=hub slots=1 speed=12Mbit/s
      *-usbhost:2
           product: xHCI Host Controller
 <!        vendor: Linux 5.10.110-rockchip-rk3588 xhci-hcd
 !>        vendor: Linux 5.10.160-rockchip-rk3588 xhci-hcd
           physical id: 3
           bus info: usb@3
           logical name: usb3
           version: 5.10
           capabilities: usb-2.00
           configuration: driver=hub slots=1 speed=480Mbit/s
      *-usbhost:3
           product: xHCI Host Controller
 <!        vendor: Linux 5.10.110-rockchip-rk3588 xhci-hcd
 !>        vendor: Linux 5.10.160-rockchip-rk3588 xhci-hcd
           physical id: 4
           bus info: usb@4
           logical name: usb4
           version: 5.10
           capabilities: usb-3.00
           configuration: driver=hub slots=1 speed=5000Mbit/s
      *-mmc0
           description: MMC Host
           physical id: 5
           logical name: mmc0
         *-device
              description: SD Card
              product: SH128
              vendor: SanDisk
              physical id: aaaa
              logical name: /dev/mmcblk0
              version: 8.0
              date: 06/2021
              serial: 383472537
              size: 119GiB (127GB)
              capabilities: sd gpt-1.00 partitioned partitioned:gpt
              configuration: guid=12afd0f1-68bd-0e4b-8544-a6804351225c logicalsectorsize=512 sectorsize=512
            *-volume:0 UNCLAIMED
                 description: Windows FAT volume
                 vendor: mkfs.fat
                 physical id: 1
                 version: FAT16
                 serial: a516-d842
                 size: 239MiB
                 capacity: 255MiB
                 capabilities: fat initialized
                 configuration: FATs=2 filesystem=fat label=armbi_boot name=bootfs
            *-volume:1
                 description: EXT4 volume
                 vendor: Linux
                 physical id: 2
                 logical name: /dev/mmcblk0p2
                 logical name: /
                 logical name: /var/log.hdd
                 version: 1.0
                 serial: cf07eb90-6d49-43f5-a200-f034b7a63f14
                 size: 117GiB
                 capacity: 117GiB
                 capabilities: journaled extended_attributes large_files huge_files dir_nlink recover extents ext4 ext2 initialized
 <!              configuration: created=2023-05-28 09:09:36 filesystem=ext4 label=armbi_root lastmountpoint=/ modified=2023-08-07 03:14:02 mount.fstype=ext4 mount.options=rw,noatime,errors=remount-ro,commit=600 mounted=2023-08-07 03:14:03 state=mounted
 !>              configuration: created=2023-05-28 09:09:36 filesystem=ext4 label=armbi_root lastmountpoint=/ modified=2023-08-07 03:58:01 mount.fstype=ext4 mount.options=rw,noatime,errors=remount-ro,commit=600 mounted=2023-08-07 03:58:03 state=mounted
      *-mmc2
           description: MMC Host
           physical id: 6
           logical name: mmc2
      *-sound
           description: rockchiphdmi0
           physical id: 7
           logical name: card0
           logical name: /dev/snd/controlC0
           logical name: /dev/snd/pcmC0D0p
      *-input:0
           product: fd8b0030.pwm
           physical id: 8
           logical name: input0
           logical name: /dev/input/event0
           capabilities: platform
      *-input:1
           product: rk805 pwrkey
           physical id: 9
           logical name: input1
           logical name: /dev/input/event1
           capabilities: platform
      *-input:2
           product: gpio-keys
           physical id: a
           logical name: input2
           logical name: /dev/input/event2
           capabilities: platform
      *-network
           description: Ethernet interface
           physical id: b
           logical name: end1
 <!        serial: d2:ee:7d:a0:16:d9
 !>        serial: 2a:31:1c:8f:31:23
           size: 1Gbit/s
           capacity: 1Gbit/s
           capabilities: ethernet physical tp mii 10bt-fd 100bt-fd 1000bt-fd autonegotiation
 <!        configuration: autonegotiation=on broadcast=yes driver=st_gmac driverversion=Jan_2016 duplex=full ip=192.168.1.30 link=yes multicast=yes port=twisted pair speed=1Gbit/s
 !>        configuration: autonegotiation=on broadcast=yes driver=st_gmac driverversion=Jan_2016 duplex=full ip=192.168.1.31 link=yes multicast=yes port=twisted pair speed=1Gbit/s

 

 

Edited by ct100
Link to comment
Share on other sites

M.2 NVMe flash drives are only power hogs when you buy a drive with a controller manufactured in an old process node, lots of dram cache, many inefficient flash chips with low layer count and then run them without power saving modes enabled.

 

A modern M.2 NVMe flash drive with power saving modes active (APST, ASPM L1 + L1 substates) uses less than 0,05W in idle.

 

NanoPi R6C 4GB + 32GB SanDisk mSD + Lexar NM790 2TB + Ugreen CD122 70273 18W = 0,85W idle

(1G connection via WAN-port, no HDMI/USB, SSD APST active, PCIe ASPM L1 active)

 

For 4TB drives Lexar NM790 is prob most efficient drive too and it is single sided so it can fit inside the NanoPi.

 

 

Btw. i am still wondering where the increased power consumption in kernel 5.10.160 comes from... doesnt seem to be cpu. Could it be RAM or a device that isnt used but still is active?!

 

Link to comment
Share on other sites

I think it might be related to the USB3.0 port , which does not work in 5.10.160. A fix has been submitted for that and has been accepted, so its waiting on the 170.

 

That Lexar is mighty interesting, but still a bit pricey for the 4TB. Does you 2TB fit properly or did you leave the bottom out ?

 

 

 

 

Link to comment
Share on other sites

vor 13 Stunden schrieb Dantes:

I think it might be related to the USB3.0 port , which does not work in 5.10.160. A fix has been submitted for that and has been accepted, so its waiting on the 170.

 

I don't think its the USB port. I did more tests today and what i noticed was...

 

Fresh install of "Armbian_23.5.1_Nanopi-r6s_bookworm_legacy_5.10.160_minimal" with just .dtb change started cold: 0,92W idle (same as Kernel 5.10.110)

Restarting the system instead of cold booting: 1,21W idle

 

But if i install all the updates with apt even a cold boot cannot get the system back to 0,92W idle, it stays permanently on 1,21W idle.

 

Is it possible that this is caused by the bootloader? I wonder why there is a difference between restart and cold boot with a fresh install.

 

 

vor 13 Stunden schrieb Dantes:

That Lexar is mighty interesting, but still a bit pricey for the 4TB. Does you 2TB fit properly or did you leave the bottom out ?

 

All single-sided drives without a heat sink fit inside the NanoPi and you can close the bottom. The Lexar fits. Only double-sided drives are a problem. Easy to see if you take a look at this Picture.

Link to comment
Share on other sites

6 hours ago, ct100 said:

But if i install all the updates with apt even a cold boot cannot get the system back to 0,92W idle, it stays permanently on 1,21W idle.

Did you check running services ? There might be some extra services installed after the updates.

 

6 hours ago, ct100 said:

Is it possible that this is caused by the bootloader? I wonder why there is a difference between restart and cold boot with a fresh install.

 

You could use the u-boot bootloader that comes with OpenWRT (unofficial as of yet) to verify, but that requires some tinkering. U-Boot SPL 2023.04-OpenWrt-r0-1f3cc70 (May 21 2023) that can be found here:

 

https://forum.openwrt.org/t/nanopi-r6s-linux-6-3-arm-soc-updates/153072/15

Link to comment
Share on other sites

vor 21 Stunden schrieb Dantes:

Did you check running services ? There might be some extra services installed after the updates.

 

I did check that. I also spend some time analyzing CPU frequencies and CPU core idle times with cpufrequtils and powertop. There is no difference that would explain such higher idle power consumption.

 

Whats interesting is that i managed to reproduce the same problem on kernel 5.10.110 by moving a system from micro-sd to emmc with armbian-config.

The system running from micro-sd: 0,92W idle

Same system copied and started from eMMC: 1,21W idle

(and this effect is not because the eMMC uses more power)

 

Is there a different boot loader or a different boot loader configuration for booting from emmc? Is it possible that the boot loader permanently activates an unused device?

 

Does armbian-config directly copy u-boot from micro-sd to emmc or is that downloaded from a repo?

 

Is there a difference between a cold start and a reboot with u-boot and how it configures the system?

 

 

vor 22 Stunden schrieb Dantes:

You could use the u-boot bootloader that comes with OpenWRT (unofficial as of yet) to verify, but that requires some tinkering. U-Boot SPL 2023.04-OpenWrt-r0-1f3cc70 (May 21 2023) that can be found here:

 

https://forum.openwrt.org/t/nanopi-r6s-linux-6-3-arm-soc-updates/153072/15

 

I will try that after i read more about u-boot. It would be nice to have a newer u-boot directly from armbian.

 

 

Btw. does any1 know if its possible to read out the negotiated USB PD modes with the NanoPi R6x like some Rock 5 Models can? I want to rule out any USB PD quirks.

Link to comment
Share on other sites

It seems the armbian images i was testing with had both kernel (armbian/linux-rockchip) and u-boot (radxa/u-boot) from april or may 2023.

 

I made a completely new Armbian 23.08.0-trunk image with the armbian build script that included kernel 5.10.160 and u-boot 2017.09 with the latest commits (2023-08-08).

 

With the new image booted from sd card i can reboot the system as many times as i want and install all the updates without permanently increasing the idle power consumption. It always returns to 0,92W. So my NanoPi R6C 4GB without emmc are fine now with the new image :)

 

But sadly the problem is still there when booting from emmc for the NanoPi R6C 8GB model.

 

After copying the system from sd to emmc with nand-sata-install and booting from emmc the idle power consumption is back at 1,21W. And this is not due to increased power usage from emmc vs sd. When the same NanoPi with the same armbian system is booted from sd with both sd and emmc active the idle power consumption returns to 0,92W.

Link to comment
Share on other sites

device emmc-boot sdcard-boot idle updates reboot
NanoPi r6c 4GB no-emmc n/a yes 0.92 0.92 0.92
NanoPi r6c 8GB emmc 32GB no yes 0.92 0.92 0.92
  yes no 1.21 1.21 1.21
           
           

 

Is the above correct ?

 

The difference afaict is that the OS is running from the *emmc* but  you could test if it has something to do with the boot sequence by:
 

1. Backup and checksum EMMC boot image

# dd if=/dev/mmcblk2 bs=16M count=1 > /tmp/emmc-boot.img
# sha256sum /tmp/emmc-boot.img | tee emmc-boot.img.sha256sum
# strings /tmp/emmc-boot.img | grep 'U-Boot SPL'

 

2. Backup and checksum sdcard boot image

# dd if=/dev/mmcblk0 bs=16M count=1 > /tmp/sdcard-boot.img
# sha256sum /tmp/sdcard-boot.img | tee sdcard-boot.img.sha256sum
# strings /tmp/sdcard-boot.img | grep 'U-Boot SPL'

 

If the output differs you could transfer the sdcard boot image to the emmc by:

 

1. Backup EMMC partition table

# sgdisk --backup=/tmp/partition-table.original /dev/mmcblk2

 

2. Copy all created files to the sdcard from /tmp

 

then:

 

3. Write sdcard-boot.img to EMMC

# dd if=/tmp/sdcard-boot.img bs=16M count=1 of=/dev/mmcblk2
1+0 records in
1+0 records out
16777216 bytes (17 MB, 16 MiB) copied, 0,0489076 s, 343 MB/s

 

4. Restore EMMC partition table

# sgdisk --load-backup=/tmp/partition-table.original /dev/mmcblk2
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.

 

5. Reboot and test with the power meter :lol:

 

 

 

If it fails, or if you want to revert, you can boot from sdcard and then write emmc-boot.img  back to the emmc:

# dd if=emmc-boot.img bs=16M count=1 >/dev/mmcblk2

 

 

Good luck,

 

Dantes

Edited by Dantes
Link to comment
Share on other sites

I read a lot about u-boot and checked the source code that writes the bootloader to virtual sd (in build scripts) and to the mmc (with platform_install.sh).

 

They are identical files and written like:

dd if=$1/idbloader.img of=$2 seek=64 conv=notrunc
dd if=$1/u-boot.itb of=$2 seek=16384 conv=notrunc

(If you don't use any seek= to skip blocks you are reading and overwriting the partition table too.)

 

What i didn't understand at the start was that its not just the kernel. This is a system of u-boot + dtb files + kernel.

 

I now also realize that im dealing with 2 bugs here.

 

1. Bug with different kernels / dtb files between armbian-versions that increases idle power consumption.

2. Bug with booting from mmc instead of sd-card that increases idle power consumption.

 

 

For the first bug that is is fixed in 28.08.0-trunk i noticed the difference in dtb files. Inside the dtb-file compared to older file there is:

 

USB3 fix: dr_mode = "otg" -> dr_mode "host"

Enable CEC: cec-enable = true

Cursor fix that adds "disable-win-move", "cursor-win-id" stuff and "rockchip, plane" stuff.

 

I think one of these fixed the bug (or a change in the kernel?!).

 

From the datasheet of RK3588s:

rk3588s_usb3_dp1.4_combo.png.7254234215a7899634069be20edc5bd7.png

 

Is it possible that this bug is resulting from the DP1.4 lanes that are combined with USB3? And that using USB3 in OTG mode somehow activates them?  Some RK3588s boards have these "USB 3.0 OTG Type-C port with DisplayPort Alt mode" combo ports, while the NanoPi R6C just has a normal USB3 A port. Why does the USB3 port not work in OTG mode at all?

 

Activating the HDMI port on the NanoPi R6C results in ~0,30-0,35W more power consumption and that bug is suspiciously in the same power range.

 

 

For the second bug i have no idea how it is possible to explain the difference when using identical bootloader, dtb-files and kernel. I can see some difference in the bootloader code when booted with mmc as boot drive, like adjusting mmc "drive strength", but i don't think that can explain 0,3W more power consumption.

 

Edited by ct100
Link to comment
Share on other sites

On 8/15/2023 at 6:17 AM, ct100 said:

They are identical files and written like:

dd if=$1/idbloader.img of=$2 seek=64 conv=notrunc
dd if=$1/u-boot.itb of=$2 seek=16384 conv=notrunc

(If you don't use any seek= to skip blocks you are reading and overwriting the partition table too.)

 

Yes, that's how it is done , but "conv=notrunc" only make sense if the output is a file , not  if it is a block device.

 

On 8/15/2023 at 6:17 AM, ct100 said:

I now also realize that im dealing with 2 bugs here.

I made the matrix so I could get a clearer picture of what you where asking, but this adds and extra dimension for sure.

 

Did you try disabling CEC, I reckon you are not using a TV with a remote control ? That might be as you said the cause (HDMI-CEC).

Edited by Dantes
Link to comment
Share on other sites

Ok i found the cause of the first bug. It was the USB3 in OTG-Mode!

 

I took a kernel image where the bug is present (linux-image-legacy-rockchip-rk3588/now 23.05.1--5.10.160-S03c9-Db165-P0000-C5e28Hfe66-HK01ba-Vc222-B9c18 arm64) and added an user overlay:

 

/dts-v1/;
/plugin/;

/ {
        fragment@0 {
                target = <&usbdrd_dwc3_0>;

                __overlay__ {
                        dr_mode = "host";
                };
        };
};

 

That fixed the increased idle power consumption.

 

The kernel images on the nightly branch beta.armbian.com (linux-image-legacy-rk35xx_23.8.0-trunk*) all have the fix and work fine.

 

 

I'll mark this post as the solution and make a new thread for the 2nd bug.

 

Edited by ct100
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines