PhracturedBlue Posted September 14, 2018 Posted September 14, 2018 I was curious if anyone had worked on power management for the S905X. My Le Potato was idling around 0.32A@5.1V = ~1.5W The LibreElec guys documented idle current ~2/3 of that here so I was curious what was going on. Of course I am running a 4.18 armbian kernel (I assume they were using a 3.14 kernel for their tests) so I was never going to match their numbers precisely, but 33% more power seemed like an awful lot. Then I realized I had a USB thumb-drive installed, so I did some experimentation... My numbers were generated using an inline USB power meter that measures pretty accurately compared to a bench meter. My initial findings: Idle with no USB connections: 0.215A Idle with 16GB USB3 stick in USB port 1: 0.291A Idle with 16GB USB3 stick in USB port 2-4: 0.323A Idle with USB2UART in USB port 1: 0.225A Idle with USB2UART in USB port 2-4: 0.257A Idle with 2 USB2UART adapters (ports are irrelevant)" 0.280A It should be noted that enabling autosuspend for USB: echo 'auto' > '/sys/bus/usb/devices/<...>/power/control'; Does drop the idle power back to 0.215 when USB is not in use. I don't need the thumb drive, but I do need 2 USB2UART adapters plugged in and running all he time, so autosuspend isn't very helpful for my use case. I may look into disabling the serial console and use that instead of one of the USB2UART adapters, which should be able to save me ~55mA. Does anyone else have any recommendations to lower the idle power? This box will sit at idle most of the time, and my goal is to be able to run it for 24hours from a ~100Wh battery. On the RPi, it is possible to disable LEDs and HDMI to save some power. Are there similar setting for the LePotato?
TonyMac32 Posted September 14, 2018 Posted September 14, 2018 https://dl.khadas.com/Hardware/VIM1/Datasheet/S905X_Datasheet V0.3 20170314publicversion-Wesion.pdf and https://drive.google.com/file/d/0B1Rq7NcD_39QYnltdGtWWEFvS0U/view?usp=sharing Page 26, you can see that UART B and C live on I2C_A (The RPI's "ID" pins) and "PCM_DOUT/DIN" (Pins 19 and 21 on Le Potato) https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi#L764 Shows the definition of the UART's in question in the GXL dtsi, https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts#L266 shows where the A0 UART is enabled, it should be very similar for UART B and C https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi#L425 There are the pins that need referenced in the same manner as the AO one does. If you're up for some "fun with device tree", or are quite creative that should do the job. I haven't tried it personally, but you have access to the pins and they have those alternate functions. As to power management, I haven't used the 4.18 kernel to any real effect yet, so I can't speak to it's consumption, but I would guess some more "fun with device tree" in both u-boot and linux could disable all the stuff you're not using. Also make sure you're using "conservative" or similar for your CPU governor. If you can't get as low as you want, there are "SoM-style" H3 or H2+ boards that could also fit your needs like the NanoPi Neo/Core/Duo, or even the Libre Computer Tritium H2/3, if you want to keep the flexibility of maintaining the ports. If you search the forums you'll find a ton of "minimize consumption on H3" information. 1
Da Xue Posted September 19, 2018 Posted September 19, 2018 Turning off HDMI will get you pretty big gains since the display output pipeline can be turned off. The lowest I've achieved using that basic tweak is to get it down to 125mA.
PhracturedBlue Posted September 19, 2018 Author Posted September 19, 2018 @Da Xue Do you have an example configuration of how to disable HDMI? Those are pretty sizeable gains compared to what I'm currently seeing. Also, I'm trying to figure out if overlays are supported for the DTB? I can rebuild the DTB, but it means I need to maintain it long term, and I'd rather not need to rebuild the DTB every time I update the kernel if I can avoid it.
Da Xue Posted September 19, 2018 Posted September 19, 2018 What power supply are you using? ARe your numbers from a programmable DC power supply? Normally not having HDMI connected at boot will usually cause the pipeline to turn off. You can also see the schematics here: https://drive.google.com/file/d/0B1Rq7NcD_39QYnltdGtWWEFvS0U/view?usp=sharing
PhracturedBlue Posted September 20, 2018 Author Posted September 20, 2018 I have a 5.2V 2.5A supply that I use (same one I use for my RPi). I hard-booted without an HDMI cable attached, and current dropped by 10mA to 0.206mA with no devices plugged in (except for ethernet). I'll probably live with what I have for now, but getting down to .125 at idle would be really impressive.
Da Xue Posted September 27, 2018 Posted September 27, 2018 On 9/19/2018 at 8:30 PM, PhracturedBlue said: I have a 5.2V 2.5A supply that I use (same one I use for my RPi). I hard-booted without an HDMI cable attached, and current dropped by 10mA to 0.206mA with no devices plugged in (except for ethernet). I'll probably live with what I have for now, but getting down to .125 at idle would be really impressive. 0.125A is as measured with a programmable DC power supply. This number would only apply in battery or direct DC application. If you are measuring from the wall, you have to account for the losses in that power supply you are using.
PhracturedBlue Posted September 27, 2018 Author Posted September 27, 2018 4 hours ago, Da Xue said: 0.125A is as measured with a programmable DC power supply. This number would only apply in battery or direct DC application. If you are measuring from the wall, you have to account for the losses in that power supply you are using. I am measuring current through the 5V input (not at the wall) and am nowhere near 0.125A
Da Xue Posted October 1, 2018 Posted October 1, 2018 Did you turn off HDMI via the GPIO? If that's on, you get about 50-100mA more because of the video pipeline. Check the schematic on the product page of the website.
Recommended Posts