yashsingh1/xdaforums huggingface dataset:
[Fire TV Original Android Development] signde:
I tried this again wired now with the video settings configured and files that would struggle to start are playing fine.

I haven't used iperf3 yet, my previous tests were using the python speedtest. Results with iperf3 in CoreElec and analiti app in FireOS:

Asus RT-AX56U (Wi-Fi 6):

334Mbps (CE)

334Mbps (FireOS)

Cable Matters 4-in-1 USB Hub with Ethernet:

248Mbps (CE + non powered USB hub + USB stick + Microsoft USB IR dongle)

276Mbps (CE + non powered USB hub + USB stick)

275Mbps (FireOS + nothing else in hub)

Cable Matters Micro USB Ethernet Adapter

335Mbps (FireOS + no USB hub)

Looks like this Cable Matters hub with ethernet tops out lower than the non hub variant. It also seems flaky depending on what else I have attached to it. CE will attempt to load but spins indefinitely. Unplug everything else but the USB stick and CE loads fine. I think a powered hub is definitely the way to go here.
[Fire TV Original Android Development] Pro-me3us:
I checked my CableMatters microUSB ethernet adapter in FireOS and got ~280Mbps with or without a USB hub (same as CE). I had assumed it was closer to 340-360Mbps which is what it gets on the 3rd gen Cube.

One of the Amazon reviews mentioned some Cable Matters Ethernet adapters use an ASIX AX88179 chipset. Mine uses a RealTek RTL8153. I wonder if your two adapters are using the same chipeset? You can check in CE with:

CoreELEC:~ # lsusb // lsusb -v for extendent information

I hope the SDR-->DV option makes it in the next stable CE release. Have you compared how SDR-->DV content looks in CE vs FireOS with DV always on? CE corrects the DV-Std/DV-led, but besides that I wasn't sure if there were any other video improvements over FireOS?
[Fire TV Original Android Development] signde:
I don't have a way to connect the Cable Matters micro usb adapter to the Cube in CoreElec. No micro USB to USB-A adapters on hand. Is there a way I can deduce this in fireOS with an adb shell?

ifconfig shows eth0's driver as r8152 so I assume this is a realtek driver.

The CM hub with ethernet is an RTL8153.
[Fire TV Original Android Development] Pro-me3us:
Yeah it sounds like they are both using rtl8153 controllers. Use the command lsusb in ADB shell, it will list the idVendor:idProduct of any USB devices. You'll probably see ID 0bda:8153. 0bda is RealTek, and 8153 is the chipset model. If you see something else, you can google the idVendor:idProduct to find out what the chipset is.

I don't know why the results are different between the two Cable Matters models, or why my microUSB model is slower than yours?
[Fire TV Original Android Development] signde:
Interesting, I had already tried that command but lsusb produces no output on my other two fireOS devices from adb shell. On both karat (RS8102/1969) and gazelle (PS7671/4097) it does not error, it just gives no output with USB ethernet connected. I didn't actually try it on raven but doing it does work there and yes it outputs 0bda:8153.

Back to raven, I'm trying to track down two issues.

First, I am sporadically having problems where CE fails to load ~50% of the time. I believe this is different than the BT driver lockup where the CE animation stops (I have BT disabled) but rather CE never starts with the animation spinning indefinitely. Seeing this with two different non powered hubs and two different USB sticks with everything except the USB stick removed. Suggestions? I've ordered a powered hub as my only next idea.

Second, I found a rip last that that is giving me playback trouble either wired or wireless streaming off a SMB share. It's a 4K HVEC DV 7.6 with TrueHD Atmos MKV that is VBR with an average around 64Mb/s. Playback starts and plays fine for a few minutes but then gets choppy/freezes for many seconds. Settings > Services > Caching, I've tried Memory Size at 256MB and 512MB and it did not seem to improve. Buffer mode is set to default "all network systems". I noticed the previous advanced settings for 20.5 had Read Factor set at 35? I also tried 32 for that with both 256 and 512, again no improvement. Suggestions?

