[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.
Post Reply
jojeta
Posts: 26
youtube meble na wymiar Warszawa
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 Phillipe
Sorry for dooing it wrong topics do you whant me to do a new topics?
I managed to understand basic Linux, a lot of google :D and I found the astr user was correct but there was no setting in root user so I added,but still no sound when netflix.

John
User avatar
father.mande
Posts: 1817
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,

Did you hear sound after the speaker test ?
DID YOU RESTART myHD
F.Y.I. root is NEVER use to start any application ... only basic services.

please can you :
open a terminal and enter in myHD : myHD_root
do : ps -eaf
start on TV screen Asportal / Netflix
redo : ps -eaf and search for a pulseaudio server started (spawned)

If not Monday (I am starting in travel) I will explain you how to force pulseaudi in MH-netflix starting script.

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 Phillipe
No I don't hear anything but it stats that it test with 48000hz that I can't hear.
Herby result:
t
Using keyboard-interactive authentication.
Password:
root@AS-6302T:/volume1/.@root # cd ..
root@AS-6302T:/volume1 # cd ..
root@AS-6302T:/ # myHD_root
root@AS-6302T:~# ps -eaf
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 08:57 pts/1 00:00:00 /bin/bash
root 69 1 0 08:57 ? 00:00:00 /usr/sbin/cron
message+ 89 1 0 08:57 ? 00:00:00 /usr/bin/dbus-daemon --system
root 96 1 0 08:57 ? 00:00:00 /usr/sbin/dropbear -p 6222 -W 65
admin 151 1 0 08:57 ? 00:00:00 /bin/bash /myHD_scripts/bin/myse
astr 167 1 0 08:57 ? 00:00:00 /bin/bash /myHD_scripts/bin/myse
root 201 96 0 18:07 ? 00:00:00 /usr/sbin/dropbear -p 6222 -W 65
root 202 201 0 18:07 pts/3 00:00:00 -bash
root 210 202 0 18:07 pts/3 00:00:00 ps -eaf
root@AS-6302T:~# ps -eaf
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 08:57 pts/1 00:00:00 /bin/bash
root 69 1 0 08:57 ? 00:00:00 /usr/sbin/cron
message+ 89 1 0 08:57 ? 00:00:00 /usr/bin/dbus-daemon --system
root 96 1 0 08:57 ? 00:00:00 /usr/sbin/dropbear -p 6222 -W 65
admin 151 1 0 08:57 ? 00:00:00 /bin/bash /myHD_scripts/bin/myse
astr 167 1 0 08:57 ? 00:00:00 /bin/bash /myHD_scripts/bin/myse
root 201 96 0 18:07 ? 00:00:00 /usr/sbin/dropbear -p 6222 -W 65
root 202 201 0 18:07 pts/3 00:00:00 -bash
root 211 96 0 18:10 ? 00:00:00 /usr/sbin/dropbear -p 6222 -W 65
astr 212 211 0 18:10 ? 00:00:00 /bin/bash /myHD_scripts/Apps/MH_
astr 214 212 9 18:10 ? 00:00:04 /usr/bin/google-chrome --no-sand
astr 220 214 0 18:10 ? 00:00:00 cat
astr 221 214 0 18:10 ? 00:00:00 cat
astr 226 214 0 18:10 ? 00:00:00 /opt/google/chrome/chrome --type
astr 229 226 0 18:10 ? 00:00:00 /opt/google/chrome/nacl_helper -
astr 251 214 6 18:10 ? 00:00:03 /opt/google/chrome/chrome --type
astr 349 214 15 18:10 ? 00:00:07 /opt/google/chrome/chrome --type
astr 365 226 45 18:10 ? 00:00:20 /opt/google/chrome/chrome --type
astr 511 226 0 18:11 ? 00:00:00 /opt/google/chrome/chrome --type
astr 521 226 0 18:11 ? 00:00:00 /opt/google/chrome/chrome --type
astr 608 1 2 18:11 ? 00:00:00 /usr/bin/pulseaudio --start --lo
root 647 202 0 18:11 pts/3 00:00:00 ps -eaf
John
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 did the test one more time and got more info?
root@AS-6302T:~# ps -eaf
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 08:57 pts/1 00:00:00 /bin/bash
root 69 1 0 08:57 ? 00:00:00 /usr/sbin/cron
message+ 89 1 0 08:57 ? 00:00:00 /usr/bin/dbus-daemon --system
root 96 1 0 08:57 ? 00:00:00 /usr/sbin/dropbear -p 6222 -W 65536
admin 151 1 0 08:57 ? 00:00:00 /bin/bash /myHD_scripts/bin/myserv_user
astr 167 1 0 08:57 ? 00:00:00 /bin/bash /myHD_scripts/bin/myserv_user
root 201 96 0 18:07 ? 00:00:00 /usr/sbin/dropbear -p 6222 -W 65536
root 202 201 0 18:07 pts/3 00:00:00 -bash
root 697 202 0 18:25 pts/3 00:00:00 ps -eaf
root@AS-6302T:~# ps -eaf
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 08:57 pts/1 00:00:00 /bin/bash
root 69 1 0 08:57 ? 00:00:00 /usr/sbin/cron
message+ 89 1 0 08:57 ? 00:00:00 /usr/bin/dbus-daemon --system
root 96 1 0 08:57 ? 00:00:00 /usr/sbin/dropbear -p 6222 -W 65536
admin 151 1 0 08:57 ? 00:00:00 /bin/bash /myHD_scripts/bin/myserv_user
astr 167 1 0 08:57 ? 00:00:00 /bin/bash /myHD_scripts/bin/myserv_user
root 201 96 0 18:07 ? 00:00:00 /usr/sbin/dropbear -p 6222 -W 65536
root 202 201 0 18:07 pts/3 00:00:00 -bash
root 698 96 0 18:25 ? 00:00:00 /usr/sbin/dropbear -p 6222 -W 65536
astr 699 698 0 18:25 ? 00:00:00 /bin/bash /myHD_scripts/Apps/MH_netflix.sh
astr 701 699 12 18:25 ? 00:00:03 /usr/bin/google-chrome --no-sandbox -test-type --app=https://www.netflix.com/
astr 707 701 0 18:25 ? 00:00:00 cat
astr 708 701 0 18:25 ? 00:00:00 cat
astr 711 701 0 18:25 ? 00:00:00 /opt/google/chrome/chrome --type=zygote --no-sandbox --enable-crash-reporter=f35e9f67-ecad-4554-96a0-5244d120b139,
astr 712 711 0 18:25 ? 00:00:00 /opt/google/chrome/nacl_helper --no-sandbox
astr 737 701 8 18:25 ? 00:00:02 /opt/google/chrome/chrome --type=utility --field-trial-handle=14702905690390761594,7891834166086561316,131072 --lang=en-US --service-sandbox-
astr 836 701 16 18:25 ? 00:00:04 /opt/google/chrome/chrome --type=gpu-process --field-trial-handle=14702905690390761594,7891834166086561316,131072 --no-sandbox --enable-crash
astr 844 711 54 18:25 ? 00:00:15 /opt/google/chrome/chrome --type=renderer --no-sandbox --test-type --field-trial-handle=14702905690390761594,7891834166086561316,131072 --lan
astr 864 711 2 18:25 ? 00:00:00 /opt/google/chrome/chrome --type=renderer --no-sandbox --test-type --field-trial-handle=14702905690390761594,7891834166086561316,131072 --lan
astr 969 711 1 18:25 ? 00:00:00 /opt/google/chrome/chrome --type=renderer --no-sandbox --test-type --field-trial-handle=14702905690390761594,7891834166086561316,131072 --dis
astr 982 711 0 18:26 ? 00:00:00 /opt/google/chrome/chrome --type=utility --field-trial-handle=14702905690390761594,7891834166086561316,131072 --lang=en-US --service-sandbox-
astr 1066 1 2 18:26 ? 00:00:00 /usr/bin/pulseaudio --start --log-target=syslog
astr 1103 711 0 18:26 ? 00:00:00 /opt/google/chrome/chrome --type=utility --field-trial-handle=14702905690390761594,7891834166086561316,131072 --lang=en-US --service-sandbox-
root 1107 202 0 18:26 pts/3 00:00:00 ps -eaf
User avatar
father.mande
Posts: 1817
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,

Hum! ... no idea all is similar to my own in AS5002T ... pulseaudio is started as well ... so ???

F.Y.I.
I have post a short explain to run Netflix (using an addon in MH-kodi18 (or 19), so if you have sound in Kodi ... a workaound.

can you provide the result of dmesg command just after problem ... in case pulseaudio have problem ... it's write in syslog .
BUT if speaker-test works as well and if you do the modification (if need) in default.pa in "astr" HOME and /etc (of myHD) ???

I have no more idea to debug without a similar model in front of me (Audio is difficult near impossible to report using a remote access)
Eventually you can try to ask to Asustor support (because they can test and debug on same model) ... but not sure they accept to work on a non Asustor APKG .

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
User avatar
father.mande
Posts: 1817
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,

Following some search about 18.04 and Chrome sound, can you try to (because MH-netflix and MH-chrome sound work as well in my AS5002T ... so I can't see difference):
Chrome or any MH-xxx applications NOT started (on HDMI screen)
open a ssh connection as root / your_admin_password
enter in myHD as astr user :
myHD_user astr
EDIT file .config/pulse/default.pa
change :
load-module module-stream-restore
to :
load-module module-stream-restore restore_device=false

exit
then restart myHD (it's more to be sure than all is inactive than a real necessity)
myHD restart
then test again
Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
elvanor
Posts: 3
Joined: Mon Aug 05, 2019 11:34 pm

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

Post by elvanor »

Hello, I recently updated my NAS to ADM 3.4.1. I should not have, since it prevented me from running Kodi 17.6 and also introduced a bug (probably in kernel) where the NAS is unable to connect at 4K resolution to the TV screen that I use.
To mitigate it, I found out about myHD while trying to reinstall Kodi, and I really liked the idea / project. I installed it, here is my feedback and questions:

1/ First the web UI is not working. When I click on the icon in ADM interface, nothing happens. Not that much of a deal since I can use command line myHD command without problem, but still wanted to report.
2/ Kodi 18 was installed fine, however sound did not work with default PulseAudio interface. I changed it in Kodi to use direct HDMI PCH and it works, so I have a workaround, but if possible I'd like to use the system PulseAudio interface (on Kodi 17.6 it worked fined).
3/ Main problem that I would like to solve (apart from the 4K resolution problem, but I opened a ticket with Asustor for that, since it does not concern myHD): when I shut down the TV and turn it on one day later, sometimes the HDMI connection seems lost and there is no signal on the TV. I can reset the signal by performing a resolution change on ADM Portal application, but then the Kodi application running through myHD disappears from focus (it shows portal interface). Is there a way to bring back to focus the Kodi window? Else I have to restart myHD everytime which is not convenient.

Also, does someone know how to restart X on the NAS without doing a full reboot? Would be useful to try out various Xorg.conf files to try to fix the 4K problem (although I believe it is related to the Intel graphics driver, so probably impossible to fix via Xorg).

Jean-Noel
User avatar
father.mande
Posts: 1817
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,

Some points are already discuss in the forum ...
summary :
1 ... to use myHD web ... you need to validate Web server (web admin use another server NOT open for private web interface)
... so validate Apache web server in service ... restart myHD (myHD add configuration for security) (command : myHD restart)
... remember to use (you acn change it later) credential : myhd / asusfr1 to access Web UI
2) ... using pulseaudio require a complementary configuration adapted to each model ... follow the tips & tricks advice
... shortly connect to myHD as root (myHD_root) and use script to test and validate pulseaudio : /myHD_scripts/bin/test_pulse_Intel_config.sh
... at end you get information to change in user environment to be able to use pulseaudio
... THIS is due to the fact that it's the default Ubuntu delivery (so 18.3) BUT not build as Asustor or "standard" APKG specifically for Asustor NAS ... so require some more configuration (one time)
... ALSA is always better in Kodi if you need to use pass-through (AVR or ... )
3) I never test this situation ... because I keep an HDMI plug pass-through at back of each NAS to be able to use Xvnc_server to access Asportal and Applications for functionnal test (for ex. I test Kodi19 (without sound due to vnc protocol) from my PC at 600 kms of my labs using a VPN ... so for an integrator it's a good first test approach ...
When I will go back to my lab ... I will try to run a test ...
... but using xrandrd --auto HDMIx (x depend of your system) can awake Xorg
... restarting MH-kodi18 as any APKG must be also enough

... to change Xorg or restart it ... it's also an APKG so you can ever use App. Central or usual script /usr/local/AppCentral/xorg(or any APKG name)/CONTROL/start-stop.sh start|stop|restart depend of your request
... if Asportal don't restart ... do the same after restarting Xorg
... take care that the start-stop script can change your terminal environment and generate error using some tools, so do it in a separate terminal if you want to works in parallel .

myHD application MH-xxxx are in fact only "launcher in Asportal to application in myHD" ... so generally don't need to be restarted or enabled again (it's just basic shell script created by an APKG generator)

N.B. myHD use an embedded Ubuntu 18.04 LTS with video acceleration 2.1 (compare to 1.7 provide by Asustor) so if your codec (use vainfo in myHD to get information) is able to accelerate 4k ... you can use it (if hardware support it) be sure to use good cable and you must understand that power supply by HDMI NAS plug is low ... so short is the cable better is the result.
NB1 please consider that I own only ONE NAS with HDMI from Asustor ... so I don't know and test all models ...
Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
User avatar
father.mande
Posts: 1817
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

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

Post by father.mande »

Hi,

I am please to announce the availability of myHD V. 1.0.0
[Version]
1.0.0
... MAJOR release (available for update from 0.9 or fresh install) DON'T FORGOT TO PRE-DOWNLOAD env. TO REDUCE INSTALLATION TIME as before
==== specific posts to explain new point will be write in few time
... solve bugs (as usual)
... more than 1000 lines of code have been added or updated (on more of 5000) ...
... myHD now use its own Linux loader and libc (2.27) to workaround delivery Asustor libc without all namespace functions.
... Due to new libc, default method to enter in myHD environment use "associate terminal to namespace" in place of ssh (with secure keys) via myHD_root and myHD_user command
... ... ssh can be use (for any reason) with 2 new ADDED command : myHD_root_ssh and myHD_user_ssh
... ... in very few case using namespace attachment without tty name associated, can generate problems (I don't fall in this case), so workaround is to use myHD_root_ssh or myHD_user_ssh, or in namespace install a terminal multiplexer like tmux (my preferred)
... ADD basic "Application Web STORE" for MH-xxx MH16-xxx and MH18-xxx companion application for myHD
... ... using myHD command or WebUI you can get list of the last available applications and version
... ... using myHD command or WebUI you can install (as if you use App. Central) the corresponding MH application for a specific version ... new or update
... ... purpose is to reduce the search in the forum for application EVEN it's ALWAYS better to read specific post for each application.
... ... Enable/Disable/Remove stay in App. Central or using Asustor command line method.
... ADD autorun mechanism internal to myHD (define using myHD command or WebUI.
... ... if you use Asportal autorun, this is ignored, if not this autorun start AFTER myHD is started, the purpose is to solve "race condition" due to the start of myHD AFTER Asportal ... so after (some time) the Asportal autorun mechanism.
... ADD coloration in WebUI to have a better visibility and to be similar to myHD command output.
... Rewrite kernel modules management in myHD to use Asustor (busybox) modules tools in case the added (require) modules for myHD are already provide by Asustor
... ADD an ALPHA version of switch from ACTUAL isolated environment based on BASH to isolated environment based on SYSTEMD INIT
... ... it's an ALPHA testing possibility for Ubuntu confirmed or expert user ... the purpose at end is to have a FULL UBUNTU environment including systemd management
... ... even it works ... I have on my system problem with AUDIO ... certainly my fault ... but for the moment I can't move to this approach, opening ALPHA (require myHD command) to better specialist, I hope, can help me to solve problems.
... ... switching from BASH mode to SYSTEMD INIT mode don't break your Ubuntu environment nor your myHD application, switching back is always possible.
Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
User avatar
father.mande
Posts: 1817
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [myHD 1.0.1] Application server for Kodi, Plex, etc.

Post by father.mande »

Hi,

I am please to announce myHD 1.0.1
[Version]
1.0.1
... Minor update (but solving problems)
... Suppress a problem with certain A.D.M. release : "'0' is not a valid user" when starting myHD , Thanks to Rodeur54
... ADD support for shared resource using space in the name ex. "Video & Sound" (request from Rodeur54 )
... ... ATTENTION not sure all special characters are supported, so be prudent and my suggestion is : use simple name for your shared resource and replace space by "_" for ex.
... ... this is solved in myHD command line AND in WebUI using a new approach (so rewrite) to bypass HTML character escape and also C language escape.
... CHANGE APKG webUI management to Web store to reflect Ubuntu version support, so only MH-xxx and MH16-xxx are proposed for Ubuntu 1604 and MH-xxx and MH18-xxx for 1804
... ADD detail in WebUI Web Store like "comment", myHD version require, and if APKG is already installed
... ... installing an APKG already installed (WebUI) ... do an update or redo a fresh install REMEMBER MHyyyyyy APKG are launcher for Asportal , so your settings, data are not lost. (even after uninstall)
change in the post ... by adding a "short" install How-to
[Suggested installation procedure]
... detail are in [Installation] section hereafter
1) Enable the Web server in A.D.M. Admin Web UI to use myHD WebUI (if not only command line works)
1) pre-download Ubuntu using the shell script provide at bottom (large files) to reduce installation time and suppress future Internet access problem. (default Ubuntu 18.04)
2) download myHD APKG and install it (so a little long but less than if download must be done by the APKG ... when you don't use pre-downloader shell
3) Install MH-xxx and / or MH16-xxx (Ubuntu 16.04) or MH18-xxx for 18.04 (default)
... using file apk provide hereafter at bottom
... using direct Web Store (require Internet) in the WebUI
==== REMEMBER uninstalling myHD using App.Central or apkg manual command DON'T LOST Ubuntu environment, nor your settings
==== So installing again myHD on an existing environment get you back Data, Software and Settings ... only launcher MHxx-yyy need to be reinstalled (except if you use apkg command line)
Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
Post Reply

Return to “myHD”