jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24149
Joined: Sat Jul 30, 2011 7:41 pm

Re: VLI firmware v2.0 - powersaving features enabled

Fri Sep 13, 2019 2:29 pm

jerrm wrote:
Fri Sep 13, 2019 1:56 pm
IMO, a Pi without a case is a hobbyist toy. For any real deployment the Pi is inside something - be that its own case or another product. Cooling will still be needed. A 5 degree reduction in base temps will only delay throttling for minute or two. Great for short bursty applications, not so good for anything with sustained usage.
Well, I do professional work on a Pi4 every single day, and it's sitting on my desk naked as the day it was born. No case, no heatsink.

You statement about a 5 degree reduction only delaying throttling is inaccurate. If it drops peak temp below the threshold, then no throttling will occur. A lower base temp means less power going into the system and therefore more chance the inbuilt heat dissipation can keep equilibrium at a lower overall temperature. ie there is a total amount of heat and therefore power the board can dissipate (various according to ambient and board temperature) - reduce the amount going in and you are going to have lower overall equilibrium.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

jerrm
Posts: 200
Joined: Wed May 02, 2018 7:35 pm

Re: VLI firmware v2.0 - powersaving features enabled

Fri Sep 13, 2019 3:03 pm

jamesh wrote:
Fri Sep 13, 2019 2:29 pm
Well, I do professional work on a Pi4 every single day, and it's sitting on my desk naked as the day it was born. No case, no heatsink.
You are not the average user. Maybe not a toy in your case, but the grand-ultimate-king hobbyist.

Our uses are not average either, but there is no scenario we would ship a Pi bare with no protection. I would think most average/non-hobbyist users don't want a bare board floating around either.

The official case causes throttling within a couple minutes of a job running. You no doubt have better data on how hot it can ultimately get if allowed to exceed the current throttling temps and therefore how much difference the 5 degrees really makes, but based on current behavior I find it hard to believe a Pi4 in a closed case will not need cooling (either passive of fan) if the CPU is stressed for more than few minutes.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2158
Joined: Thu Jul 11, 2013 2:37 pm

Re: VLI firmware v2.0 - powersaving features enabled

Fri Sep 13, 2019 3:39 pm

Limit the discussion to the VLI firmware testing, please. Offtopic posts are going to get deleted.
Rockets are loud.
https://astro-pi.org

Chimneyfactory
Posts: 33
Joined: Sun May 19, 2019 1:30 pm

Re: VLI firmware v2.0 - powersaving features enabled

Sun Sep 15, 2019 10:00 am

In my post of Wed Sep 11, 2019 4:01 pm, https://www.raspberrypi.org/forums/view ... 5#p1534499 I noted that I could sometimes get the Pi to hang when shutting down, but it didn't seem repeatable.

In my post of Thu Sep 12, 2019 1:43 pm https://www.raspberrypi.org/forums/view ... 5#p1534965 I showed a way that consistently made the Pi freeze when shutting down after using the vl805 utility.

I think I've found why the first tests seemed inconsistent.

If you're running the original 00013701 firmware, using the vl805 utility does not cause the pi to hang when shutting down.

If you're running the new firmware 000137ab, the pi will consistently hang when shutting down after using the vl805 utility.

Test :
Pi 4 4gb with latest Raspbian installed on SSD, booting from SD
Pi boots to CLI
VL805 utility and firmware unzipped to Downloads directory

With original 00013701 firmware installed, these commands were typed as in the previous test:

Code: Select all

cd Downloads
sudo ./vl805
ls
cd
ls
cd Desktop
ls
cd
sudo shutdown -h now
Works correctly. I repeated this 5 times, each time the Pi operates as expected for each command, and shuts down properly.

I then used the vl805 utility to flash the new 000137ab firmware, and shut the pi down. The shutdown completed successfully.

Reboot, and

Code: Select all

cd Downloads
sudo ./vl805
ls
cd
ls
cd Desktop
ls
cd
sudo shutdown -h now
On 3 out of 3 tests, the shutdown failed to complete, as noted before.

So, if the vl805 utility is leaving the chip in an unknown state, why is this not a problem with the original firmware, but is now causing problems with the new firmware? And might this have other unexpected issues?

Hope this is of interest, it was bugging me why I'd originally not been able to make it fail repeatedly, so I'm happy to have found out why.

Thanks

Ian

invertedohm
Posts: 1
Joined: Mon Sep 16, 2019 12:08 pm

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 16, 2019 12:20 pm

If you're running the original 00013701 firmware, using the vl805 utility does not cause the pi to hang when shutting down.