Thanks in advance.
[Fire TV Original Android Development] Pro-me3us:
It might be a permissions issue, you have root on raven. lsusb works for me on gazelle, but it has temp root. So same network chipset, but different top speeds, hmm I don't know.

The issue with the MT7668 drivers isn't fully resolved. When I first disabled the BT component, bootup lockups went away, but then I started to see them here and there again later. Disabling BT may have only helped because WiFi/BT share resources, but the lockups always occurred during WiFi driver loading. The inconsistency has made it hard to figure out. I just did 5 reboots, and no lockups.

Do you have verbose logging enabled? When CE boots is there loading text over the CE splash screen?

That could be a CE bug. Early CE21 versions had some DV FEL playback problems not present in CE20.5. That's mostly been fixed in the nightly releases. You could test the latest nightly on a second USB stick, or update your main USB. You'll need to pack in the raven DTB to the kernel. If you don' have access to Linux/Ubuntu, post the nightly kernel.img and I can pack it.

I watched an 84Mbps movie using the 100Mbps Ethernet adapter without any buffering (500MB cache size). Streaming seems pretty forgiving as long as the network connection is stable. The read factor determines how fast to read/download the stream to fill the video buffer. I went with 35 based off an old forum post for advice on cache settings.
[Fire TV Original Android Development] signde:
Away from home but will check the splash screen text and do verbose logging tomorrow. What I wanted to point out is I believe before I disabled BT the CE splash screen would hang and the spinning animation would stop. I haven’t seen that since. What I sometimes see now is it just stays on the splash screen but the animation is still playing. Can that still be the BT/Wi-Fi issue?

Thanks for the suggestion. I will try the nighties on a separate stick.
[Fire TV Original Android Development] kuileman:
That could be a CE bug. Early CE21 versions had some DV FEL playback problems not present in CE20.5. That's mostly been fixed in the nightly releases. You could test the latest nightly on a second USB stick, or update your main USB. You'll need to pack in the raven DTB to the kernel. If you don' have access to Linux/Ubuntu, post the nightly kernel.img and I can pack it.

@Pro-me3us

I updated with .tar files, then I replace the new kernel.img with the CE-NG_21.0 kernel.img of first post in thsi thread. It's working.
[Fire TV Original Android Development] Pro-me3us:
Using the old kernel.img will discard any new kernel changes made in the nightlies. For example, a lot of DV playback depends on amdolby_vision.c in the kernel. The Kodi UI may show new DV options that aren't fully functional because of missing kernel.img changes.

EDIT: Added instructions below on how to update the kernel.img with the raven dtb from CE, without needing a Linux computer.
[Fire TV Original Android Development] Pro-me3us:
How to add raven dtb to CoreELEC update .tar file

Kernel.img's with raven dtb are added to the main post for any stable CoreELEC release. Follow the instructions below to pack the dtb into the kernel image if you want to test a nightly or custom CE build.

1) Download mkbootimg.zip to your computer (attached to this post, original source). Extract & copy mkbootimg folder, to CE Downloads folder with Samba

storage/downloads/mkbootimg

2) Copy CE update .tar file to CE Downloads/mkbootimg folder with Samba

example storage/downloads/mkbootimg/CoreELEC-Amlogic-ng.arm-21.0-Omega.tar

3) SSH into CE and run the update script (./update.sh name-of-update-file.tar)

CoreELEC:~ # cd downloads/mkbootimg

CoreELEC:~/downloads/mkbootimg # python update.py CoreELEC-Amlogic-ng.arm-21.0-Omega.tar

The raven dtb will be added to the kernel image, the tar file repacked, and moved to the update folder. Reboot CE, and CE will update on the next boot.

​

​

