Chimneyfactory
Posts: 44
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: 2215
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: 2610
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: 2589
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: 2589
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: 45
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: 45
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: 47
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 4B - Raspbian Buster 32 | Arch Linux ARM 64 - RPI Kernel 64

Kendek
Posts: 143
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: 47
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 4B - Raspbian Buster 32 | Arch Linux ARM 64 - RPI Kernel 64

Kendek
Posts: 143
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: 47
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 4B - Raspbian Buster 32 | Arch Linux ARM 64 - RPI Kernel 64

Kendek
Posts: 143
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: 47
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 4B - Raspbian Buster 32 | Arch Linux ARM 64 - RPI Kernel 64

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2215
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: 47
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 4B - Raspbian Buster 32 | Arch Linux ARM 64 - RPI Kernel 64

timg236
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 292
Joined: Thu Jun 21, 2018 4:30 pm

Re: VLI firmware v2.0 - powersaving features enabled

Thu Oct 24, 2019 9:59 am

soundcheck wrote:
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.
For automated checks I'd recommend using the machine interface (-j -m eeprom-status.json). LibreElec uses this to display the EEPROM status in the UI.

Will look at the status message.

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

Re: VLI firmware v2.0 - powersaving features enabled

Thu Oct 24, 2019 11:42 am

While you're at it.

Not sure if this is the right place.

Some more comments. Call it pedantics.

* I think the script (rpi-eeprom-update) needs to get a bit more hardened.
You don't check if "all" the userland tools (vcmailbox etc) are actually available.

* Since now you combine all eeprom firmware you might consider to change your paths and terminology accordingly:
To e.g. /lib/firmware/raspberrypi/eeprom >>> instead of "../bootloader"

* And then I was asking myself why "critical" and "beta" firmware ?? critical sounds critical. :D
Why not using a pretty much industry standard: "stable" vs. "beta"?

That was pretty much it.

Now, at this early state, it's the time to touch above. Later on you and all the integrators will have to carry that bag. ;)

Anyhow. Great work. Highly appreciated.
____________________________________________________________________________________
RPi 4B - Raspbian Buster 32 | Arch Linux ARM 64 - RPI Kernel 64

timg236
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 292
Joined: Thu Jun 21, 2018 4:30 pm

Re: VLI firmware v2.0 - powersaving features enabled

Thu Oct 24, 2019 12:24 pm

soundcheck wrote:
Thu Oct 24, 2019 11:42 am
While you're at it.

Not sure if this is the right place.

Some more comments. Call it pedantics.

* I think the script (rpi-eeprom-update) needs to get a bit more hardened.
You don't check if "all" the userland tools (vcmailbox etc) are actually available.

* Since now you combine all eeprom firmware you might consider to change your paths and terminology accordingly:
To e.g. /lib/firmware/raspberrypi/eeprom >>> instead of "../bootloader"

* And then I was asking myself why "critical" and "beta" firmware ?? critical sounds critical. :D
Why not using a pretty much industry standard: "stable" vs. "beta"?

That was pretty much it.

Now, at this early state, it's the time to touch above. Later on you and all the integrators will have to carry that bag. ;)

Anyhow. Great work. Highly appreciated.
Thanks for the feedback, I'll add a check for vcmailbox, btw USE_FLASHROM is really just for reference. It's not possible to guarantee that the SPI pins are available (HATs) and that analog audio has not in use (EEPROM CS muxed with analog audio). So basically, use at your own risk.

I think it's too late to rename the sub-directories now, in future the VL805 bin may be rolled into the bootloader image allowing me to revert all the script complexity required to handle two different EEPROMs :)

Critical updates include major fixes for hardware compatibility, power management and security and would be rolled out automatically to all users/boards who haven't opted out of firmware updates because it's not realistic to expect everyone to know whether or not to apply an update or even what an EEPROM or bootloader is.

I think 'stable' will probably get used when advanced-boot modes (e.g. network boot) are out of beta. Eventually stable would get promoted to critical to reduce the number of versions for support but that has to be balanced with the 'if it ain't broke don't fix it' rule.

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

Re: VLI firmware v2.0 - powersaving features enabled

Thu Oct 24, 2019 12:36 pm

Thx a lot for the feedback.
____________________________________________________________________________________
RPi 4B - Raspbian Buster 32 | Arch Linux ARM 64 - RPI Kernel 64

robinkoehler
Posts: 1
Joined: Sat Nov 02, 2019 7:13 am

Re: VLI firmware v2.0 - powersaving features enabled

Sat Nov 02, 2019 7:23 am

Thank you kindly for making this available!

I have noticed some strange issues after updating.

Raspberry Pi 4, 4gb
External USB3 Hub (backpowering the Pi)
GIMX board plugged into PS4 (apparently also backpowering the Pi)
TV LED backlight driven by Hyperion / GPIO pins 19 for DI and 23 for CK

I can now finally sudo reboot without having to unplug the USB3 hub, yay! The new firmware however messes with the LEDs at the back of my TV (ambilight DIY clone). It seems that the new firmware "pulses" through different power saving states, and every time it does (1-3 seconds?), the LEDs become dimmer as well.

1) How would the new firmware impact the SPI voltage?

2) Is there a version of the firmware that still offers the benefits of the Pi not hanging during reboot, however disables the power saving features altogether?

Here is my lsusb output, showing the connected devices:

Code: Select all

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0bc2:231a Seagate RSS LLC Expansion Portable
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Bus 001 Device 004: ID 1b71:3002 Fushicai USBTV007 Video Grabber [EasyCAP]
Bus 001 Device 007: ID 054c:05c4 Sony Corp. DualShock 4 [CUH-ZCT1x]
Bus 001 Device 005: ID 0bc2:2300 Seagate RSS LLC Expansion Portable
Bus 001 Device 003: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Thank you in advance,

Robin

iEvgeny
Posts: 7
Joined: Thu Oct 31, 2019 1:39 pm

Re: VLI firmware v2.0 - powersaving features enabled

Sat Nov 02, 2019 1:31 pm

Hi all!
After update to the last firmware i have a problem with bandwidth of USB webcams.
I use two USB webcams:
  1. First cam - stream h264 1280x720, 30 fps, ≈4000 kb/s
  2. Second cam - rawvideo 640x480, 30 fps, 147456 kb/s
If connect any one camera to the Raspberry Pi 4, everything will behaves as expected. But if connect both cams, ffmpeg can't capture any stream.
There are no reports of power problems in the log...

The following command fixes it:

Code: Select all

sudo setpci -s 01:00.0 0xD4.B=0x41

Is it a firmware bug or a specific behavior for power saving?

Return to “Troubleshooting”