Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin? #17

Open
ich777 opened this issue Jul 30, 2022 · 23 comments
Open

Plugin? #17

ich777 opened this issue Jul 30, 2022 · 23 comments

Comments

@ich777
Copy link

ich777 commented Jul 30, 2022

Hey!
May I ask for what this plugin actually is, haven't spent much time to looking through your code, do you have a support thread on the Unraid Forums for this plugin?

Please note that the uinput part of this plugin isn't needed anymore after or better speaking with the release of Unraid 6.11.0-rc1

May I also ask why are you installing the Nvidia 32-bit libraries when they are already included in the Nvidia-Driver plugin?
Another thing that you should look into is that it seems to me that somehow your plugin always downloads the Nvidia Driver on boot or am I wrong about that?

Edit: Oh before I forget there was already a uinput plugin out there which actually was working with another container that enabled to play games in Docker.

BTW I've now gone a bit more through your code and you documentation, it's actually for your container. I would strongly recommend to consider creating a template for the CA App as pointed out in #8
If you need help feel free to contact me. ;)

Edit2: Here is the other container that is already available in the CA App in Unraid to run Steam in Docker from @Josh5 :
grafik

@Josh5
Copy link

Josh5 commented Jul 30, 2022

I think the issue with the unraid templates are that they are designed around running a single docker container. GoW is designed to be modular and run each required process in its own container (the way that Docker is designed to be used). I guess the plugin was a way to wrap up the multiple containers and host dependencies into a single config.

Also more than happy to help get GoW to an easy-to-install state for unraid! Steam headless is cool for steam games and using only steam link, but if you want sunshine, you really should look to GoW!

@ABeltramo
Copy link
Member

Please @zb140 correct me if anything is wrong.

Please note that the uinput part of this plugin isn't needed anymore after or better speaking with the release of Unraid 6.11.0-rc1

Oh before I forget there was already a uinput plugin out there which actually was working with another container that enabled to play games in Docker.

This was created before the uinput plugin was available and before Unraid 6.11.0-rc1; at the time we had to create this plugin ourselves.

May I ask for what this plugin actually is

It's a starting point, since uinput was missing and compiling it from scratch isn't a simple task @zb140 created this plugin in order to have a very simple way to be able to start GOW. Ideally this plugin should be a "frontend" for Unraid so that you can start/stop/pull the containers that you want to run.

As @Josh5 correctly pointed out we have a composition of containers, which is "the docker way" of building things: small independent units that can work together. While we have Steam and RetroArch in our repo it's trivial to run a Firefox container that isn't even made by us (read more in the docs).

This is all very WIP if you guys want to help out pull requests are very welcome!

@ich777
Copy link
Author

ich777 commented Jul 30, 2022

@Josh5 I really haven't looked any further into how GoW works but wouldn't it be an idea to create templates for the individual containers in the CA App too where the description mentions what is needed and with some kind of base container, at least in addition to the plugin? Or if it's better to only to publish the plugin then simply make it available on the CA App, just an idea from my side.

@ABeltramo Oh okay, I didn't even noticed that this container/plugin exists...
Only noticed it today because I've got a support request that something isn't working with the Nvidia driver and while going through the syslog I saw this plugin.

I would strongly recommend that you get it in the CA App itself from Unraid and also to maybe open up a proper support thread or at least point to this Issue tracker here on GitHub, even if this plugin is still in beta (you can mark it as BETA in the CA App too).

The other thing is about the 32bit support, the driver that I compile for each Kernel version should include the 32bit libraries, is something missing? If yes, I'm happy to add the missing parts but from what I know everything should be included in the Nvidia Driver packages, at least I hope so...

About "the docker way", I really don't know what this even means nowadays... but I get your point. ;)

@zb140
Copy link
Collaborator

zb140 commented Jul 30, 2022

May I ask for what this plugin actually is, haven't spent much time to looking through your code, do you have a support thread on the Unraid Forums for this plugin?

Hi! Like @ABeltramo said, the ultimate goal is to have the plugin provide a UI that will make it very easy to start and stop the containers, add new ones, etc. Progress on that aspect has been much slower than I would like 😄