Note: CoreELEC's Backup/Restore option is a useful tool when testing and setting up a new CE USB drive.
[Fire TV Original Android Development] Pro-me3us:
The instructions above have been simplified with an update script. Extract mkbootimg to your CE downloads folder, and put your CE update tar file in that folder too. Run 'update.sh name-of-update-file.tar'. Then reboot CE to start the update.
[Fire TV Original Android Development] kuileman:
Thank you very much for hard working on it.

Is there a way make 'reboot from eMMC/NANO' in the Power menu working as like as Ugoos Am6b+?

I found one time rebooting into Fire tv system could help solving the frame-skipping promblem when play DV BDMV。
[Fire TV Original Android Development] Pro-me3us:
The Reboot from eMMC/NAND option uses the ENV partition to direct the bootloader how to boot. The Cube doesn't have an ENV partition. It might be possible create a workaround, but it would require modifying the raven unlock exploit. I'm hesitant to do that, I worry that someone might brick their Cube in the process. Maybe at a later point this feature can be added.

FireOS shouldn't have any impact on CE video playback. If you haven't already, make sure your kernel.img matches your nightly build, to be sure you have any kernel changes.

I can't remember if the splash screen animation always stopped with the WiFi lockup. My guess is yes, but I usually have debugging on and don't see the animation. If it's not the WiFi lockup, see if you can SSH into CE and check dmesg to get an idea what's going on.
[Fire TV Original Android Development] ddogishere:
Hi @Pro-me3us , great work as always.

Have you tried a 2tb external hdd with your hub? If not is there a way to do that, thanks.
[Fire TV Original Android Development] signde:
Thank you for all the work creating this! I was in the process of doing this manually when you posted the revised script. It worked and I have updated to the latest nightly.

I originally downloaded the wrong nightly file (Generic.img.gz instead of .tar) and got a whole bunch of errors despite the script saying it worked and it putting a file in the updates directory. It was pretty obvious something went wrong though. If you want to gold plate the script perhaps check the tar extraction for errors/output before proceeding.

When setting up the new stick for the nightly on first boot before I am able to disable BT, I got a lockup on the splash screen where the animation stopped. Later after disabling BT I got a splash screen where the animation kept spinning but CE never loaded. SSH was not available, the device did not respond to any pings in this state. Whats the method to turn on debugging to see what is actually happening / if this is a WiFi lockup? Is there a CE log to enable separate from enabling debug logging in Kodi?
[Fire TV Original Android Development] Pro-me3us:
Yeah the script was just a quicky to cut down on steps. I added checks so that it will exit if any step fails. Also cleaned out all the unnecessary files and re-posted mkbootimg.zip

To enable debugging, open /flash/config.ini and edit the following line at the bottom

coreelec='debugging ignore_loglevel=1'

Make sure to remove the '#' in front. /flash is where kernel.img is and what you see when you plug the USB stick in the computer.

This probably won't help in this instance, the on-screen bootup output stops when it gets to loading the serial port. A bunch of drivers are loaded after this point. I mostly rely on uart for figuring out early boot problems.

You could temporarily add the MT7668 WiFi driver to the blacklist so that it doesn't load, then see if all the lockups go away.

From SSH:

echo blacklist wlan_mt76x8_sdio >> /storage/.config/modprobe.d/blacklist.conf

To undo this so that only BT is blacklisted

echo blacklist bt_mt7668 > /storage/.config/modprobe.d/blacklist.conf

Or use Samba to edit the blacklist.conf file

ConfigFiles/modprode.d/blacklist.conf

I mostly rely on network streams. I did connect a portable 4TB spinning platter drive just to do a read/write test, and CE detected it fine. I've seen people use +1TB drives with Fire Sticks. As long as the drive is getting enough power it will probably be fine. I use a 2Amp USB hub, nothing special.
[Fire TV Original Android Development] Pro-me3us:
How to Reboot to FireOS (eMMC/NAND)

Adds an option to bypass USB boot with the command 'reboot quiescent'. The new reboot command can be issued from FireOS (ADB shell) or CoreELEC (SSH).

