Just to share a temporary remedy (until they, Asustor themselves, fixed this) for anyone running into this missing sound issue in the Linux Center Debian Desktop after reboot because /dev/snd is not setup by default. As far as I know it's only setup by the Asustor Portal but only one app can be enabled at one time.
Probably in the future I could provide a package app containing diff patch for this but for now I'll try to describe below for someone who's new to unix. If anyone knows a better way to initialize the sound please feel free to share.
1. SSH into your NAS (Windows use putty, Mac use terminal) as root, pass same as admin,
where the IP is your NAS IP. Ensure SSH is already enabled in the Services->Terminal->SSH prior.
2. Assuming Linux Center has already been installed, edit this file using vi, enter:
Code: Select all
vi /usr/local/AppCentral/linux-center/CONTROL/start-stop.sh
3. After opening the file, move your cursor caret to beginning of line 10 which contains several spaces followed by "/sbin/ldconfig" (refer attached screenshot). Get into the insert mode by pressing "i", press enter once to move down the line, place back the cursor at line 10 then paste below (Windows putty paste using right-click):
Code: Select all
# Fix missing sound upon reboot
# Requires ASPortal and X.org but disabled
APP_CENTRAL=/usr/local/AppCentral
if [ "`grep HDMI=1 $APP_CENTRAL/linux-center/containers/debian/container.conf`" != "" ] && [ "`$APP_CENTRAL/xorg/usr/bin/amixer|grep PCM`" = "" ];then
for i in asportal remote-center web-browser xorg;do
apkg --disable $i>/dev/null 2>&1
done
for i in xorg asportal;do
$APP_CENTRAL/$i/CONTROL/start-stop.sh start>/dev/null 2>&1
done
BREAK=0
while [ "`$APP_CENTRAL/asportal/webman/general.cgi --act run_app --app "ASUSTOR Portal"|grep '"success": true'`" = "" ];do
BREAK=$((BREAK+1))
[ $BREAK -ge 60 ] && break
sleep 1
done
BREAK=0
while [ "`$APP_CENTRAL/xorg/usr/bin/amixer|grep PCM`" = "" ];do
BREAK=$((BREAK+1))
[ $BREAK -ge 60 ] && break
sleep 1
done
sleep 5
for i in asportal xorg;do
$APP_CENTRAL/$i/CONTROL/start-stop.sh stop>/dev/null 2>&1
done
fi
# Fix missing sound upon reboot
- Screenshot from 2020-01-17 02-45-41.png (121.15 KiB) Viewed 9797 times
4. After inserting the lines above, press "ESC" to exit the insert mode then enter ":wq" to save and quit. At anytime you messed up, press "ESC" then enter ":q!" to quit without saving after which you can retry editing again. The usual undo/redo doesn't seems to work with the busybox version of vi!
5. Restart your NAS if the sound is already missing, else this should work the next time your NAS reboot. Note Asustor Portal and X.org needs to be installed but disabled. Also avoid remote sessions like Chrome Remote Desktop as another session would mess up the alsa/pulseaudio or even inputs and could also lockup the HDMI audio sink until next reboot. Use VNC instead.
Final words... After fixing the sound issue, a few tweaks/mods here and there, I'm overall satisfied with the Nimbustor4. Running LXC on the NAS, I could also run few games from Steam like CS:GO on medium settings FHD. The passthrough 5.1 surround also seems to be working well including smooth 4K 100mbps HEVC 10bit video playback on VLC and hardware video decoding acceleration on Chromium. Really wondering why Asustor is still sticking with its sluggish AS Portal? So no more going back to Asustor Portal for me but I'll not replace the core ADM with Ubuntu for its firmware/bios support.