[myHD 1.0.2] Application server for Kodi, Plex, etc.

myHD is an isolated (namespace (mnt, IPC, PID)) Ubuntu environment to run Ubuntu application displayed as ASUSTOR Asportal / Xorg applications.

Moderator: Lillian.W@AST

Post Reply
User avatar
father.mande
Posts: 1810
youtube meble na wymiar Warszawa
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [myHD 0.9.4] Application server for Kodi, Plex, etc. on Ubuntu 1604/1804

Post by father.mande »

Hi,

Uninstalling then re installing do nothing ... all is in Ubuntu env. and not in myHD APKG (the manager of the environment)

Perhaps the HDMI you use is not configured in Ubuntu env. ... I have only one system with one HDMI plug at back, even 2 output exist on mother_board, output to test and integrate, your system have 3 HDMI (each HDMI can have multiple hardware sound device)

I don't explain, sorry, how test sound, because it's in the Kodi18 tips & tricks post ... but read hereafter
enter in myHD
myHD_root
then use the test script provide :
/myHD_scripts/bin/test_pulse_Intel_config.sh

This script list the HDMI output available, test each of them up you get sound, when it's OK (just <Enter> to quit test loop)
some information will be provide to configure Ubuntu.

example :

Code: Select all

[/volume1/.@root] # myHD_root
root@AS5002TAPHIL:~# /myHD_scripts/bin/test_pulse_Intel_config.sh
Please find here after the list of HDMI hardware device available

hw:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
hw:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1

select hardware to test
if second line have HDMI X ... get X as card value
if first line have DEV=Y ... get Y as device value
then enter when requested TEST_TARGET as : X,Y
If all tested, just ... press ENTER to finish

Test will loop 3 times ... so just wait
remember the couple X,Y where sound is played ...
Please enter target format X,Y : 0,3

speaker-test 1.1.3

Playback device is hw:0,3
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 32 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
 0 - Front Left
 1 - Front Right
Time per period = 2.732180
 0 - Front Left
 1 - Front Right
Time per period = 2.986724
 0 - Front Left
 1 - Front Right
Time per period = 2.986656
Please enter target format X,Y :
now you have the device value to configure in default.pa (pulseaudio)

in user default.pa ~/.config/pulse/default.pa (eventually in system /etc/pulse/default.pa)
REPLACE line :
load-module module-alsa-sink device=hw:0,3 (or what else in place of hw:0,3)
by :
load-module module-alsa-sink device=hw:X,Y

Now pulseaudio can works
root@AS5002TAPHIL:~#
After change ... restart myHD ... even pulseaudio is spawned ... so change can be apply dynamically
exit (myHD_root) then do myHD restart

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
jojeta
Posts: 26
Joined: Thu Jul 31, 2014 9:47 pm

Re: [myHD 0.9.4] Application server for Kodi, Plex, etc. on Ubuntu 1604/1804

Post by jojeta »

hi
I decided to test all audio option in Kodi, and that turned out to be a good idea, I got sound when I selected "HDA Intel PCH Philips FTV on DisplayPort"(I still use HDMI) so now I "only" missing sound on netflix :)

John
User avatar
father.mande
Posts: 1810
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [myHD 0.9.4] Application server for Kodi, Plex, etc. on Ubuntu 1604/1804

Post by father.mande »

