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

VLI firmware v2.0 - powersaving features enabled

Fri Sep 06, 2019 2:35 pm

We have received an updated USB controller firmware from VLI. This firmware enables PCIe APSM and should not have the device hang issues seen with the 0137a8. It should also resolve issues seen with poor performance when single USB2.0 devices were intermittently transferring data.

Download the firmware from here:
https://drive.google.com/file/d/1nUFfKG ... sp=sharing

And use the same commands previously used to upgrade, but for the new version:
With the zip file on the Pi:

Code: Select all

$ unzip vl805_update_0137ab.zip
$ chmod a+x vl805
$ sudo ./vl805 -w vl805_fw_0137ab.bin
$ sudo reboot
The zip file includes the current shipping firmware (013701) in case you want to revert:

Code: Select all

$ sudo ./vl805 -w vl805_fw_013701.bin
$ sudo reboot
By the way, if you run "sudo ./vl805" with no parameters it displays the version of the currently running firmware. Note that this may differ from what's in the EEPROM if you've just reprogrammed it but not rebooted.
Please test and report back.
Rockets are loud.
https://astro-pi.org

trejan
Posts: 5627
Joined: Tue Jul 02, 2019 2:28 pm

Re: VLI firmware v2.0 - powersaving features enabled

Fri Sep 06, 2019 5:11 pm

All good here. Flashed 0137ab with no problems on the Pi 4 boards I've got. It seems to have fixed ASPM and the odd timing issue I had with 0137a8.

It still doesn't like running a RTL2832U based SDR and an Airspy together though. usbtop reports ~9200 kb/s when it is just the Airspy running but sampling from both together causes it only do ~7500 kb/s for the Airspy and ~1000 kb/s for the RTL2832U. Exceeding some limit somewhere but probably not related to the firmware. I've worked around this by using the old USB controller on the USB-C connector for the RTL2832U anyway. On this controller, the RTL2832U does ~4000 kb/s as reported by usbtop.

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

Re: VLI firmware v2.0 - powersaving features enabled

Fri Sep 06, 2019 6:30 pm

Are there any differences when rotating through the various ASPM power state options?

I.e. is the bandwidth significantly altered by doing

Code: Select all

# setpci -s 01:00.0 0xD4.B=0x40
# setpci -s 01:00.0 0xD4.B=0x41
# setpci -s 01:00.0 0xD4.B=0x43
in turn?
Rockets are loud.
https://astro-pi.org

andrum99
Posts: 1765
Joined: Fri Jul 20, 2012 2:41 pm

Re: VLI firmware v2.0 - powersaving features enabled

Fri Sep 06, 2019 7:45 pm

I'm seeing the SoC idle 1 or 2 degrees C lower with the v2 USB controller firmware versus the original release version. Everything else looks normal so far.

pfletch101
Posts: 720
Joined: Sat Feb 24, 2018 4:09 am
Location: Buffalo, NY, USA

Re: VLI firmware v2.0 - powersaving features enabled

Fri Sep 06, 2019 10:43 pm

@jcyr: your issue with sudo reboot does seem to be specific to your setup. On my Pi4, running from an SD Card, there is no problem rebooting after the update, and I assume that the other positive responders in this thread also had no problems.

RonR
Posts: 3194
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: VLI firmware v2.0 - powersaving features enabled

Fri Sep 06, 2019 10:47 pm

jcyr wrote:
Fri Sep 06, 2019 10:21 pm
Ah yes... there is a problem. sudo reboot fails every time. I'm running so called hybrid boot with Samsung flash stick.

128GB USB 3.1 flash stick plugged in to USB 3 port.

Fixed by reverting to vl805_fw_013701

FWIW...

No problems with reboot or halt running from a SAMSUNG 32GB BAR Plus (Metal) USB 3.1 Flash Drive plugged into USB 3 port after upgrading to vl805_fw_0137ab.bin.

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

Re: VLI firmware v2.0 - powersaving features enabled

Sat Sep 07, 2019 6:56 am

Weird. Injecting current into the D+/D- lines has been known to stop the PMIC from starting up as it causes leakage into the 3.3V supply.
The only way that the firmware could be changing this behaviour is if Vbus isn't removed during device reset - worth investigating.
Rockets are loud.
https://astro-pi.org

g1gsw
Posts: 49
Joined: Sun Jun 24, 2012 6:02 pm
Location: SW Wales

Re: VLI firmware v2.0 - powersaving features enabled

