[Linux Station] SOLVED sound problems ... (Workaround it)

Discussion about various official QPKG software applications. Login required to view the contents.
User avatar
ouija
Getting the hang of things
Posts: 63
Joined: Thu Aug 29, 2013 2:02 pm

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by ouija »

I finally took the plunge and "upgraded" my linux station to Ubuntu 16.04 (technically, I uninstalled linux station and container station, which was previously running Ubuntu 14.04 and installed and configured 16.04 from scratch) and ran into audio issues immediatly, with no sound being output to my amplifer.

I remember that I did something simliar under 14.04 ( as mentioned in this thread) to disable pulse-audio via the autospawn=no settings and made use of ALSA, but this time around I was having intermittant issues when rebooting and with Kodi (v17 - Krypton) so I opted to try and get pulse working with 5.1 output.

I found that the audio settings within Ubuntu in Linux Station did in fact see the connection to my amplifier but had it listed as HDMI2 / DisplayPort, and by default, Ubuntu / PulseAudio was selecting HDMI1; So I completed the following steps to define HDMI2 as my default audio device:

1. login to linux station, set audio device to preferred device using the audio settings GUI in Ubuntu.
2. Disabled the two audio startup scripts for Ubuntu (/usr/bin/qnap-audio and /var/lib/qnap/defualt-sink-handler.py)
2. Then open terminal and run

Code: Select all

$ aplay -l
and find that analog is card 0
3. Run

Code: Select all

$ pacmd list
and find the line:

Code: Select all

active profile: <output:hdmi-surround-extra1>
" output:hdmi-surround-extra1" is my profile name, so edit /share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/lxc/ubuntu_1604/pulse/pulse.common/default.pa and comment out the last 4 lines of this file:

Code: Select all

### Make some devices default
#set-default-sink output
#set-default-source input
#.nofail
#.include /etc/pulse/qnap.pa
#.include /etc/pulse/default-sink
#.fail
and then add the following to set your preferred audio profile as default at startup:

Code: Select all

set-card-profile 0 output:hdmi-surround-extra1
save changes to this file and then restart linux station container.

Now audio should be working in Kodi; Note you may need to change the audio output from Defualt PulseAudio device to the actual default device you need.

This enabled 5.1 output using PulseAudio for me within Kodi and within Steam :)
LaRseTe
Starting out
Posts: 31
Joined: Fri Dec 23, 2016 5:59 pm

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by LaRseTe »

Hi guys!

Didn't have any problems playing audio using Alsa or PulseAudio within Kodi, but if I want to record audio within Linux Station I can't, because there are no interfaces available for that. Anybody made recording audio also working? just want to use the Mic inputs the TS-453A have.

Best.
LaRseTe
Starting out
Posts: 31
Joined: Fri Dec 23, 2016 5:59 pm

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by LaRseTe »

LaRseTe wrote:Hi guys!

Didn't have any problems playing audio using Alsa or PulseAudio within Kodi, but if I want to record audio within Linux Station I can't, because there are no interfaces available for that. Anybody made recording audio also working? just want to use the Mic inputs the TS-453A have.

Best.
Ok, nevermind. Using ALSA and unmuting the mic seems to work :)
smhealey
Starting out
Posts: 15
Joined: Thu Jun 22, 2017 6:26 am

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by smhealey »

Qnap TS-453A/Linux Station 16.04

Problem: Pulseaudio only provides 2.0 or 2.1 PCM output to audio video receiver

Fix: Prevent pulseaudio from reloading when killing it and reload ALSA audio allowing to enable Passthrough Audio in Kodi settings and VLC Media Player v3.0 to send DTS 5.1, DD 5.1 or PCM 5.1 sound to Audio Video Receiver

## Change client.conf
sudo nano /etc/pulse/client.conf
## Change "; autospawn = yes" to "autospawn = no"

## Copy client.conf to ~/.config/pulse/
sudo cp /etc/pulse/client.conf ~/.config/pulse