If you're running the new firmware 000137ab, the pi will consistently hang when shutting down after using the vl805 utility.
Are you using the same vl805 binary for both flashes? I noted that the new zip file had a new binary as well. I don't know what the difference is but the sizes and strings dump look quite different. Just checking as this may have some unexpected impact.

For the record, I'm running the new firmware on two bare pi4's and they're working just fine, one with USB-SSD as well (/boot still on the flash card). Generally 55 degrees idle. I tweaked the CPU governor a little bit:

Code: Select all

$ cat /etc/sysfs.d/ondemand.conf
devices/system/cpu/cpufreq/ondemand/ignore_nice_load = 1
devices/system/cpu/cpufreq/ondemand/sampling_rate = 266250
devices/system/cpu/cpufreq/ondemand/sampling_down_factor = 100
Maxes out around 80 degrees without any cooling and no noticeable throttling, they idle at 50 and 55 respectively.
Last edited by invertedohm on Mon Sep 16, 2019 6:11 pm, edited 1 time in total.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 16, 2019 12:24 pm

There were some internal implementation changes in the vl805 utility, and library linkage is now static, but the functionality should be identical.

Chimneyfactory
Posts: 33
Joined: Sun May 19, 2019 1:30 pm

Re: VLI firmware v2.0 - powersaving features enabled

Wed Sep 18, 2019 7:40 pm

invertedohm wrote:
Mon Sep 16, 2019 12:20 pm
If you're running the original 00013701 firmware, using the vl805 utility does not cause the pi to hang when shutting down.

If you're running the new firmware 000137ab, the pi will consistently hang when shutting down after using the vl805 utility.
Are you using the same vl805 binary for both flashes? I noted that the new zip file had a new binary as well. I don't know what the difference is but the sizes and strings dump look quite different. Just checking as this may have some unexpected impact.

[...]
Yes, same binary and same flash utility.

I unzipped it to the Downloads directory, and flashed and reflashed it from there. Nothing else changed.

With 00013701 firmware, using the vl805 utility did not cause the shutdown freeze problem. With 000137ab firmware, using the vl805 caused the shutdown freeze every time I tried it.

But this is only after using the vl805 utility - using the 000137ab firmware, I've not experienced any other shutdown freeze issues if I've not used the vl805 utility during that session.

I was using the firmware and vl805 utility posted on the 6th September 2019 - I've not tried the updated vl805 utility as yet.

Ian

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2158
Joined: Thu Jul 11, 2013 2:37 pm

Re: VLI firmware v2.0 - powersaving features enabled

Thu Sep 19, 2019 3:11 pm

One last bump...
Rockets are loud.
https://astro-pi.org

User avatar
algorithm
Posts: 185
Joined: Mon Nov 25, 2013 9:09 pm
Location: Flatland

Re: VLI firmware v2.0 - powersaving features enabled

Sun Sep 22, 2019 6:06 am

Dammit, I forgot to recheck my ssd speed before applying the patch... But it seems fine now, still(?) about 257 MB/s and the cpu reports 2 ~ 2.5 degrees lower. This is with a Pi4 4 GB and a Samsung T5 500 GB, tested with "sudo hdparm -t --direct /dev/sda2". Thanks for the work!

Edit: no reboot failure. Was connected via ssh and it came up again.
Last edited by algorithm on Mon Sep 23, 2019 3:35 pm, edited 1 time in total.

LTolledo
Posts: 2151
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: VLI firmware v2.0 - powersaving features enabled

Sun Sep 22, 2019 6:15 am

jdb wrote:
Thu Sep 19, 2019 3:11 pm
One last bump...
Once target functionality is confirmed will this be available in regular update/upgrade process?
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 23, 2019 10:56 am

That's obviously the intention, although the current reboot failures after an update (not the updating itself) make that more contentious.

5ft24dave
Posts: 41
Joined: Tue Jun 12, 2018 3:38 am

Re: VLI firmware v2.0 - powersaving features enabled

Sun Sep 29, 2019 2:45 am

Working great here with no hang on shutdown. 64G sd card, root fs on a 64G M.2 drive on a USB3-sata cable.

Code: Select all

root@Pi4B:~# lsusb
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 174c:55aa ASMedia Technology Inc. Name: ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@Pi4B:~# hdparm -t /dev/sda1

/dev/sda1:
 Timing buffered disk reads: 932 MB in  3.01 seconds = 310.11 MB/sec
root@Pi4B:~# hdparm -t /dev/sda1