I haven't created a support thread in the Unraid Forums yet; I've been thinking of the project as being in more of a pre-release state. We haven't published anything related to GoW to CA Apps yet either. I expect we'll do both of those things once it's a little bit more ready for less-technical users.

Please note that the uinput part of this plugin isn't needed anymore after or better speaking with the release of Unraid 6.11.0-rc1

That's awesome!

May I also ask why are you installing the Nvidia 32-bit libraries when they are already included in the Nvidia-Driver plugin?

Has that always been the case? I know when I first started trying to get our setup, and specifically Steam, running on Unraid, , they were not getting automatically loaded into docker containers by the nvidia runtime, but that was well over a year ago. I haven't tried it again since then, but I will -- I would love to be able to remove that step from our process!

Another thing that you should look into is that it seems to me that somehow your plugin always downloads the Nvidia Driver on boot or am I wrong about that?

The nvidia runtime unfortunately does not automatically provide the two Xorg driver files inside the container. From searching through their GitHub this seems to be because they don't want to support containerized Xorg. So by default we download them ourselves, but in the documentation we suggest people should manually mount them into the Xorg container from their host to avoid that penalty and to make sure they're using the same driver as the host.

@ich777
Copy link
Author

ich777 commented Jul 30, 2022

I haven't created a support thread in the Unraid Forums yet;

Doesn't have to be necessarily on the forums, you also could point it to this issue tracker as pointed out above.

Has that always been the case? I know when I first started trying to get our setup, and specifically Steam, running on Unraid, , they were not getting automatically loaded into docker containers by the nvidia runtime, but that was well over a year ago. I haven't tried it again since then, but I will -- I would love to be able to remove that step from our process!

Yes, at least it should be the case, I compile it since I've created the Nvidia-Driver plugin with this.
What exactly is missing or what is needed to make it work properly? I can of course add it.

Haven't gone too deep into the plugin itself since I'm really busy currently.

The nvidia runtime unfortunately does not automatically provide the two Xorg driver files inside the container. From searching through their GitHub this seems to be because they don't want to support containerized Xorg. So by default we download them ourselves, but in the documentation we suggest people should manually mount them into the Xorg container from their host to avoid that penalty and to make sure they're using the same driver as the host.

But is the plugin downloading the driver every time Unraid boots because the rootfs is not persistent across reboots or am I wrong about that?
I think the way to go should be to mount it from the host into the container and this could be done in a CA App template or even through compose I think?
Another way could be to download it once, save it in a specific directory/archive that lists the driver version that it is for and then store that on the USB Boot device along side with the other package files from your plugin and install it on boot if found.

@zb140
Copy link
Collaborator

zb140 commented Jul 30, 2022

Doesn't have to be necessarily on the forums, you also could point it to this issue tracker as pointed out above.

Right now, the support link in the plugin template points to our Discord server, but we can certainly change that to point here, or somewhere else if it would be more useful.

Yes, at least it should be the case, I compile it since I've created the Nvidia-Driver plugin with this.
What exactly is missing or what is needed to make it work properly? I can of course add it.

The issue when I was originally working on it was that even if you specified NVIDIA_DRIVER_CAPABILITIES=compat32, it wasn't automatically mounting the 32-bit drivers into the container. I did some digging and found that the runtime uses dlopen to discover whether the 32-bit drivers are installed before mounting them in, so we downloaded them and added a file to /etc/ld.so.conf.d to tell the system where they are. That's enough to get them into the container.

Anyway, now that I know that they're expected to be present, I will try again and report back on what I find. I'm sure we can get it working without us having to download/install anything extra.

Haven't gone too deep into the plugin itself since I'm really busy currently.

Totally understandable! Thanks for taking the time to comment here; we really appreciate it. We've already got a few changes we can make that will be a noticeable improvement.

But is the plugin downloading the driver every time Unraid boots because the rootfs is not persistent across reboots or am I wrong about that?

Ah! Sorry, I misunderstood your question earlier. Yes, it apparently does currently download the driver on every reboot, but that's a bug I hadn't noticed yet 😄 I had intended to save it on the USB like you suggest. Having said that, the only reason we're downloading it at all is to get the 32-bit drivers, so once we can switch to using the ones provided by Nvidia-Driver, the whole thing will be unnecessary and we won't have to download them at all.

