Fiio X5 3rd gen || 2x AKM 4490 || Balanced Out || DSD || DXD | DTS | Android || Dual Card Slot
Jul 3, 2018 at 4:30 AM Post #13,682 of 15,897
I have some Shure - KSE1200 headphones on their way to me and I was wondering if anyone here has had experience using them with the X5iii. Looking for tips.
 
Jul 3, 2018 at 5:10 AM Post #13,683 of 15,897
Hi all,

A few interesting updates, initially only for the (software) tech savvy for testing. Hopefully I'll be able to release an easily flashable kernel for everyone soon.

As promised, I've reached out to @FiiO to request the latest kernel source code for the X5iii as per the GPL, and they have kindly released the code for general use. So after careful review of the code (spoiler alert: there's lots of low hanging fruit), I've created a build environment and compiled the first (basic) optimised kernel for the FiiO X5iii FW 1.2.1.

Features:
- Overclocked CPU from 1416MHz to 1704MHz (buttery smooth UI)
- Overclocked GPU from 400 to 700MHz (more responsive screen)
- Undervolted CPU & GPU (less heat, longer battery life)
- Re-compiled toolset with Linaro toolchain as opposed to GCC (more optimised, leaner meaner kernel)
- More to come soon

Warning/Disclaimer:
i) Whilst this will not brick your player, it is likely to invalidate your warranty. Usual disclaimers apply.
ii) The voltage/clock settings have worked well for my specific RK3188 chip, but can (and will) vary on other chipsets because of the die material. YMMV.

Download

http://www.mediafire.com/file/wjqivdd2y7pbnl2/boot.zip/file

Installation:
Requirements:
- Vanilla X5iii v1.2.1 firmware
- TWRP 2.8.5.0
- rkflashtool
- kernel performane tool, eg: Kernel Adiutor or similar
- patience...

1) Backup existing kernel
i) reboot to bootloader
ii) rkflashtool r boot > boot_backup.img

2) Flash new kernel
i) rkflashtool w boot < boot.img

3) On first boot, reboot to TWRP and wipe kernel/dalvik. Reboot

4) Enjoy!

Troubleshooting

If for whatever reason the player doesn't boot or you wish to return to previous firmware:

i) Unplug USB cable
ii) Press Power button for 30+ seconds until blue power button turns off
iii) Press and hold Previous + Power button for 30 seconds until player turns on and boots to TWRP
iv) adb push boot_backup.img /sdcard/
v) Install -> images -> boot_backup.img -> Boot
vi) Flash and boot back to previous kernel

Observations/Tips
i) For those of you who have complained that media search times are poor, there's a reason why. The default scheduler is cfq, which is a fair-balanced scheduler but performs poorly with large media folders. If you have root and/or flashed my test kernel, select deadline and report back to see if media seek/play times are improved
ii) Run Kernel Adiutor and try and get a long-term report of the CPU states the FiiO player spends most time in. With the performance governor (the fastest) you should see the maximum clock speed of 1704MHz being the longest time spent, but YMMV. Please report back so I'll implement and fine-tune governors and schedulers as required for best musical enjoyment
iii) Some of the kernel drivers are pretty outdated, no fault to FiiO as they've wisely chosen to use the most stable performing ones (instead of bleeding edge). I'd like this new kernel stream to focus on performance and optimisation, but some things may break in the process. If so please report back and I'll post fixes as quickly as they come.

Next Steps
Quite a lot actually. There's a lot of potential with this player now that the kernel source code has been opened up. I'm focussing on the following as next steps:

i) Optimised NAND algorithms by Rockchip to increase memory read performance
ii) F2FS support to support one of the fastest android filesystems
iii) exFAT/NTFS updated drivers
iv) Texas Instruments drivers upgrade
v) Cirrus Logic drivers upgrade
vi) And requests :)

Depending on how technical this thread becomes I might decide to move it to the xda forum for a more cohesive discussion and feedback on this specific kernel. It will depend on the level of interest for an optimised kernel for the FiiO players.

I'd also be happy to build an optimised kernel for the FiiO X7ii but (cough) I don't have one. So if anyone is interested in helping me... :)

Enjoy your new leaner, faster, cooler, feature-rich kernel. As always, feedback and comments much appreciated!

Just wanted to say I tried this and strongly recommend it.

A couple of notes about install: important to emphasise that the rkflashtool to use is the Linux one - this worked straight off for me; originally tried with the Windows flavour and it couldn't see the Fiio when rebooted into bootloader. Also I got a warning message of unexpected end of file. Fearing that I had screwed something up, I redownloaded the zip file, extracted again and re-flashed but got the same message. Fiio booted perfectly all the same.

I do notice the difference in performance, and the added smoothness is welcome.