1) Boot Cube into CoreELEC. Download and transfer quiescent.img to downloads folder over Samba

storage/downloads/quiescent.img

2) SSH into CE. Get MD5 of quiescent.img, to ensure no corruption.

CoreELEC:~ # md5sum /storage/downloads/quiescent.img

Only flash if the MD5 value matches

MD5: ad07d523a63bc9d23a2a215c6eb808ea

3) Flash quiescent.img

CoreELEC:~ # dd if=/storage/downloads/quiescent.img of=/dev/misc

Adding a 'Reboot to FireOS' option to the CE power menu UI is more complicated. The specific steps depend on the Kodi Skin. This is how I added the option to Arctic Zephyr Reloaded

1) Use Samba to open the Addons folder, and edit overrides.xml

skin.arctic.zephyr.mod/shortcuts/overrides.xml

Change:

<override action="RebootToAndroid">
<action>System.ExecWait("/usr/sbin/rebootfromnand")</action>
<action>Reset()</action>
</override>

To:

<override action="RebootToAndroid">
<action>System.ExecWait("/storage/.kodi/addons/skin.arctic.zephyr.mod/bootfireos")</action>
</override>

2) Download bootfireos.zip, extract bootfireos to Arctic.zephry.mod folder

skin.arctic.zephyr.mod/bootfireos

3) Navigate to Arctic Zephyr skin settings

Settings > Skin Settings > Home > Custom power menu

a) Select a power menu option, highlight & press ⊕ (plus sign inside circle) to create new entry​

b) Label new entry​

c) Choose an action: Kodi Command > Reboot to eMMC/NAND​

d) Exit 'customise power menu' to automatically write the settings, and new reboot option will be available.​
[Fire TV Original Android Development] kuileman:
I done working in Arctic Zephyr skin. Thank you again.

P.S.'bootfireos' need permission to pocceed.

Use SSH to connect to your device and run the following command to confirm the permissions:

chmod +x /storage/.kodi/addons/skin.arctic.zephyr.mod/bootfireos

but a problem

When using the reboot quiescent command from the command line to restart the device, the system may preserve the current display settings and environmental state.

However, when starting through the Kodi power menu option, the display settings may be reset or altered, resulting in the TV screen being turned off.

solve way:

you can use the xrandr command to control the screen state. You can add appropriate xrandr commands in your script to ensure the TV screen turns on after rebooting.

For example:

xrandr --output HDMI-1 --auto
[Fire TV Original Android Development] kuileman:
And the default Estury skin is hard to edit the Power Menu for me. Any idea？
[Fire TV Original Android Development] ddogishere:
And Confluence skin please thanks in advance.
[Fire TV Original Android Development] Pro-me3us:
I don't see xrandr in stock CE. I looked for an easy way to disable CEC before triggering the reboot. This works ok:

#!/bin/bash
echo checkdev > /sys/class/aocec/dbg & reboot quiescent

That keeps CEC busy for a few seconds so that CoreELEC can't power off the TV. Updated bootfireos. It doesn't look like scripts require execution permission (chmod +x) in CE. Did you get a permission error?

It's read-only, you'll have to copy the skin to the regular addons folder to edit it.

CoreELEC:~ # cp -r /usr/share/kodi/addons/skin.estuary /storage/.kodi/addons/

Then edit

/storage/.kodi/addons/skin.estuary/xml/DialogButtonMenu.xml

Original

<item>
<label>Reboot from eMMC/NAND</label>
<onclick>System.ExecWait("/usr/sbin/rebootfromnand")</onclick>
<onclick>Reset()</onclick>
<visible>System.PathExist("/dev/system") | System.PathExist("/dev/userdata")</visible>
</item>

Modified

<item>
<label>Reboot to FireOS</label>
<onclick>System.ExecWait("/storage/.kodi/addons/skin.estuary/bootfireos")</onclick>
<visible>System.PathExist("/dev/system") | System.PathExist("/dev/userdata")</visible>
</item>