Hi,
jojeta wrote:hi
I decided to test all audio option in Kodi, and that turned out to be a good idea, I got sound when I selected "HDA Intel PCH Philips FTV on DisplayPort"(I still use HDMI) so now I "only" missing sound on netflix :)
John
OK ... so it's pulseaudio problem for netflix, so please do the test proposed here before, it's for pulseaudio
Kodi is configured to accept Audio Engine ALSA purely, so without pulseaudio ... so it's why I said you to test HDA Intel PCH and with your screen name attached if done.
Netflix on Linux use Chrome ... and Chrome use pulseaudio (as I know it's not possible to select audio output)
... so if as I expect it's pulseaudio that are not configured as well ... it's the reason to don't have audio in Netflix
... the script proposed is to help you to determine the good configuration (depend of the models, and of the HDMI plug you used (in your models 3 choice))

HDA sound driver is NOT DEPENDENT of plug you use really ... the information done is the information coming in the extended EDID response from the TV asked by Linux
... you can get the response in /proc/asound folder if you want more detail on HOW Linux see your configuration.

Good to know that things go ahead .
Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
jojeta
Posts: 26
Joined: Thu Jul 31, 2014 9:47 pm

Re: [myHD 0.9.4] Application server for Kodi, Plex, etc. on Ubuntu 1604/1804

Post by jojeta »

Herby result from test, I have only one HDMI2 at the back of Nas

device 3 HDMI 0 - Playback open error: -16, Device or resource busy
device 7 HDMI 1 - Playback open error: -2, no such file or directory
device 8 HDMI 2 - Playback open error: -2, no such file or directory
All failed

John
User avatar
father.mande
Posts: 1810
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [myHD 0.9.4] Application server for Kodi, Plex, etc. on Ubuntu 1604/1804

Post by father.mande »

Hi,
jojeta wrote:Herby result from test, I have only one HDMI2 at the back of Nas
device 3 HDMI 0 - Playback open error: -16, Device or resource busy
device 7 HDMI 1 - Playback open error: -2, no such file or directory
device 8 HDMI 2 - Playback open error: -2, no such file or directory
All failed
John
Very strange ... please can you provide here the terminal trace of command (full)
BE SURE to enter in myHD using myHD_root (why, because "device busy" is the result when you enter as a user (like astr if for ex. you use the MH-test application) NOT as root (the myHD root)
... for "no such file ... " it's normal when the HDMI exist but is not available for Linux view ...
myHD_root
export DISPLAY=:0
xrandr
ps -eaf

aplay -l
aplay -L

and of the speaker-tests
/myHD_scripts/bin/test_pulse_Intel_config.sh
Last, can you search in /proc/asound folder
... please do "ls" to get the card defined)
... enter the card0 (0 or n) folder and display inside, the eld#2.X (X=0 or 1 ... ) to get the extended EDID information on audio screen ...
ex. my test monitor to show an example of the information returned :

Code: Select all

root@AS5002TAPHIL:/proc/asound/card0# cat eld#2.0
monitor_present         1
eld_valid               1
monitor_name            H19201080
connection_type         HDMI
eld_version             [0x2] CEA-861D or below
edid_version            [0x3] CEA-861-B, C or D
manufacture_id          0x7450
product_id              0x216
port_id                 0x0
support_hdcp            0
support_ai              0
audio_sync_delay        0
speakers                [0x1] FL/FR
sad_count               1
sad0_coding_type        [0x1] LPCM
sad0_channels           2
sad0_rates              [0xe0] 32000 44100 48000
sad0_bits               [0xe0000] 16 20 24
root@AS5002TAPHIL:/proc/asound/card0#
I can't debug we limited result .
Philippe.
N.B. starting on Sunday I will be out (or with limited access) internet connection, so please be patient.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
jojeta
Posts: 26
Joined: Thu Jul 31, 2014 9:47 pm

Re: [myHD 0.9.4] Application server for Kodi, Plex, etc. on Ubuntu 1604/1804

Post by jojeta »

Hi
Sorry I was not log on as root, I have limited knowledge on Linux, I don't know have to change user please help.
jojeta
Posts: 26
Joined: Thu Jul 31, 2014 9:47 pm

Re: [myHD 0.9.4] Application server for Kodi, Plex, etc. on Ubuntu 1604/1804

Post by jojeta »

herby the test as root I can't change user at myHD test it can't accept password(I googele have to), but here from ssh connection

Test will loop 3 times ... so just wait
remember the couple X,Y where sound is played ...
Please enter target format X,Y : 0,3

speaker-test 1.1.3

Playback device is hw:0,3
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 32 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
0 - Front Left
1 - Front Right
Time per period = 2.731108
0 - Front Left
1 - Front Right
Time per period = 2.986639
0 - Front Left
1 - Front Right
jojeta
Posts: 26
Joined: Thu Jul 31, 2014 9:47 pm

Re: [myHD 0.9.4] Application server for Kodi, Plex, etc. on Ubuntu 1604/1804

Post by jojeta »

root@AS-6302T:~# xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 698mm x 392mm
1920x1080 60.00*+ 59.94 24.00 23.98
1920x1080i 60.00 59.94
1280x720 60.00 59.94
720x480 60.00 59.94
640x480 60.00 59.94
ASUSTOR 4k resolution 30Hz 30.00
ASUSTOR 4k resolution 60Hz 60.00
HDMI2 disconnected (normal left inverted right x axis y axis)

root@AS-6302T:~# ps -eaf
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 Jul05 pts/1 00:00:00 /bin/bash
root 69 1 0 Jul05 ? 00:00:00 /usr/sbin/cron
message+ 89 1 0 Jul05 ? 00:00:00 /usr/bin/dbus-daemon --system
root 96 1 0 Jul05 ? 00:00:00 /usr/sbin/dropbear -p 6222 -W 6
admin 151 1 0 Jul05 ? 00:00:00 /bin/bash /myHD_scripts/bin/mys
astr 167 1 0 Jul05 ? 00:00:00 /bin/bash /myHD_scripts/bin/mys
root 1253 96 0 10:49 ? 00:00:00 /usr/sbin/dropbear -p 6222 -W 6
astr 1254 1253 0 10:49 ? 00:00:00 /bin/sh /myHD_scripts/Apps/MH_t
astr 1256 1254 0 10:49 ? 00:00:00 /usr/bin/xterm -title test usin
astr 1257 1256 0 10:49 pts/2 00:00:00 /bin/bash
root 1276 96 0 11:25 ? 00:00:00 /usr/sbin/dropbear -p 6222 -W 6
root 1277 1276 0 11:25 pts/4 00:00:00 -bash
root 1299 1277 0 11:46 pts/4 00:00:00 ps -eaf

root@AS-6302T:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC887-VD Digital [ALC887-VD Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0

root@AS-6302T:~# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
default:CARD=PCH
HDA Intel PCH, ALC887-VD Analog
Default Audio Device
sysdefault:CARD=PCH
HDA Intel PCH, ALC887-VD Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
Front speakers
surround21:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Digital
IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=PCH,DEV=0
HDA Intel PCH, HDMI 0
HDMI Audio Output
hdmi:CARD=PCH,DEV=1
HDA Intel PCH, HDMI 1
HDMI Audio Output
hdmi:CARD=PCH,DEV=2
HDA Intel PCH, HDMI 2
HDMI Audio Output
dmix:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
Direct sample mixing device
dmix:CARD=PCH,DEV=1
HDA Intel PCH, ALC887-VD Digital
Direct sample mixing device
dmix:CARD=PCH,DEV=3
HDA Intel PCH, HDMI 0
Direct sample mixing device
dmix:CARD=PCH,DEV=7
HDA Intel PCH, HDMI 1
Direct sample mixing device
dmix:CARD=PCH,DEV=8
HDA Intel PCH, HDMI 2
Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
Direct sample snooping device
dsnoop:CARD=PCH,DEV=1
HDA Intel PCH, ALC887-VD Digital
Direct sample snooping device
dsnoop:CARD=PCH,DEV=3
HDA Intel PCH, HDMI 0
Direct sample snooping device
dsnoop:CARD=PCH,DEV=7
HDA Intel PCH, HDMI 1
Direct sample snooping device
dsnoop:CARD=PCH,DEV=8
HDA Intel PCH, HDMI 2
Direct sample snooping device
hw:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
HDA Intel PCH, ALC887-VD Digital
Direct hardware device without any conversions
hw:CARD=PCH,DEV=3
HDA Intel PCH, HDMI 0
Direct hardware device without any conversions
hw:CARD=PCH,DEV=7
HDA Intel PCH, HDMI 1
Direct hardware device without any conversions
hw:CARD=PCH,DEV=8
HDA Intel PCH, HDMI 2
Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
HDA Intel PCH, ALC887-VD Digital
Hardware device with all software conversions
plughw:CARD=PCH,DEV=3
HDA Intel PCH, HDMI 0
Hardware device with all software conversions
plughw:CARD=PCH,DEV=7
HDA Intel PCH, HDMI 1
Hardware device with all software conversions
plughw:CARD=PCH,DEV=8
HDA Intel PCH, HDMI 2
Hardware device with all software conversions

I can't do /proc/asound
login as: root
Using keyboard-interactive authentication.
Password:
root@AS-6302T:/volume1/.@root # /proc/asound
-sh: /proc/asound: Permission denied
root@AS-6302T:/volume1/.@root # myHD_root
root@AS-6302T:~# /proc/asound
-bash: /proc/asound: Is a directory
root@AS-6302T:~# cd proc
-bash: cd: proc: No such file or directory
User avatar
father.mande
Posts: 1810
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [myHD 0.9.4] Application server for Kodi, Plex, etc. on Ubuntu 1604/1804

Post by father.mande »

Hi,

The problem is : Asustor Linux is NOT a pure Linux box, so I can't manage automatically some specific things like Audio configuration (differ (or not) for each Asustor series)

Yes MH-test is blocked to a user (astr) only to preserve security, but from admin or root (root is better) user in an A.D.M. terminal (A.D.M. ssh) is authorized
So for this specific actions ... open a ssh connection to A.D.M. ssh server using root and your_admin_password ... then use myHD_root to enter as root.

So the Playback device is : hw:0,3

Now you have to do the change in pulseaudio configuration as comment explain

Code: Select all

Please enter target format X,Y :
now you have the device value to configure in default.pa (pulseaudio)

in user default.pa ~/.config/pulse/default.pa (eventually in system /etc/pulse/default.pa)
REPLACE line :
load-module module-alsa-sink device=hw:0,3 (or what else in place of hw:0,3)
by :
load-module module-alsa-sink device=hw:X,Y

Now pulseaudio can works
If sound works with test (as I expect)
To do it :
connect as astr user (or use MH-test] and change the value indicated
myHD_user astr
cd .config/pulse

... edit default.pa (use your preferred editor)
... search line with "load-module module-alsa-sink"
... uncomment it if commented (# at first character)
... change end of line to obtain line (here with your value) :
load-module module-alsa-sink device=hw:0,3
... write and quit editor

At this point is enough BUT you can change (same) the system default.pa in /etc/pulse/default.pa BUT as root user .
This is for future application if the dev. use the system default.pa and not the user one ...

Philippe.
NB for other problems of specific question, open a new topics in myHD sub-forum to don't add line in this ... reserved for announcement and installation phase ... Thanks
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
User avatar
father.mande
Posts: 1810
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [myHD 0.9.4] Application server for Kodi, Plex, etc. on Ubuntu 1604/1804

Post by father.mande »

Hi,

to enter in a folder you must use cd ...
so sequence is :
cd /proc/asound
ls -l

... if card0 exist or read PCH -> cardX to determine card used
cd card0
cat eld#2.0

... if empty (or just 2 lines)
cat eld#2.1

Philippe.
If you have to many problem to edit the pulseaudio file ... I can send you a modified file (but not sure when I can ... I leave my labs in few time) ... but it's better if you take time to understand basic Linux command and file editor (vi) for the future ...
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
Post Reply

Return to “myHD”