Sat Sep 07, 2019 1:04 pm

Hi

Cures the problem I had mounting my USB drives either solid state, standard drive or USB sticks. I have no problems with reboots and the temperature is 2.5 to 3 degrees lower with my fan shim running all the time it is at 38C most of the time only increases when very busy i.e. playing video.

Many Thanks

Colin

Gerbertus
Posts: 12
Joined: Tue Apr 17, 2018 3:39 pm

Re: VLI firmware v2.0 - powersaving features enabled

Sun Sep 08, 2019 2:31 am

Shouldn't this be announced in the "Announcements" forum, and possibly on the blog? Stuff gets buried in this subforum really fast.

User avatar
Paul Webster
Posts: 860
Joined: Sat Jul 30, 2011 4:49 am
Location: London, UK

Re: VLI firmware v2.0 - powersaving features enabled

Sun Sep 08, 2019 7:23 am

My guess is that having a relatively small initial audience is the idea - hence the “test and report back” instruction.

itsmedoofer
Posts: 610
Joined: Wed Sep 25, 2013 8:43 am
Location: Canterbury, Kent, UK

Re: VLI firmware v2.0 - powersaving features enabled

Sun Sep 08, 2019 12:07 pm

Hi,

Booting from a PNY SSD, like jcyr I'm having issues with reboot, it will hang with a black screen more times than it will boot, a power cycle is the only fix.

My drive enclosure is shows as:-

Bus 002 Device 002: ID 2537:1068

Shout if you need anything further..

Edit:-

No noticeable difference in temperature either, although I have no hard data to back that up.

Me.

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

Re: VLI firmware v2.0 - powersaving features enabled

Sun Sep 08, 2019 3:46 pm

"A PNY SSD" - what is it?

Is the drive enclosure USB3.0 to SATA? USB2.0 to SATA? Externally powered/bus-powered?
Rockets are loud.
https://astro-pi.org

itsmedoofer
Posts: 610
Joined: Wed Sep 25, 2013 8:43 am
Location: Canterbury, Kent, UK

Re: VLI firmware v2.0 - powersaving features enabled

Sun Sep 08, 2019 7:52 pm

PNY (Copmpany Name) CS900 Solid State Drive, 120GB

USB 3.0 to SATA adapter with a norelsys ns1068x chip http://www.norelsys.com/product-13784-16263-59546.html

The drive is bus powered.

Official Pi 4 PSU

USB 2.0 hub connected with a Logitech, Inc. Unifying Receiver plugged in.

Original firmware shows no issues, and the adapter worked fine on my 3B+ previously.

PhoenixPi
Posts: 2
Joined: Fri Jun 28, 2019 8:05 pm

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 09, 2019 12:32 am

Last test firmware was fine for me and thankfully, so far, so is this one. Just a USB 3 HDD involved, not a boot drive.
Might have slightly slower hdparm results: ~60MB/s with this while the previous test I believe was closer to 80MB/s but that could just as easily be my faded memory. Don't worry about it - will try to test after a bit more time with this firmware.

Edit: ~70MB/s on original firmware.

Thanks RPi team!
Last edited by PhoenixPi on Tue Sep 24, 2019 12:43 am, edited 1 time in total.

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

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 09, 2019 8:46 am

jcyr wrote:
Sat Sep 07, 2019 2:27 pm
jdb wrote:
Sat Sep 07, 2019 6:56 am
Weird. Injecting current into the D+/D- lines has been known to stop the PMIC from starting up as it causes leakage into the 3.3V supply.
The only way that the firmware could be changing this behaviour is if Vbus isn't removed during device reset - worth investigating.
Not the case in this instance. The only devices plugged in to USB ports are not capable of powering anything (keyboard, mouse, and USB stick). I did notice that if the 3.3V line stays powered after shutdown, the green LED on the connected wired Ethernet port starts flashing rapidly, and will not stop doing so till the power supply (brick) is unplugged.
If Vbus is powered, and the plugged-in devices are signalling "attach", then the D+/D- lines get current injection from the device's 3v3 supply.

In the case where the reboot has hung,
- Does removing USB devices cause the Pi to start to boot?
- If so, then in the hung state can you measure vbus (topside of the board, +ve marked pin on the big capacitor next to the USB3 ports)?

If I replicate your EEPROM settings and do a reboot or poweroff, then I see vbus go to 0V as expected.
Rockets are loud.
https://astro-pi.org