Use Samba to copy bootfireos file to Addons/skin.estuary/

This is my guess based on the github repo, edit:

/storage/.kodi/addons/skin.confluence/1080p/DialogButtonMenu.xml

I don't see a 'Reboot from eMMC/NAND' entry, you can repurpose the Logoff button.

Original

<control type="button" id="9">
<description>Logoff button</description>
<width>510</width>
<height>60</height>
<textcolor>grey2</textcolor>
<focusedcolor>white</focusedcolor>
<align>center</align>
<textwidth>435</textwidth>
<texturefocus border="25,5,25,5">ShutdownButtonFocus.png</texturefocus>
<texturenofocus border="25,5,25,5">ShutdownButtonNoFocus.png</texturenofocus>
<onclick>dialog.close(all,true)</onclick>
<onclick>System.LogOff</onclick>
<pulseonselect>false</pulseonselect>
<font>font13</font>
<label>$LOCALIZE[20126] $INFO[system.profilename]</label>
<visible>System.HasLoginScreen | Integer.IsGreater(System.ProfileCount,1)</visible>
<visible>System.Loggedon</visible>
</control>

Modified

<control type="button" id="9">
<description>Reboot to FireOS</description>
<width>510</width>
<height>60</height>
<textcolor>grey2</textcolor>
<focusedcolor>white</focusedcolor>
<align>center</align>
<textwidth>435</textwidth>
<texturefocus border="25,5,25,5">ShutdownButtonFocus.png</texturefocus>
<texturenofocus border="25,5,25,5">ShutdownButtonNoFocus.png</texturenofocus>
<onclick>dialog.close(all,true)</onclick>
<onclick>System.ExecWait("/storage/.kodi/addons/skin.confluence/bootfireos")</onclick>
<pulseonselect>false</pulseonselect>
<font>font13</font>
<label>$LOCALIZE[20126] $INFO[system.profilename]</label>
<visible>System.CanReboot</visible>
</control>

Use Samba to copy bootfireos file to Addons/skin.confluence/
[Fire TV Original Android Development] ddogishere:
Unfortunately this is not working, it just reboots back to CE. Incidentally I found this on CE forums, see if you can Modify it somehow & change the name to "Reboot to Fireos" instead of "Log off Master user". Thanks.
[Fire TV Original Android Development] Pro-me3us:
Did you flash quiescent.img (instructions here)? Rebooting to FireOS won't work without it.
[Fire TV Original Android Development] kuileman:
Confluence skin also got working.

I modified the suspend button cus the suspend rewake got wifi not back to working.

Bash:

#!/bin/bash

echo checkdev > /sys/class/aocec/dbg & reboot quiescent

This is great idea. Thx.
[Fire TV Original Android Development] kuileman:
It's read-only, you'll have to copy the skin to the regular addons folder to edit it.

CoreELEC:~ # cp -r /usr/share/kodi/addons/skin.estuary /storage/.kodi/addons/

Then edit

/storage/.kodi/addons/skin.estuary/xml/DialogButtonMenu.xml

It's working. After copied, reboot once then Kodi use /storage/.kodi/addons/skin.estuary/.
[Fire TV Original Android Development] kuileman:
https://github.com/CoreELEC/MT7668,

Can this driver can solve the Remote controller promblem?

if sovled, Fire tv cube 2nd Gen will be better than Am6b+.
[Fire TV Original Android Development] Pro-me3us:
There's two BT MT7668 driver options. This old Linux port, or using the BT MT7668 Amazon source from raven. They both work with BT BR/EDR (BT Legacy) devices, but neither have BT LE functionality under Linux. I've tested both in CE. I think CE is using the old Linux port of the MT7668 driver now.

EmuELEC is using the Amazon version, which works fine with a lot of gamepads, since a lot of gamepads are both LE and BR/EDR compatible. All the BT remotes I have only work in BT LE mode.