Many, many thanks for applying yourself to this!
 
Jul 3, 2018 at 6:26 AM Post #13,684 of 15,897
Hi all,

...
Installation:
Requirements:
- Vanilla X5iii v1.2.1 firmware
- TWRP 2.8.5.0
- rkflashtool
- kernel performane tool, eg: Kernel Adiutor or similar
- patience...

1) Backup existing kernel
i) reboot to bootloader
ii) rkflashtool r boot > boot_backup.img

2) Flash new kernel
i) rkflashtool w boot < boot.img

3) On first boot, reboot to TWRP and wipe kernel/dalvik. Reboot

...

I'll be happy to test.
But to be sure not doing something wrong can you detail the steps 1) 2) and 3) ?

And thanks for the job already done !
 
Jul 3, 2018 at 6:36 AM Post #13,685 of 15,897
I'll be happy to test.
But to be sure not doing something wrong can you detail the steps 1) 2) and 3) ?

And thanks for the job already done !

Updated the post with some more instructions. The good news is that it's very hard to do something irreversible on the FiiO (unless you mess with the bootloader, which I haven't - see my later post).
 
Jul 3, 2018 at 6:42 AM Post #13,686 of 15,897
Just wanted to say I tried this and strongly recommend it.

A couple of notes about install: important to emphasise that the rkflashtool to use is the Linux one - this worked straight off for me; originally tried with the Windows flavour and it couldn't see the Fiio when rebooted into bootloader. Also I got a warning message of unexpected end of file. Fearing that I had screwed something up, I redownloaded the zip file, extracted again and re-flashed but got the same message. Fiio booted perfectly all the same.

I do notice the difference in performance, and the added smoothness is welcome.

Many, many thanks for applying yourself to this!

Thanks for the feedback, it is much appreciated. So far over 150+ downloads in the last 24 hours, so clearly there must be some demand for optimised firmware (and a lot more X5 devices than I thought)...

Just a quick note on your observations:

i) the 'premature end-of-file reached' - this is because I'm using a more efficient toolchain, so the resulting kernel image is smaller than the original one. Don't worry about this.

ii) As to the Windows flashing, in theory you should be able to flash it with Rockchip's windows version, but I've never liked the clunkiness of the interface for starters, and it doesn't really give you the flexibility you enjoy on the command line. A general rule of thumb is that for any android devices you should be happy to navigate the linux command line, and same for macOS with apple devices. Windows is not bad, but lacking in out of the box functionality unless you install a lot of hybrid libraries, and even then I've found it to be sub-par. Hope this helps!
 
Jul 3, 2018 at 10:15 AM Post #13,687 of 15,897
Hi all

V1.2 of the FiiO X5iii kernel is now available.

Changelog:

- Further optimised CPU and GPU undervolting, much less heat dissipation
- GPU overclocked to 800MHz (more responsive screen)
- DDR overclocked to 700MHz (much, much faster RAM now)
* New I/O Schedulers - SIO and VR. These should be really good for folders with large files, switch between them with Kernel Adiutor, experiment with the read-ahead buffer on external storage and report back which works best
* New Rockchip NAND driver
* New Mali GPU driver (better, faster graphics support, even though you shouldn't really be watching videos on the FiiO...)

Download the latest kernel here:

http://www.mediafire.com/file/6cxkdgtixdjie5g/FiiO-jkbuha-kernel-V1.2.zip/file

Enjoy :)
 
Last edited:
Jul 3, 2018 at 11:08 AM Post #13,688 of 15,897
Hi all

V1.2 of the FiiO X5iii kernel is now available.

Changelog:

- Further optimised CPU and GPU undervolting, much less heat disspation
- GPU overclocked to 800MHz (more responsive screen)
- DDR overclocked to 700MHz (much, much faster RAM now)
* New I/O Schedulers - SIO and VR. These should be really good for folders with large files, switch between them with Kernel Adiutor, experiment with the read-ahead buffer on external storage and report back which works best
* New Rockchip NAND driver
* New Mali GPU driver (better, faster graphics support, even though shouldn't be watching videos on the FiiO..)

Download the latest kernel here:

http://www.mediafire.com/file/6cxkdgtixdjie5g/FiiO-jkbuha-kernel-V1.2.zip/file

Enjoy :)
Do YouTube videos still drop frames?
 
Jul 3, 2018 at 11:26 AM Post #13,689 of 15,897
Do YouTube videos still drop frames?

Never used YouTube on the FiiO (awful bit rate).

Assuming it's not a bandwidth issue the new Mali drivers should really help with the H265 codecs on YT. Test and let me know!

