Disable local UI on Pi3
@@ -23,8 +23,10 @@ fi
read_features() {
pushd /etc/hifiberry
for f in *.feature; do
+ if [ "$f" != "*" ]; then
F=${f/.feature/}
FEATURES="$FEATURES $F"
+ fi
done
popd
}
@@ -183,7 +185,7 @@ guess_volume_control() {
# Guess what card is installed"
guess_card() {
- if [ "$CARD" != "" ]; then
+ if [ "$CARD" != "unknown" ] && [ "$CARD" != "" ]; then
echo "Using fixed card $CARD with fetaures $FEATURES"
return
fi
@@ -340,6 +342,16 @@ system_name() {
SYSNAME_SED_SPACES=`echo $SYSNAME | sed 's/\ /\\\\\\ /g'`
}
+# Pi3 hasn't enough RAM for local UI
+check_pi3a() {
+ if [ "$PIMODEL" == "3A+" ]; then
+ # Pi 3A+ can't run a local UI as it doesn't have enough RAM
+ FEATURES=${FEATURES/localui/}
+ systemctl disable weston cog
+ fi
+}
+
+
# Reconfigure SpotifyD
reconfigure_spotify() {
RESTART=0
@@ -541,6 +553,7 @@ guess_card
can_record
system_name
read_features
+check_pi3a
CARD_SED_SPACES=`echo $CARD | sed 's/\ /\\\\\\ /g' | sed 's/\//\\\\\\//g'`