/dev/sda1:
 Timing buffered disk reads: 930 MB in  3.00 seconds = 309.95 MB/sec
root@Pi4B:~# hdparm -t /dev/sda1

/dev/sda1:
 Timing buffered disk reads: 930 MB in  3.00 seconds = 309.50 MB/sec
 
 root@Pi4B:~# uname -a
Linux Pi4B 4.19.75-v8+ #1270 SMP PREEMPT Tue Sep 24 18:59:17 BST 2019 aarch64 GNU/Linux

root@Pi4B:~# ./vl805
VL805 FW version: 000137ab



PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: VLI firmware v2.0 - powersaving features enabled

Sun Sep 29, 2019 7:29 am

The hang is something that only happens occasionally immediately after the EEPROM is reprogrammed.

5ft24dave
Posts: 41
Joined: Tue Jun 12, 2018 3:38 am

Re: VLI firmware v2.0 - powersaving features enabled

Sun Sep 29, 2019 5:18 pm

Yes, and I tried it immediately after programming the eeprom and didn't have any hangs. Repeated the eeprom programming and then shutdown -h now without an issue

BRX7
Posts: 36
Joined: Sat Aug 31, 2019 11:07 pm

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 30, 2019 9:43 am

I was getting issues previously but this is my output on lsusb
using a Integral 120GB P SSD 2.5",
ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 152d:0578 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6Gb/s bridge
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

/dev/sda1:
Timing buffered disk reads: 56 MB in 31.91 seconds = 1.75 MB/sec

Linux pi64 4.19.73-v8-ae5fd2ed5556-p4-bis+ #2 SMP PREEMPT Tue Sep 24 13:59:43 GMT 2019 aarch64 GNU/Linux

BRX7
Posts: 36
Joined: Sat Aug 31, 2019 11:07 pm

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 30, 2019 10:26 am

I run quirks cuase I was using gentoopi64 its much better now

soundcheck
Posts: 39
Joined: Thu May 21, 2015 1:36 pm
Location: DUS
Contact: Website

Re: VLI firmware v2.0 - powersaving features enabled

Thu Oct 17, 2019 7:19 am

Hi.

I installed the latest VLI firmware. Great! Power consumption went down by about 100mA down to 480mA@800MHz.
That's a big improvement for power critical/battery based applications. Highly appreciated! :D

Perhaps there is more!?!? ;)

On the PI3 there where options to disable the entire USB stack.
In use-cases like simply running onboard WLAN and a whatever HAT, USB & ethernet would not be required.
A simple "unbind" of the driver "echo '1-0' > /sys/bus/usb/drivers/usb/unbind" or similar brought the USB related power down by 40%/200mA @ 800MHz. That was very useful. That of course also brought the temperature further down.

I couldn't find a way to accomplish a similar behavior on the Pi4.
I'm wondering if the VLI firmware would support such an IMO crucial feature for power critical applications.
Or is it already offering a very low-current idle state in powersaving mode and I'd have to look somewhere else?

THX.
____________________________________________________________________________________
RPi 4 B - RPI Kernel 64 - Raspbian 32 | Arch Linux ARM 64

Kendek
Posts: 128
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: VLI firmware v2.0 - powersaving features enabled

Thu Oct 17, 2019 7:28 am

soundcheck wrote:
Thu Oct 17, 2019 7:19 am
I couldn't find a way to accomplish a similar behavior on the Pi4.
Just remove the PCIe interface, this totally disable the USB controller:

Code: Select all

echo 1 >/sys/bus/pci/devices/0000\:01\:00.0/remove

soundcheck
Posts: 39
Joined: Thu May 21, 2015 1:36 pm
Location: DUS
Contact: Website

Re: VLI firmware v2.0 - powersaving features enabled

Wed Oct 23, 2019 3:25 pm

Kendek wrote:
Thu Oct 17, 2019 7:28 am

Just remove the PCIe interface, this totally disable the USB controller:

Code: Select all

echo 1 >/sys/bus/pci/devices/0000\:01\:00.0/remove
Doesn't work. The chips (USB and ethernet) don't seem to get powered down this way.
The power consumption stays as is.



Just to mention it: I'm running the latest aarch64 RPI kernel and ALARM.
____________________________________________________________________________________
RPi 4 B - RPI Kernel 64 - Raspbian 32 | Arch Linux ARM 64

Kendek
Posts: 128
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: VLI firmware v2.0 - powersaving features enabled

Wed Oct 23, 2019 4:03 pm