@ABeltramo
Copy link
Member

Can plugins have dependencies between each other?
It would be cool to set our plugin to be dependent on uinput and nvidia-driver so that they'll be downloaded too when installing our plugin and we don't have to duplicate efforts.
Although, now that I think of it, we don't really need Nvidia if we are running on AMD..

@zb140
Copy link
Collaborator

zb140 commented Jul 30, 2022

Plugins can have dependencies so that if you try to install one, the system will tell you you must install other plugins first. I don't think it will automatically download them for you though, but I'm happy to be told I'm wrong about that.

Since the uinput requirement is going away in the next version, and anyone who is using an nvidia card will certainly already have Nvidia-Driver installed, we probably don't need to have a complicated setup. I think it would be fine to just say "pre-6.11, you have to install the uinput plugin".

@zb140
Copy link
Collaborator

zb140 commented Jul 30, 2022

Yes, at least it should be the case, I compile it since I've created the Nvidia-Driver plugin with this.

That sure does look like it should be installing the compat32 libs, but for some reason they don't appear to actually be present on my system. I even downloaded and manually unpacked the built .txz package, but I didn't see them in there... I don't understand why they're not there yet, but I'm doing some more investigation.

@zb140
Copy link
Collaborator

zb140 commented Jul 30, 2022

@ich777 Not urgent, but could you share some details about what kind of environment I would need to set up to be able to run your nvidia driver compile script? I think it might help my investigation into why the 32-bit libs don't seem to be making it onto my system.

@ich777
Copy link
Author

ich777 commented Jul 30, 2022

@ich777 Not urgent, but could you share some details about what kind of environment I would need to set up to be able to run your nvidia driver compile script? I think it might help my investigation into why the 32-bit libs don't seem to be making it onto my system.

@zb140 LOL I've now found what the issue is, don't know if I where the actual issue or something else but I blame me... 😖

Anyways, I'm really happy that you've brought this up and that it is finally solved! 😃

@zb140 do you run Unraid or do you use something else? If you run Unraid, please upgrade to 6.11.0-rc2 if possible and see if this fixes the issue.
I've compiled the two drivers for this version and re-uploaded it here.

BTW I would strongly recommend to upgrade to this version because the drivers are now loaded really early in the boot process and everything changed a bit, but nothing in terms of stability... ;)

Since the uinput requirement is going away in the next version, and anyone who is using an nvidia card will certainly already have Nvidia-Driver installed, we probably don't need to have a complicated setup. I think it would be fine to just say "pre-6.11, you have to install the uinput plugin".

Or maybe release the plugin with a minimum requirement for 6.11.0-rc2 so that you can get actually rid of uinput and the driver download in the plugin, this would solve a lot of your headaches too...

@ABeltramo What do you think about that, I know that we are talking about a rc version but according to Tom it will be a very short RC version because the focus now is on the plugin installation, to do the ground work to support ZFS and this is almost done.
Oh and from my opinion rc versions and even test versions are really tested to be as compatible and bug free as possible even if it is a test version.

@ABeltramo
Copy link
Member

I'm fine with all that, I guess we can just release a new version that requires that rc version in order to be installed and leave the old version as is.

My only concern is that if we remove uinput and the nvidia driver installation there's nothing left as things are now, right?

I guess we should start thinking on how to actually bring the GOW components without having people mess with the terminal..

@zb140
Copy link
Collaborator

zb140 commented Jul 30, 2022

do you run Unraid or do you use something else? If you run Unraid, please upgrade to 6.11.0-rc2 if possible and see if this fixes the issue.

Yep, I'm running Unraid. I'm on 6.10.3 right now but I'll upgrade to 6.11.0-rc2. I can't reboot my server right now but I should be able to give it a try either later today or maybe tomorrow.

My only concern is that if we remove uinput and the nvidia driver installation there's nothing left as things are now, right?

I guess we should start thinking on how to actually bring the GOW components without having people mess with the terminal..