It would require someone with some strong programming skills to understand and edit those drivers to fix BT LE.
[Fire TV Original Android Development] ddogishere:
Hi what are the steps to do this, thanks.
[Fire TV Original Android Development] kuileman:
Read this thread from the last of P.4 from P.5 carefully, pls
[Fire TV Original Android Development] Pro-me3us:
Check out this post. Follow the first 3 steps of the instructions to add the ability to bypass USB booting (reboot quiescent).
[Fire TV Original Android Development] ddogishere:
Thanks @Pro-me3us got it working with this on Confluence.
[Fire TV Original Android Development] signde:
Earlier in this thread I mentioned having playback problems and it was suggested I try out the nightlies for potential DV playback fixes. With the nightlies I was still seeing the same problems with playback stopping. Digging through debug logs, I found these entries ffmpeg[0xbaa98430]: [matroska,webm] File ended prematurely which indicated a network issue. It seems I had a network switch that was going bad. I removed it from my network chain and now playback has been working great, even on v21 stable.

After removing the suspect switch I am seeing even faster WiFi throughput - around 445Mbps both ways. Having said that, in my tests with playback of the Jellyfish bitrate samples, the Cube in CE seems able to play higher bitrate files from my slower (~250Mbps) ethernet connection. On ethernet I can manage the 140Mb file but on WiFi it stutters. Maybe the Cube 2 has poor SMB performance (especially over WiFi) like the newest stick and Cube 3? I'm perfectly content to use ethernet I am wondering if it would be happier if I set up NFS shares instead of SMB.
[Fire TV Original Android Development] Pro-me3us:
Very nice! I thought I remember seeing a few people say they had switch problems with their AM6+. R3s3t mentions a problem getting Gbit Ethernet working on his 10Gbps switch. Might be completely unrelated.

445Mbps is incredible, that's with iperf3?

Are you using the 140MB HEVC jellyfish sample? When I did some testing in FireOS a while ago, I could play any 1080P AVC files which capped out at 110Mbps. I had playback problems with all the AVC 4K files (+120Mbps). I think smooth 4K HEVC playback capped out at 300Mbps. I used the Plex app for the samples up to 200Mbps (app limit). I ran the +250Mbps files from the eMMC through the MPV app.

I use PlexKodiConnect without the SMB option, so my experience is limited with that protocol. There was a report of the chunk size having an effect on SMB playback. You could try increasing it (Settings > Services > Caching). I've also heard NFS is supposed to give better performance over SMB in general if you have it available.

Did you try the hybrid USB/eMMC mod? I'm curious if you noticed any general improvements running Storage from the eMMC.
[Fire TV Original Android Development] signde:
Yes that was with iperf3. The Cube is 1 foot away from a AX1800 mesh node. I have an AX3000 mesh node coming soon, I will test again and see if I can push it even further.

Yes I've been focusing on HVEC samples. I too have seen worse results with AVC files than HVEC.

I played around with chunk size over SMB. With 256KB plus your original caching recommendations I could get the 250mb HVEC samples to play over WiFi and ethernet but there were occasional struggles and results were not always consistent. My WiFi throughput indicates the 300mb HVEC file is doable but I could not manage smooth playback of it over SMB, it was choppy.

On a separate profile I previously set up PKC with direct paths config. I redid setup for that using Auto which will now be HTTPS. With PCK wired everything checked out up to 250mb. On WiFi I can play every file in the Jelly Fish repo including the 400Mb HVEC torture test. Video starts almost instantly and plays smooth, never a hint of judder. Pretty impressive. Using Plex as my backing source has been my end goal so this is good.

I'll report back if things change but my initial impression is HTTPS is the way to go.

Not yet and I want to but I am kind of glad I did not at the moment.

I have found some files in my library that have some judder/short freezes. The logs for those files are spammed with "unexpected stream type" which fitsch previously told me is fixed in the nightlies so I've switched off from stable for now. Being in this situation has made me realize going to hybrid USB/eMMC would be a pain to easily swap back and forth.