Sound?

Linux Center is Linux Container APP, can run different isolated Linux systems on Asustor Nas system using a single Linux kernel.

Moderator: Lillian.W@AST

User avatar
Nazar78
Posts: 1984
youtube meble na wymiar Warszawa
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Sound?

Post by Nazar78 »

1. What apps are you running inside and outside of LXC?

2. Use iostat watch for iowait percentage to see how much disk activities that caused the video to stutter.

3. Try using deadline scheduler when using DE (desktop environments). By default Asustor is using CFQ.

4. Go max 8GB ram, 4GB is a bit low for DE. If the ram usage is low, try adjusting the swappiness (default 60) or disabling swap? I have 16GB yet sometimes the OS tries to swap which caused unwanted disk IO that I disabled the swap entirely. Test first for few days to avoid OOM situation.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
yabba234
Posts: 30
Joined: Wed Jan 20, 2021 5:44 pm

Re: Sound? <TEMP FIX>

Post by yabba234 »

Nazar78 wrote: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,

Code: Select all

ssh root@192.168.1.2
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
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.


This metod don't work on my Lockestor 2.
Can you share how install ubuntu container over debian 10 ? Maybe sound will be work under ubuntu ??
BTW: Asustor has probably the best hardware in us, but the firmware responsible for using the hdmi output is underdeveloped - no sound, no autodiscovery hdmi output devices - I must restart all nas to discovery appears video output - this is ridiculous !!
Unfortunately - the competition has it 100% refined
Asustor 6602T with 2TB IronWolf and 2x 16GB ssd cashe Optane, backup external drive 8TB + 1TB, Synology RT1900,UPS ACP500, Razer Balde Base 2020, Iphone X
DisasterIncarnate
Posts: 28
Joined: Wed Jul 07, 2021 8:39 am

Re: Sound?

Post by DisasterIncarnate »

still no official fix for this?

Having same issue on my setup as well, zero sound, only available device showing as a dummy device, an intel snd device does show when searched for with lsmod and sound codecs/etc but the device doesnt look active, pulse audio daemon cant start properly etc, its not ideal.

Why even have linux center when it cant do something so basic, esp when you have it advertised as some magic pc alternative/all-in-1 system. i got a linux system that does basic stuff with no sound and a portal system thats unoperable due to keyboard/mouse not working (but do in linux center).
____________________
Relevant NAS - AS6602T
User avatar
Nazar78
Posts: 1984
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Sound?

Post by Nazar78 »

Good news all! Think I managed to finally unravel the mystery of the missing sound! Also for months I've been trying to upgrade to beyond Ubuntu Focal which always failed miserably now it's good though with some bugs.

But since I've upgrade to ADM 4 I've been facing with a new issue which is the hardware acceleration think caused by the newer ADM 4 kernel 5.4 build (Edited: Fixed). For those interested, I'm preparing (during my free time) to make an automated process to fix the sound issue together with a fresh copy of Ubuntu latest LTS - Focal x86_64. Those still with ADM 3 with x86_64 please PM me your NAS model if you're interested to test... stay tuned :o Edited: I'm specifically looking for a NAS with SPDIF to test.
Screenshot from 2021-07-27 17-32-11.png
Screenshot from 2021-07-27 17-32-11.png (1000.36 KiB) Viewed 5276 times
Screenshot from 2021-07-27 17-33-58.png
Screenshot from 2021-07-27 17-33-58.png (782.66 KiB) Viewed 5276 times
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
User avatar
Nazar78
Posts: 1984
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Sound?

Post by Nazar78 »

Just to share...do watch in 4K (-:

This is about playing PC games with screen, sound and input directly from the NAS with very low latency. The NAS handles this GameStream technology very well. Your gaming rig could be in the room and NAS in the living room.
NAS: Asustor AS5304T (Nimbustor4)

LXC: Linux Center Modded (Ubuntu 22.04 LTS (Jammy Jellyfish))

GameStream: Moonlight v4.1.0 (PC & NAS), HEVC (H.265), V-Sync off

TV: Samsung 4K UA65RU8000KXXS @ 1080p 120Hz

GPU: NVIDIA RTX 3080 @ 1440p 165Hz

Game: War Thunder, Movie preset replay with all full settings.

Two scenes:
#1 Live TV recording from smartphone (perfect gaming experience)
#2 Screen recording from Nimbustor4 LXC itself (slightly high latency)
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
Post Reply

Return to “Linux-Center”