## (optional) If Audio is a little bit crackling change default.pa
sudo /share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/lxc/ubuntu_1604/pulse/pulse.common/default.pa
## Change "load-module module-udev-detect" to "load-module module-udev-detect tsched=0"

## Stop Pulseaudio
pulseaudio -kill

## reload ALSA
sudo alsa force-reload

The only issue with doing the above is that the client.conf file resets every time you restart Linux Station. It overwrites the file with original.

Edit: Copy client.conf to ~/.config/pulse/ resolved the issue client.conf file being reset after restarting Linux Station
Last edited by smhealey on Fri Jun 23, 2017 12:10 am, edited 6 times in total.
LaRseTe
Starting out
Posts: 31
Joined: Fri Dec 23, 2016 5:59 pm

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by LaRseTe »

smhealey wrote:Qnap TS-453A only Stereo 2.1 PCM using Pulseaudio
Fix: Prevent pualseaudio from reloading when killing it and reload ALSA audio allows to enable Passthrough audio in Kodi or VLC Media Player v3 (from the Daily-Master) sending DTS, DD or PCM 5.1 sound to AVR
sudo nano /etc/pulse/client.conf
## Change "; autospawn = yes" to "autospawn = no"
sudo /share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/lxc/ubuntu_1604/pulse/pulse.common/default.pa
## Change "load-module module-udev-detect" to "load-module module-udev-detect tsched=0"
pulseaudio -kill
sudo alsa force-reload


The only issue with doing the above is that the client.conf file resets every time you restart Linux Station. It overwrites the file with original.
Hi! Have you tried creating the client.conf file in the user's home like?:

Code: Select all

~/.config/pulse/client.conf
smhealey
Starting out
Posts: 15
Joined: Thu Jun 22, 2017 6:26 am

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by smhealey »

LaRseTe wrote:
smhealey wrote:Qnap TS-453A only Stereo 2.1 PCM using Pulseaudio
Fix: Prevent pualseaudio from reloading when killing it and reload ALSA audio allows to enable Passthrough audio in Kodi or VLC Media Player v3 (from the Daily-Master) sending DTS, DD or PCM 5.1 sound to AVR
sudo nano /etc/pulse/client.conf
## Change "; autospawn = yes" to "autospawn = no"
sudo /share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/lxc/ubuntu_1604/pulse/pulse.common/default.pa
## Change "load-module module-udev-detect" to "load-module module-udev-detect tsched=0"
pulseaudio -kill
sudo alsa force-reload


The only issue with doing the above is that the client.conf file resets every time you restart Linux Station. It overwrites the file with original.
Hi! Have you tried creating the client.conf file in the user's home like?:

Code: Select all

~/.config/pulse/client.conf
I don't have a clent..conf in that directory :? edit: i misread. I will create one and see if that helps.
smhealey
Starting out
Posts: 15
Joined: Thu Jun 22, 2017 6:26 am

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by smhealey »

Hi! Have you tried creating the client.conf file in the user's home like?:

Code: Select all

~/.config/pulse/client.conf
[/quote]

I don't have a client..conf in that directory :? edit: i misread. I will create one and see if that helps.[/quote]

This works after restarting Linux Station.. Thanks!!
Sparky33
Starting out
Posts: 10
Joined: Sun Oct 30, 2016 9:45 pm

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by Sparky33 »

hi all,

i installed Linux station but i don't have sound. i tried all the things above but i have not /share/ etc. etc. i do have /share2/ but it contains folders of my qnap nas. can please somebody help me to fix the audio on my linux station. i have little to no knowledge of terminal usage.

thank you
TS-251A - 2x 2TB WD RED
Sparky33
Starting out
Posts: 10
Joined: Sun Oct 30, 2016 9:45 pm

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by Sparky33 »

oke little update, i sometimes have sound while i use different apps. i reinstalled ubuntu. but i don't have sound all the time and i cannot figure out why or how.

after i reinstalled ubuntu i installed gnome alsa mixer via the app store in GUI
then i did in the command line the following commands: apt-get install vlc, apt-get update and apt-get install alsa