UPDATE: Tested a few HD videos myself on the latest Mali GPU drivers. No frame drops, all videos I played were nice and smooth. If you have some specific videos you've experienced lag/drops send me the links so I'll test myself.
 
Last edited:
Jul 3, 2018 at 1:20 PM Post #13,690 of 15,897
Kernel 1.2 refreshed FiiO to my great satisfaction. The only collapse was the Antu Benchmark - the multithreadCPU test remained hanging until the reset. Without some drama. Maybe one line for rebooting after a successful flash * rkflashtool b *. In TWRP 2.8.5 there is no option * wipe kernel * - just * wipe cache * and * wipe dalvik cache * ??
Flash was on MacOSX Sierra High 13.5 under brew. Fortunately, the compatibility is OK.
 
Jul 3, 2018 at 1:30 PM Post #13,691 of 15,897
Kernel 1.2 refreshed FiiO to my great satisfaction. The only collapse was the Antu Benchmark - the multithreadCPU test remained hanging until the reset. Without some drama. Maybe one line for rebooting after a successful flash * rkflashtool b *. In TWRP 2.8.5 there is no option * wipe kernel * - just * wipe cache * and * wipe dalvik cache * ??
Flash was on MacOSX Sierra High 13.5 under brew. Fortunately, the compatibility is OK.

Thanks. I've added the rkflashtool b point to the instructions (it was kind of obvious for me that you'd want to reset, didn't realise I had left that part out). With regards to TWRP, cache & dalvik refer to kernel and android caches respectively. At some point, once the kernel is feature-rich enough to my liking I'll port TWRP 3.2.1-0 over to the FiiO family. Just trying to balance all the other things going on in life alongside this at the moment :)

On the Antutu note, two points:
i) Could you uninstall and reinstall Antutu? It could be the cache wasn't properly reset; uninstalling will clear everything. If symptoms persist, try dropping a clock speed (eg: 1704-> 1608) and re-run the test.
ii) Did you by any chance baseline Antutu with/without my kernel? Would be good to get an independent reading of the performance improvement.
 
Jul 3, 2018 at 2:05 PM Post #13,692 of 15,897
Antutu Benchmark 1.jpg Antutu Benchmark 2.jpg Antutu Multicore.jpg Antutu Single Core test.jpg Geekbench 1.jpg Geekbench 2.jpg Geekbench 3.jpg Antutu Benchmark 1.jpg Antutu Benchmark 2.jpg Antutu Multicore.jpg Antutu Single Core test.jpg Geekbench 1.jpg Geekbench 2.jpg Geekbench 3.jpg Antutu Benchmark 1.jpg Antutu Benchmark 2.jpg Antutu Multicore.jpg Geekbench 3.jpg Geekbench 2.jpg Unfortunately, I did not think so - to make Antuta's kernel change test. But in any case the difference is obvious, the battery life is about the same. I did not try the video after changing the kernel, but at ROM 1.2.1 I downloaded some SD quality concerts and played it smoothly. Even Youtube was not downloaded, but I use it in FiiO Via browser - probably also of Chinese origin, lightweight but packed with features like Firefox or Chrome. Even the standard browser did not have a problem. Even without a gyroscopic sensor, it switches video to fullscreen. The only crap is going to be and wasting WiFi performance, which is unfortunately the hardware issue. Nevertheless, it streams through Gizmo from JRiver without hesitation, UAPP detto - without rehearsing and snatching playing directly from shared folders on PC and HiRes audio. It's a mystery to me.
Antutu will try to reach the end and I will know - I do not promise to 100% - tomorrow I'm traveling on holiday and I have only FiiO ready ....


The Antutu test is fine, I did another at CPU 1700MHz and everything went well. Only the MultiCpu takes too long - I've probably lost my patience for the first time. He also passed Geekbench 4 tests and interesting results.
Antutu claims that FiiO supports NFC chip. Probably a weak diagnosis, identified but not evaluated by the MALI GPU chip.
Broadcomm WiFi I had 4 chips on laptops and always had a fluctuating income - maybe there is room for improvement ..
 
Last edited:
Jul 3, 2018 at 2:22 PM Post #13,693 of 15,897
On the WiFi front there's some (actually loads) potential optimisation to be done. I've looked at the wireless bcm43 drivers currently installed on the FiiO and there's a lot of room for improvement both battery and performance-wise. Will try and have a look at this at some point in the near future...
 
Last edited:
Jul 3, 2018 at 5:45 PM Post #13,694 of 15,897
This is Antutu's kernel 1.3 test. Finally, after the week of use, the original FiiO interactive governor or ondemand governor seems to be optimal. Interactive uses all processor clock frequencies, including deep sleep, is sufficiently flexible and fast - the only meaningful frequency and response test was to scan music to FiiOMusic and UAPP, and then browse through music libraries.