soundcheck wrote:
Wed Oct 23, 2019 3:25 pm
Doesn't work. The chips (USB and ethernet) don't seem to get powered down this way.
The power consumption stays as is.
You can do unbind too, but the power consumption will remain the same.

Code: Select all

for d in /sys/bus/usb/drivers/usb/* ; do echo ${d:25} >/sys/bus/usb/drivers/usb/unbind ; done
Note that the Ethernet controller is on the main SoC, and connected to an external Broadcom PHY over a dedicated RGMII link. So it's not possible to powered down via USB.

soundcheck
Posts: 39
Joined: Thu May 21, 2015 1:36 pm
Location: DUS
Contact: Website

Re: VLI firmware v2.0 - powersaving features enabled

Wed Oct 23, 2019 4:21 pm

Yep. I know that ethernet goes separate.

Since you suggested to bring down the PCI altogether, ethernet would have also been involved.
The Broadcom ethernet chip is also connected to PCI, isn't it.

I tried "unbind" for USB earlier. And it failed. That worked well on the 3B+. 40% down on idle. That's been a lot.

The last VLI firmware update, with it's power saving features was IMO pretty successful too. Savings of around 20% on idle I consider substantial.

Perhaps there's more to gain. Or perhaps that'll be it. :D
____________________________________________________________________________________
RPi 4 B - RPI Kernel 64 - Raspbian 32 | Arch Linux ARM 64

Kendek
Posts: 128
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: VLI firmware v2.0 - powersaving features enabled

Wed Oct 23, 2019 4:34 pm

soundcheck wrote:
Wed Oct 23, 2019 4:21 pm
Since you suggested to bring down the PCI altogether, ethernet would have also been involved.
The Broadcom ethernet chip is also connected to PCI, isn't it.
The RGMII interface is not PCI Express, so no. The single PCIe Gen 2 lane is exclusively assigned to the USB controller.

soundcheck
Posts: 39
Joined: Thu May 21, 2015 1:36 pm
Location: DUS
Contact: Website

Re: VLI firmware v2.0 - powersaving features enabled

Wed Oct 23, 2019 5:09 pm

Ah. I see. Thx.
____________________________________________________________________________________
RPi 4 B - RPI Kernel 64 - Raspbian 32 | Arch Linux ARM 64

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2158
Joined: Thu Jul 11, 2013 2:37 pm

Re: VLI firmware v2.0 - powersaving features enabled

Wed Oct 23, 2019 7:15 pm

The rpi-eeprom Apt package now has support for automatic upgrades of the VLI firmware (and the bootloader recovery image now re-flashes the VLI firmware as well) - see https://www.raspberrypi.org/forums/view ... 9&t=255001

If you install/upgrade the rpi-eeprom package, it will now conditionally upgrade the VLI firmware on next reboot as detailed in Tim's post.

Edit: the package uses the VPU to write the VLI eeprom firmware, which is done before Linux initialises the controller and as such the "reboot hang" problem won't occur when using this method. The VLI utility in google drive has been updated so simply running it to dump out the version shouldn't cause a hang, but if you flash a different firmware to the EEPROM with the utility and reboot then you may still get a hang.
Rockets are loud.
https://astro-pi.org

soundcheck
Posts: 39
Joined: Thu May 21, 2015 1:36 pm
Location: DUS
Contact: Website

Re: VLI firmware v2.0 - powersaving features enabled

Thu Oct 24, 2019 7:18 am

Hi.

Great news about the combined eeprom/VL package.

Just tested it.

Code: Select all

#rpi-eeprom-update

Bootloader EEPROM is up to date
BOOTLOADER
CURRENT: Tue Sep 10 10:41:50 UTC 2019 (1568112110)
LATEST: Tue Sep 10 10:41:50 UTC 2019 (1568112110)
VL805
CURRENT: 000137ab
LATEST: 000137ab

Comment:

It still says
"Bootloader EEPROM is up to date" ??

How about
"EEPROMs up to date"

or adding
"VL805 EEPROM is up to date"

or simply

Code: Select all

EEPROMs
BOOTLOADER  up-to-date
 CURRENT: Tue Sep 10 10:41:50 UTC 2019 (1568112110)
 LATEST: Tue Sep 10 10:41:50 UTC 2019 (1568112110)
VL805  up-to-date
 CURRENT: 000137ab
 LATEST: 000137ab

That'll make maintenance checks a bit easier and looks consistent.
____________________________________________________________________________________
RPi 4 B - RPI Kernel 64 - Raspbian 32 | Arch Linux ARM 64

Return to “Troubleshooting”