itsmedoofer
Posts: 610
Joined: Wed Sep 25, 2013 8:43 am
Location: Canterbury, Kent, UK

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 09, 2019 8:58 am

By removing devices do you mean the boot device or any attached?

I'll measure the voltage in a bit, where is a good place to probe -ve ?

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

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 09, 2019 9:05 am

itsmedoofer wrote:
Mon Sep 09, 2019 8:58 am
By removing devices do you mean the boot device or any attached?

I'll measure the voltage in a bit, where is a good place to probe -ve ?
The test is to remove USB devices while in the hung state and see if the Pi "wakes up". The SD card activity LED should still work and you should get the rainbow square even if the kernel is missing (i.e. boot device disconnected).

USB connector shells are connected to -ve.
Rockets are loud.
https://astro-pi.org

itsmedoofer
Posts: 610
Joined: Wed Sep 25, 2013 8:43 am
Location: Canterbury, Kent, UK

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 09, 2019 10:48 am

Hi,

I reverted back to 01370 yesterday afternoon, I've just re-flashed 0137ab to run these trials and found no issues with rebooting ?! Nothing has changed, no updates other than the VLI firmware ?!

Reading the thread again it looks as if jcyr found the same.

I had tried the previous beta that was put out, there's not a flag or a sticky bit somewhere that could cause an issue is there ?

Do you still need a voltage check, probably not...

Temperatures seem a bit lower as well maybe by 2C, 50C with a 15% load, previously 50 idle....

It would be hard to prove but anecdotally I would say that my first flash of 0137ab wasn't clean for whatever reason..

Mikael
Posts: 43
Joined: Wed Feb 11, 2015 12:35 pm

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 09, 2019 12:30 pm

Flashed and tested for temperature changes. Idle temps approximately 3C cooler with official case and top off and around 5C cooler with the top on. In absolutes:

Without top: 58C idle
With top: 67C idle

Ambient: ~22C

No issues so far, but haven't really done much.
Last edited by Mikael on Mon Sep 09, 2019 2:04 pm, edited 1 time in total.

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

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 09, 2019 2:28 pm

I can confirm that the VBus behaviour is identical across bootloader POWER_OFF_ON_HALT=0/1 and VLI firmware changes.

One thing to note is that both of you are running the root on an SSD - if USB devices become inaccessible after flashing the firmware (the script rescans the bus) then a shutdown will hang forever as the root filesystem has gone away.
Rockets are loud.
https://astro-pi.org

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

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 09, 2019 2:33 pm

... if USB devices become inaccessible after flashing the firmware (the script rescans the bus)
There used to be a wrapper script called "vl805_flash" that would perform a rescan after flashing, but we don't use that now. The provided "vl805" utility just updates the EEPROM and should have no other effect on the running system.

User avatar
bleep42
Posts: 259
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 09, 2019 4:09 pm

Tested and working fine on a Pi4 with 64-bit raspbian kernel and hibrid boot using USB3 SSD.
Temperature is the same as the previous (updated) firmware 0137a8.
All good, thanks. :-)
Regards, Kevin.
Last edited by bleep42 on Mon Sep 09, 2019 5:01 pm, edited 1 time in total.

User avatar
PeterO
Posts: 6095
Joined: Sun Jul 22, 2012 4:14 pm

Re: VLI firmware v2.0 - powersaving features enabled

Mon Sep 09, 2019 4:25 pm

Pi4B4 in a Pibow with temp. controlled fan-shim (set to 65° trigger temp.) seems to be idling about 4°C cooler at 56°C.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

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

Re: VLI firmware v2.0 - powersaving features enabled

Wed Sep 11, 2019 9:59 am

Hesitant to make this a sticky (we have enough of them already) so - bump. I think a few more +1's for success and we put this in the announcements forum.
Rockets are loud.
https://astro-pi.org

itsmedoofer
Posts: 610
Joined: Wed Sep 25, 2013 8:43 am
Location: Canterbury, Kent, UK

Re: VLI firmware v2.0 - powersaving features enabled

Wed Sep 11, 2019 11:38 am

Hi,

Not sure if I understand why my first flash was unsuccessful but the second attempt worked.

The issue wasn't a result of the flashing process, post flash a power cycle would be successful, reboot not.

Its moot for me really as it's all working, however two people here had similar if not the same issue, could be the tip of the proverbial if you open it up further, just a thought....

Return to “Troubleshooting”