this is where i a now: when i play sound via chrome, vlc or default media player i have no sound but when i open settings and dubbel tap on analog output and then HDMI output i sometimes have sound (but not always)

i search for the directory /SHARE it is impossible to find. I only have /SHARE2 and it's marked with green.

can please somebody help me to fix my sound problem thanks in advance
TS-251A - 2x 2TB WD RED
smhealey
Starting out
Posts: 15
Joined: Thu Jun 22, 2017 6:26 am

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by smhealey »

Sparky33 wrote:hi all,

i installed Linux station but i don't have sound. i tried all the things above but i have not /share/ etc. etc. i do have /share2/ but it contains folders of my qnap nas. can please somebody help me to fix the audio on my linux station. i have little to no knowledge of terminal usage.

thank you


It is same for me. Share and share2 are the same thing, substitute in your case share2 for whenever share is mentioned.
zimbodog
New here
Posts: 2
Joined: Thu Aug 17, 2017 6:03 pm

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by zimbodog »

So I'm having issues with this too and have followed the instructions but when I restart Ubuntu from Linux Station it loses the config each time. The files disappear and have to run AE_SINK=ALSA kodi manually from the terminal to watch stuff with good audio. Anyone else having this issue?
smhealey
Starting out
Posts: 15
Joined: Thu Jun 22, 2017 6:26 am

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by smhealey »

zimbodog wrote:So I'm having issues with this too and have followed the instructions but when I restart Ubuntu from Linux Station it loses the config each time. The files disappear and have to run AE_SINK=ALSA kodi manually from the terminal to watch stuff with good audio. Anyone else having this issue?

Instead of having to mess with the config every time restart. I just ended up uninstalling pulseaudio completely and everything defaults to ALSA.

sudo apt-get remove pulseaudio
sudo apt-get purge pulseaudio
aryan
Know my way around
Posts: 195
Joined: Thu Mar 12, 2015 10:58 pm
Location: near Venice, Italy

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by aryan »

smhealey wrote:
zimbodog wrote:So I'm having issues with this too and have followed the instructions but when I restart Ubuntu from Linux Station it loses the config each time. The files disappear and have to run AE_SINK=ALSA kodi manually from the terminal to watch stuff with good audio. Anyone else having this issue?

Instead of having to mess with the config every time restart. I just ended up uninstalling pulseaudio completely and everything defaults to ALSA.

sudo apt-get remove pulseaudio
sudo apt-get purge pulseaudio
It asks me to install a lot of packages. Is it normal??
Sorry for the Italian language, but you can see the packages

Code: Select all

root@ubuntu_1604:~# apt-get remove pulseaudio
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze       
Lettura informazioni sullo stato... Fatto
The following additional packages will be installed:
  dleyna-server gnome-control-center gnome-control-center-data gnome-icon-theme gnome-icon-theme-symbolic gnome-online-accounts gnome-settings-daemon iio-sensor-proxy libasound2:i386
  libasound2-plugins:i386 libasyncns0:i386 libaudit1:i386 libcap2:i386 libcolord-gtk1 libdbus-1-3:i386 libdleyna-connector-dbus-1.0-1 libdleyna-core-1.0-3 libfftw3-single3:i386 libflac8:i386
  libgoa-backend-1.0-1 libgomp1:i386 libgssdp-1.0-3 libgupnp-1.0-4 libgupnp-av-1.0-2 libgupnp-dlna-2.0-3 libice6:i386 libjack-jackd2-0:i386 libjson-c2:i386 libltdl7:i386 liblzma5:i386 libogg0:i386
  liborc-0.4-0:i386 libpam-systemd:i386 libpam0g:i386 libpcre3:i386 libpulse0:i386 libpulsedsp:i386 libsamplerate0:i386 libselinux1:i386 libsm6:i386 libsndfile1:i386 libspeexdsp1:i386 libsystemd0:i386
  libtdb1:i386 libudev1:i386 libuuid1:i386 libvorbis0a:i386 libvorbisenc2:i386 libwebrtc-audio-processing-0:i386 libwrap0:i386 libx11-6:i386 libxext6:i386 libxtst6:i386 pulseaudio:i386
  pulseaudio-module-x11:i386 pulseaudio-utils:i386 realmd rtkit:i386