Interactive governor
interactive gov.png

ondemand governor

ondemand gov.png

Used ROM Fidelizer - Purist ROM 1.2.1
 
Last edited:
Jul 3, 2018 at 6:48 PM Post #13,695 of 15,897
Hi all,

A few interesting updates, initially only for the (software) tech savvy for testing. Hopefully I'll be able to release an easily flashable kernel for everyone soon.

As promised, I've reached out to @FiiO to request the latest kernel source code for the X5iii as per the GPL, and they have kindly released the code for general use. So after careful review of the code (spoiler alert: there's lots of low hanging fruit), I've created a build environment and compiled the first (basic) optimised kernel for the FiiO X5iii FW 1.2.1.

Features:
- Overclocked CPU from 1416MHz to 1704MHz (buttery smooth UI)
- Overclocked GPU from 400 to 700MHz (more responsive screen)
- Undervolted CPU & GPU (less heat, longer battery life)
- Re-compiled toolset with Linaro toolchain as opposed to GCC (more optimised, leaner meaner kernel)
- More to come soon

Warning/Disclaimer:
i) Whilst this will not brick your player, it is likely to invalidate your warranty. Usual disclaimers apply.
ii) The voltage/clock settings have worked well for my specific RK3188 chip, but can (and will) vary on other chipsets because of the die material. YMMV.

Download

http://www.mediafire.com/file/wjqivdd2y7pbnl2/boot.zip/file

Installation:
Requirements:
- Vanilla X5iii v1.2.1 firmware
- TWRP 2.8.5.0
- rkflashtool (Linux, MacOS preferrably, though you can find the binaries for Windows)
- kernel performance tool, eg: Kernel Adiutor or similar
- patience...

1) Backup existing kernel
1.1) reboot to bootloader (adb reboot bootloader from Windows/MacOS/Linux)
1.2) rkflashtool r boot > boot_backup.img (this is important - it will be your backup boot.img if ever you need to restore)

2) Flash new kernel
2.1) rkflashtool w boot < boot.img
(Don't worry if you get a message saying 'premature end-of-file reached' - it just means that the new kernel is smaller than the old one. Which is a Good Thing.)
2.2) Reboot: rkflashtool b

3) On first boot, reboot to TWRP (adb reboot recovery)
3.1) Wipe-> Advanced Wipe _> wipe only kernel and dalvik partition
3.2) Reboot

4) Enjoy!

Troubleshooting

If for whatever reason the player doesn't boot or you wish to return to previous firmware:

i) Unplug USB cable
ii) Press Power button for 30+ seconds until blue power button turns off
iii) Press and hold Previous + Power button for 30 seconds until player turns on and boots to TWRP
iv) adb push boot_backup.img /sdcard/
v) Install -> images -> boot_backup.img -> Boot
vi) Flash and boot back to previous kernel

Observations/Tips
i) For those of you who have complained that media search times are poor, there's a reason why. The default scheduler is cfq, which is a fair-balanced scheduler but performs poorly with large media folders. If you have root and/or flashed my test kernel, select deadline and report back to see if media seek/play times are improved
ii) Run Kernel Adiutor and try and get a long-term report of the CPU states the FiiO player spends most time in. With the performance governor (the fastest) you should see the maximum clock speed of 1704MHz being the longest time spent, but YMMV. Please report back so I'll implement and fine-tune governors and schedulers as required for best musical enjoyment
iii) Some of the kernel drivers are pretty outdated, no fault to FiiO as they've wisely chosen to use the most stable performing ones (instead of bleeding edge). I'd like this new kernel stream to focus on performance and optimisation, but some things may break in the process. If so please report back and I'll post fixes as quickly as they come.

Next Steps
Quite a lot actually. There's a lot of potential with this player now that the kernel source code has been opened up. I'm focussing on the following as next steps:

i) Optimised NAND algorithms by Rockchip to increase memory read performance
ii) F2FS support to support one of the fastest android filesystems
iii) exFAT/NTFS updated drivers
iv) Texas Instruments drivers upgrade
v) Cirrus Logic drivers upgrade
vi) And requests :)

Depending on how technical this thread becomes I might decide to move it to the xda forum for a more cohesive discussion and feedback on this specific kernel. It will depend on the level of interest for an optimised kernel for the FiiO players.

I'd also be happy to build an optimised kernel for the FiiO X7ii but (cough) I don't have one. So if anyone is interested in helping me... :)

Enjoy your new leaner, faster, cooler, feature-rich kernel. As always, feedback and comments much appreciated!

I know you may want to kill me, but I know you created a guide to install TWRP... do you know where can I find it?
 

Users who are viewing this thread

Back
Top