<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Thanks for your reply Stéphane.</div><div><br></div><div>Using udevadm monitor I observed KERNEL events propagating inside the container when the controller was attached (I imagined this was because the container is running in privileged mode), so I thought there might be a way to manually create a uevent inside the container using these.</div><div><br></div><div>Grateful for your advice, I will return the GUI functions of my system to the host level :)</div><div><br></div><div>Michael.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">---------- Forwarded message ----------<br>From: "Stéphane Graber" <<a href="mailto:stgraber@ubuntu.com">stgraber@ubuntu.com</a>><br>To: LXC users mailing-list <<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>><br>Cc: <br>Bcc: <br>Date: Tue, 26 Sep 2017 09:06:45 -0400<br>Subject: Re: [lxc-users] Steam BPM X360 controller detection inside container<br>On Sat, Sep 23, 2017 at 01:04:41PM +1000, Michael Honeyman wrote:<br>
> Hi lxc-users,<br>
><br>
> I'm hoping someone wise can help me with some ideas how to solve this<br>
> problem.<br>
><br>
> I've been having fun trying to get Steam in Big Picture Mode working inside<br>
> a LXD privileged container. The host is Ubuntu 16.04, as is the guest. I<br>
> have almost everything working (albeit slightly manually) inside the LXD<br>
> container including audio, video, and X360 wireless controller pass-through.<br>
><br>
> My final challenge is with the addition of X360 wireless controllers during<br>
> execution of Steam. It will pick up controllers that were activated prior<br>
> to starting Steam, but once inside Steam BPM, a new controller or a<br>
> reconnected controller will not work until Steam is closed and re-launched.<br>
> If I start Steam, connect a controller (which then doesn't work in the<br>
> Steam interface), and then launch a game - the controller works inside the<br>
> game. So each time a new Steam executable is launched it will pick up the<br>
> newly attached controllers for that instance.<br>
><br>
> I'm searching for some advice on what mechanism(s) Steam might be using to<br>
> detect newly added controllers, or how I might find out what it uses. I'm<br>
> hoping that if I can find out what Steam is expecting upon addition of a<br>
> new controller I can hopefully manually trigger that event inside the<br>
> container. My uninformed guess is Steam hooks into udev, but since udev<br>
> does not run inside containers this event is getting missed. But I'm not<br>
> really sure how to go about testing this theory, or any other methods it<br>
> might use.<br>
><br>
> I realise this setup is very much on the fringe of the LXD use-case, so I'm<br>
> not hoping to find someone who has already solved this problem, just any<br>
> tips people can share to help me find the answer myself.<br>
><br>
> Thanks in advance for any help and guidance rendered!<br>
><br>
> Michael.<br>
<br>
My guess is that steam is looking for a hotplug uevent for the USB<br>
device, using this to detect when a device is plugged in after startup.<br>
<br>
Unfortunately containers don't receive uevents when a device is<br>
hotplugged, so if that's what steam's doing, you're out of luck for now.<br>
<br>
--<br>
Stéphane Graber<br>
Ubuntu developer<br>
<a href="http://www.ubuntu.com" rel="noreferrer" target="_blank">http://www.ubuntu.com</a><br><br></blockquote></div></div></div>