Yes, without the need to install uinput or the 32-bit nvidia drivers, this plugin won't actually be doing anything anymore 😁 This seems like a perfect opportunity to deprecate this version of the plugin and create a new one with a UI that can start/stop containers without a terminal. The initial version could be a quick wrapper around docker-compose, then we can improve it over time. That version would have a minimum OS version of 6.11.0-rc2. I can start working on that.

@zb140
Copy link
Collaborator

zb140 commented Jul 30, 2022

Anyways, I'm really happy that you've brought this up and that it is finally solved! 😃

Me too! I should have reported it back when I initially discovered they were missing, but since Unraid generally doesn't have other 32-bit stuff installed I just figured it was on purpose that they weren't included.

@ich777
Copy link
Author

ich777 commented Jul 30, 2022

Yep, I'm running Unraid. I'm on 6.10.3 right now but I'll upgrade to 6.11.0-rc2. I can't reboot my server right now but I should be able to give it a try either later today or maybe tomorrow.

Please also let me know if the Plugin Update Helper (notifications about not to reboot yet since drivers are currently downloaded) is working.

This seems like a perfect opportunity to deprecate this version of the plugin and create a new one with a UI that can start/stop containers without a terminal. The initial version could be a quick wrapper around docker-compose, then we can improve it over time. That version would have a minimum OS version of 6.11.0-rc2. I can start working on that.

This sounds really good. :)

Me too! I should have reported it back when I initially discovered they were missing, but since Unraid generally doesn't have other 32-bit stuff installed I just figured it was on purpose that they weren't included.

Nope they where supposed to be included, but I've never noticed it because my Steam container at that time which was based on Debian Buster the Nvidia driver was actually installed inside the container too (without the Kernel module) to circumvent the issues with some missing things that you are experiencing... :)

Anyways, thank you for bringing that up and that I was finally able to fix it.

Should I let this issue open for further help if needed from @Josh5 or me or should that issue be closed?

@zb140
Copy link
Collaborator

zb140 commented Jul 31, 2022

Hey @ich777,

I installed 6.11.0-rc2 and the Plugin Update Helper worked perfectly. Also, as far as I can tell, the 32-bit nvidia drivers are now being installed correctly (for instance, libnvidia-glcore.so.515.57 exists in both /usr/lib and /usr/lib64).

Unfortunately, the uinput module doesn't seem to be working for me. The kernel does seem to have been compiled with that module enabled, but it doesn't look like the module actually got installed:

$ uname -r
5.18.14-Unraid
$ grep 'CONFIG_INPUT_UINPUT' /lib/modules/$(uname -r)/build/.config
CONFIG_INPUT_UINPUT=m
$ ls -l /dev/uinput
ls: cannot access '/dev/uinput': No such file or directory
$ find /lib/modules/$(uname -r) -iname \*uinput\*
$

Do you have any thoughts/suggestions?

@ich777
Copy link
Author

ich777 commented Jul 31, 2022

Do you have any thoughts/suggestions?

I will look into this and report that internally and also let you know what‘s going on.

EDIT: I've looked now into this and you are correct, the module is missing (btw the modules for Firewire are also missing that I've requested), I've reported that internally...

I installed 6.11.0-rc2 and the Plugin Update Helper worked perfectly.

Thank you, I have issues with it on my test machine, don't know why, maybe it's a user error or the hardware is simply too old.

@ich777
Copy link
Author

ich777 commented Jul 31, 2022

@zb140 already got a response from Tom that it is fixed in the next release.

@zb140
Copy link
Collaborator

zb140 commented Jul 31, 2022

Excellent, thanks for following up! I'll keep an eye out for when the next release is available.

@ich777
Copy link
Author

ich777 commented Jul 31, 2022

@zb140 Do you need a module for uinput for rc2 or did you already downgrade to 6.10.3?
For me the compilation is done in about 5 minutes.

@zb140
Copy link
Collaborator

zb140 commented Jul 31, 2022

If you have one available, that'd be great! I haven't downgraded yet. Thanks!

@ich777
Copy link
Author

ich777 commented Jul 31, 2022

@zb140 where can I reach you on discord, have a special build for you... :)

@zb140
Copy link
Collaborator

zb140 commented Jul 31, 2022

@ich777 I'm forty2#9911. You're welcome to DM me, or I'm also in the official Unraid server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants