[GAMES] NVIDIA Game Streaming with ODROID

Moderators: odroid, meveric, mdrjr

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread postby meveric » Wed Jan 11, 2017 7:11 am

HateB wrote:I also tried HEVC after adding these lines to /etc/rc.local:

Code: Select all
chmod 666 /dev/amstream_hevc
chmod 666 /dev/amvideo
echo 16 | tee /sys/module/amvdec_h265/parameters/dynamic_buf_num_margin

This shows me that you did not update your installation properly, since these lines are already part of the image if you do a full upgrade as I said.
If you would have done a full upgrade the following lines are already part of rc.local automatically:
Code: Select all
##### MOONLIGHT FIXES #####

chmod 666 /sys/class/graphics/fb0/blank
chmod 666 /sys/class/graphics/fb1/blank

chmod 666 /dev/amstream_hevc
chmod 666 /dev/amvideo
echo 16 > /sys/module/amvdec_h265/parameters/dynamic_buf_num_margin

##### MOONLIGHT FIXES END #####

but since you added them manually, it's very likely that you did not update the image properly.

Which confirms your:
HateB wrote:I suppose there's something seriously wrong with my setup on Odroid but I can't figure it out.


I play 1080p@60 with 25Mbits very fluently on the ODROID C2 using Debian Jessie image with MATE desktop and Kodi installed.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 6482
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread postby HateB » Thu Jan 12, 2017 12:32 am

meveric wrote:This shows me that you did not update your installation properly, since these lines are already part of the image if you do a full upgrade as I said.
If you would have done a full upgrade the following lines are already part of rc.local automatically:
Code: Select all
##### MOONLIGHT FIXES #####

chmod 666 /sys/class/graphics/fb0/blank
chmod 666 /sys/class/graphics/fb1/blank

chmod 666 /dev/amstream_hevc
chmod 666 /dev/amvideo
echo 16 > /sys/module/amvdec_h265/parameters/dynamic_buf_num_margin

##### MOONLIGHT FIXES END #####

but since you added them manually, it's very likely that you did not update the image properly.

Which confirms your:
HateB wrote:I suppose there's something seriously wrong with my setup on Odroid but I can't figure it out.


I play 1080p@60 with 25Mbits very fluently on the ODROID C2 using Debian Jessie image with MATE desktop and Kodi installed.


I did once again clean installation. I did apt-get update && apt-get upgrade && apt-get dist-upgrade first and then I rebooted. Then I installed firmware-ralink for my wifi module. Then I wrote setup-odroid. In setup I installed Mate, kodi and created another user that I'm logged in while using Mate right now. I set up fbturbo while installing desktop. I did apt-get update && apt-get upgrade once more in Mate but it didn't find new packages. I installed moonlight-embedded and as it shows its version to be 2.2.2. when checking moonlight commands in terminal, it's still 2.2.3 when checking with apt-cache show. I checked /etc/rc.local and it shows those 2 first commands under moonlight section and then it shows some other stuff under Kodi. I'll add the rest of the lines again under moonlight because it's not obviously adding them automatically or I'm still missing a library or something.

Another thing that I noticed:

Code: Select all
odroid@odroid-jessie64:/$ moonlight stream -forcehw -1080 -app "Steam" 192.168.1.33
Moonlight Embedded 2.2.2 (SDL;VDPAU;EMBEDDED;PULSE;CEC;AML)
//connecting, setting up resolution etc
starting video stream..OPEN es hevc
codec_init amstream version: 2.0
done
starting audio stream...done
starting input stream...done
returning RTP packet queued for too long
Received OOS audio data (expected 30241, but got 20242)
//this similar situation happens over and over again


And this time I didn't reboot after adding the lines in rc.local but I think the reboot fixed the problem and everything is running very smoothly now. I will inform you if I counter any new problems. Thanks a lot meveric. :)
HateB
 
Posts: 9
Joined: Tue Nov 29, 2016 12:51 am
Location: Finland
languages_spoken: English, Finnish, Swedish
ODROIDs: Odroid C2

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread postby meveric » Thu Jan 12, 2017 12:59 am

HateB wrote:I installed moonlight-embedded and as it shows its version to be 2.2.2. when checking moonlight commands in terminal, it's still 2.2.3 when checking with apt-cache show.

Yes, they sometimes mess up the versioning. It's build against tag 2.2.3 but they forgot to increse the version number of the actual applications. But well since it's working I guess it's something that we can ignore ;)

HateB wrote:I checked /etc/rc.local and it shows those 2 first commands under moonlight section and then it shows some other stuff under Kodi. I'll add the rest of the lines again under moonlight because it's not obviously adding them automatically or I'm still missing a library or something.

I'll check on that, maybe some conditions are wrong and it gets not added automatically.

HateB wrote:I will inform you if I counter any new problems. Thanks a lot meveric. :)

Thanks for the feedback I'll try to fix the issues you found, I will also look into the changes done by @crashoverride to see how to integrate this

@crashoverride you should consider pushing your changes to upstream project as a pull request.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 6482
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread postby crashoverride » Thu Jan 12, 2017 7:10 am

meveric wrote:@crashoverride you should consider pushing your changes to upstream project as a pull request.

With @AreaScout 's assistance, we tried that already. It was not as easy as it sounds. Someone needs to actively test the builds against each supported platform. Otherwise, we end up with the current situation where the build fails on C2 (cmake) or it crashes at startup (ALSA issue). I have attempted to make the patches "upstream friendly" so they can cherry pick should they (or someone else) choose to do so. The original intent of up-streaming was to transfer maintainership. Since this has failed to transpire and I must still maintain Odroid C1/C2 support, there is no benefit to upstreaming. It would require me to test that my patches do not break RPi (or other platforms) before submitting. Rather than assume an additional maintenance burden for platforms that I do not use, I decided to just maintain my own fork as "reference" that anyone is free to use as they see fit with the understanding that it may or may not break non Odroid platforms.
crashoverride
 
Posts: 2334
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread postby meveric » Thu Jan 12, 2017 3:58 pm

crashoverride wrote:Otherwise, we end up with the current situation where the build fails on C2 (cmake)

I've build moonlight on the C2 just a few days ago upstream from moonlight-embedded project without any issues. cmake was working fine.
crashoverride wrote:or it crashes at startup (ALSA issue).

Not sure what ALSA issue you're talking about. I mostly use pulseaudio for moonlight embedded, but a quick test with just ALSA gave the same result.
Both is working fine and I could play games without issues.

crashoverride wrote:I have attempted to make the patches "upstream friendly" so they can cherry pick should they (or someone else) choose to do so. The original intent of up-streaming was to transfer maintainership. Since this has failed to transpire and I must still maintain Odroid C1/C2 support, there is no benefit to upstreaming. It would require me to test that my patches do not break RPi (or other platforms) before submitting. Rather than assume an additional maintenance burden for platforms that I do not use, I decided to just maintain my own fork as "reference" that anyone is free to use as they see fit with the understanding that it may or may not break non Odroid platforms.

Well I'll check your patches when I have a little more time to see where they can improve things. Currently I don't see any issues on the C2 with moonlight upstream, but that could be cause my Nvidia only supports H264 not H265.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 6482
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread postby crashoverride » Thu Jan 12, 2017 4:21 pm

meveric wrote:I've build moonlight on the C2 just a few days ago upstream from moonlight-embedded project without any issues.

The issues are present on the official Ubuntu image.
crashoverride
 
Posts: 2334
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread postby meveric » Thu Jan 12, 2017 4:56 pm

could be an compiler issue, we saw similar effects with Chromium which would not compile correctly under Ubuntu 16.04. Using an older (more stable version) like gcc 4.9 might actually solve this issue.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 6482
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread postby crashoverride » Thu Jan 12, 2017 5:56 pm

Cmake fails on Ubuntu C2 because the aml_libs headers are not installed to the same location as they are on C1. The result is the cmake system fails to identify the platform as AML.

The ALSA issue is a result of a patch for RPi that changed the device name from "default" to "sysdefault". This causes the program to terminate with ALSA mmap not supported errors on C2.

Neither of these issues would be affected by cmake or gcc version. They would only be detected if the build was tested on C2 Ubuntu. It also demonstrates how easy it is to break another platform with changes intended for a different platform.
crashoverride
 
Posts: 2334
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread postby meveric » Thu Jan 12, 2017 7:18 pm

crashoverride wrote:Cmake fails on Ubuntu C2 because the aml_libs headers are not installed to the same location as they are on C1. The result is the cmake system fails to identify the platform as AML.

Ah, I see. Well they are installed in the same location on my Debian builds so that's why I don't have that issue.

crashoverride wrote:The ALSA issue is a result of a patch for RPi that changed the device name from "default" to "sysdefault". This causes the program to terminate with ALSA mmap not supported errors on C2.

Strangely enough that's working on Debian without an issue, but even so it's really not much of an issue since you can either use the moonlight.conf file to define a new default audio device, or simply start moonlight with -audio <device> command.
So that shouldn't be an issue at all.

crashoverride wrote:Neither of these issues would be affected by cmake or gcc version.

Agreed, not related to cmake or gcc, but you made it sound like there was a compiling issue.

crashoverride wrote:They would only be detected if the build was tested on C2 Ubuntu.

So in fact the issue is with the OS not with moonlight or the code.

crashoverride wrote:It also demonstrates how easy it is to break another platform with changes intended for a different platform.

I think it rather shows that the Ubuntu image has quite some issues. The aml_libs package can easily be written like it's done on the C1. That's something mdrjr chose not to do.

And for the ALSA issue:
Here's the output of aplay -L to show the available ALSA devices on my Debian Jessie image:
Code: Select all
$ aplay -L
default
sysdefault:CARD=ODROIDHDMI
    ODROID-HDMI,
    Default Audio Device
as you can see sysdefault points to the HDMI sound device as it should be:
here's a default Ubuntu 16.10 image running on an Intel Machine
with pulse audio enabled
Code: Select all
$ aplay -L
default
    Playback/recording through the PulseAudio sound server
sysdefault:CARD=I82801AAICH
    Intel 82801AA-ICH, Intel 82801AA-ICH
    Default Audio Device

without pulse audio
Code: Select all
$ aplay -L
default:CARD=I82801AAICH
    Intel 82801AA-ICH, Intel 82801AA-ICH
    Default Audio Device
sysdefault:CARD=I82801AAICH
    Intel 82801AA-ICH, Intel 82801AA-ICH
    Default Audio Device

As you can see on "NORMAL" images sysdefault points to the sound card (and right device) of the system.

So I'd say it's not the change on moonlight that broke something, but rather the way the HardKernel Ubuntu image differs from most other image out there.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 6482
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread postby crashoverride » Thu Jan 12, 2017 8:05 pm

A better synopsis is that upstream does not test Odroid C2 and I do not test RPi. With separate repos, someone will have to test the code submitted to them and I will have to test the code pulled from them. Everyone wins because the software works for the intended target platform. If anyone wishes to take on maintainership and testing for Odroid, I will gladly defer to them. I reluctantly do it because nobody is. ;)
crashoverride
 
Posts: 2334
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread postby HealerKeeper » Tue Feb 14, 2017 10:17 pm

So from what I read in this thread you can do
Code: Select all
apt-get install moonlight-embedded
on debian with a c2? Is it possible to add the same repo to the ubuntu 16.04 image of the c2?
HealerKeeper
 
Posts: 4
Joined: Fri Oct 21, 2016 12:47 am
languages_spoken: english

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread postby meveric » Tue Feb 14, 2017 10:26 pm

I don't think so, some of the dependencies are specific to Debian, and you would have to install some manual packages. I think it was already discussed in this thread.. Try to read the last two pages here I think someone already tried and failed using it on Ubuntu.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 6482
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Previous

Return to Games and Emulators

Who is online

Users browsing this forum: No registered users and 1 guest