Pacchetti suggeriti:
  libfftw3-bin:i386 libfftw3-dev:i386 jackd2:i386 libpam-doc:i386 pavumeter:i386 pavucontrol:i386 paman:i386 paprefs:i386
I seguenti pacchetti saranno RIMOSSI:
  indicator-sound pulseaudio pulseaudio-module-x11 pulseaudio-utils rtkit ubuntu-desktop unity-control-center unity-control-center-signon
I seguenti pacchetti NUOVI saranno installati:
  dleyna-server gnome-control-center gnome-control-center-data gnome-icon-theme gnome-icon-theme-symbolic gnome-online-accounts gnome-settings-daemon iio-sensor-proxy libasound2:i386
  libasound2-plugins:i386 libasyncns0:i386 libaudit1:i386 libcap2:i386 libcolord-gtk1 libdbus-1-3:i386 libdleyna-connector-dbus-1.0-1 libdleyna-core-1.0-3 libfftw3-single3:i386 libflac8:i386
  libgoa-backend-1.0-1 libgomp1:i386 libgssdp-1.0-3 libgupnp-1.0-4 libgupnp-av-1.0-2 libgupnp-dlna-2.0-3 libice6:i386 libjack-jackd2-0:i386 libjson-c2:i386 libltdl7:i386 liblzma5:i386 libogg0:i386
  liborc-0.4-0:i386 libpam-systemd:i386 libpam0g:i386 libpcre3:i386 libpulse0:i386 libpulsedsp:i386 libsamplerate0:i386 libselinux1:i386 libsm6:i386 libsndfile1:i386 libspeexdsp1:i386 libsystemd0:i386
  libtdb1:i386 libudev1:i386 libuuid1:i386 libvorbis0a:i386 libvorbisenc2:i386 libwebrtc-audio-processing-0:i386 libwrap0:i386 libx11-6:i386 libxext6:i386 libxtst6:i386 pulseaudio:i386
  pulseaudio-module-x11:i386 pulseaudio-utils:i386 realmd rtkit:i386
0 aggiornati, 58 installati, 8 da rimuovere e 0 non aggiornati.
E' necessario scaricare 21,4 MB di archivi.
Dopo quest'operazione, verranno occupati 57,5 MB di spazio su disco.
Continuare? [S/n] n
QNAP TS-451+ / QTS 4.5 / 8GB (4+4) Kingston KVR16LS11 / WD RED 4TB(x4) RAID5 / Remote QNAP RM-IR002 / Logitech K400 White / APC Back-UPS ES 550G
AVR: ONKYO TX-NR609 / TV: Hisense H65M7000
aryan
Know my way around
Posts: 195
Joined: Thu Mar 12, 2015 10:58 pm
Location: near Venice, Italy

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by aryan »

Removing pulseaudio brokes the QNAP Linux installation. So the only solution is to disable it, but isn't so simple with the latest version of QTS...
Or you can start KODI with a script:

Code: Select all

pasuspender
AE_SINK=ALSA kodi
QNAP TS-451+ / QTS 4.5 / 8GB (4+4) Kingston KVR16LS11 / WD RED 4TB(x4) RAID5 / Remote QNAP RM-IR002 / Logitech K400 White / APC Back-UPS ES 550G
AVR: ONKYO TX-NR609 / TV: Hisense H65M7000
icetealight
Starting out
Posts: 18
Joined: Thu Jun 23, 2011 5:34 pm

Re: [Linux Station] SOLVED sound problems ... (Workaround it)

Post by icetealight »

Hey everyone

I am so desperate, I just cant get It work ... tried all hints from your side - but without any luck.

Can somebody try to help me get the 5.1 straight?

After trying again all leads mentioned here, my Léinux is back to stereo out....

viewtopic.php?f=354&t=143541

I am willing to pay for the one who finds a solution!
Post Reply

Return to “Official Apps”