@spikerguy micro-add-howto for Ugoos Am6 plus:
After installation, following the official How To, the Ugoos will have a working desktop, ethernet connection and sound (via HDMI). Moreover, Bluetooth may be able to detect devices but might not work properly and there will be no WiFi. (Screen glitches might also be present.) In order to fix these issues, the following (five) steps can be taken:
Note; reboots must often be done on this box as cold reboots, in order to get reliable results.
- Fix1 (SDIO clock): Decompile, edit and recompile the dtb as follows (a ready-made dtb is linked below). In the decompiled dts file, locate the section sd@ffe03000 { …}. There, edit the line
max-frequency = < 0x5f5e100 >;
to read
max-frequency = < 0x2b594d1>;
(This will lower the SDIO clock from 100MHz to 45.454545MHz.) Recompile and install the dtb (and edit accordingly in extlinux.conf). - Fix2 (name of firmware file):
cp /lib/firmware/brcm/nvram_ap6398s.txt /lib/firmware/brcm/brcmfmac4359-sdio.ugoos,am6.txt - Fix3 (Bluetooth): The device number for the Bluetooth chip must be adapted to the Ugoos. The device will appear (after the SDIO fix above) as
/sys/bus/mmc/devices/mmc0\:0001/mmc0\:0001\:1/device. This must be edited in the file/usr/bin/bluetooth-khadas.sh, along with the edits marked by ### (triple hashtag), like so:
Summary
#!/bin/bash
linux_ver=`uname -a | awk '{print $3}'`
###if linux-version compare $linux_ver ge 4.12; then
## Mainline kernel
model=`cat /sys/bus/mmc/devices/mmc0\:0001/mmc0\:0001\:1/device`
bt_tty="ttyAML1"
exit 0
###else
### ## Legacy kernel
### model=`cat /sys/bus/mmc/devices/sdio:0001/sdio:0001:1/device`
### bt_tty="ttyS1"
###fi
/usr/sbin/rfkill block 0
/bin/sleep 2
/usr/sbin/rfkill unblock 0
FIXME Delay
/bin/sleep 1
Attach HCI adapter
/usr/bin/hciattach -n -s 115200 /dev/$bt_tty bcm43xx 2000000
- Fix4 (CPU speed governor): The governor schedutil with explicit frequency settings can be installed and utilized as follows: (This is one way of fixing the screen glitches.) Install the cpupower package
pacman -S cpupowerEdit the following lines of/etc/default/cpupowerlike so:
Summary
# Define CPUs governor
# valid governors: ondemand, performance, powersave, conservative, userspace.
governor='schedutil'
# Limit frequency range
# Valid suffixes: Hz, kHz (default), MHz, GHz, THz
min_freq="1000MHz"
max_freq="1.99GHz"
Enable the associated systemd service: systemctl enable cpupower --now
- Reboot and check.
Notes:
- A ready-made dtb with the edit above is here; meson-g12b-ugoos-am6-SDIO45MHz.dtb.
- Sometimes the ethernet is unreliable when using default settings and 1GBits/s speed. (This is apparently an ongoing issue across many amlogic boards.) Setting the speed (e.g. in Network Manager) to 100MBits/s fixes this.
- The khadas-utils service can be disabled (since it controls fans, and the Ugoos is fanless):
systemctl disable khadas-utils.service --now - The analog output/mic does not work. The Ugoos Am6 plus has a rt5651 analog audio chip which is supported in the mainline kernel but not (yet) in the corresponding dtb.
- For more info about these and similar tweaks, see the Manjaro ARM on TV Box thread.
- Edit: The Alsa sound card definition shipped with the Manjaro VIM3 image is in the file
/usr/share/alsa/cards/G12B-KHADAS-VIM3.confThere is a corresponding file (due to LibreElec) for the Ugoos namedG12B-UGOOS-AM6.confwhich will create a different set of audio devices in pulseaudio (e.g. S/PDIF outputs). It is included in some other distros.