<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(17,17,17);font-family:ubuntu,arial,'libra sans',sans-serif;line-height:19.5px">I got it fixed. First, we have to make sure that the user inside <code style="margin:0px;padding:1px 5px;border:0px;font-size:13px;font-family:consolas,menlo,monaco,'lucida console','liberation mono','dejavu sans mono','bitstream vera sans mono','courier new',monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">lxc</code> container belongs to the group <code style="margin:0px;padding:1px 5px;border:0px;font-size:13px;font-family:consolas,menlo,monaco,'lucida console','liberation mono','dejavu sans mono','bitstream vera sans mono','courier new',monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">video</code>. To do this, do the following: ( assuming user is named <code style="margin:0px;padding:1px 5px;border:0px;font-size:13px;font-family:consolas,menlo,monaco,'lucida console','liberation mono','dejavu sans mono','bitstream vera sans mono','courier new',monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">ubuntu</code> )</p><pre style="margin-top:0px;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,'lucida console','liberation mono','dejavu sans mono','bitstream vera sans mono','courier new',monospace,sans-serif;word-wrap:normal;color:rgb(17,17,17);background-color:rgb(239,240,241)"><code style="margin:0px;padding:0px;border:0px;font-family:consolas,menlo,monaco,'lucida console','liberation mono','dejavu sans mono','bitstream vera sans mono','courier new',monospace,sans-serif;white-space:inherit">sudo usermod -a -G video ubuntu
</code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(17,17,17);font-family:ubuntu,arial,'libra sans',sans-serif;line-height:19.5px">Then, add the following in the container config file i.e. <code style="margin:0px;padding:1px 5px;border:0px;font-size:13px;font-family:consolas,menlo,monaco,'lucida console','liberation mono','dejavu sans mono','bitstream vera sans mono','courier new',monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">/var/lib/lxc/mk7i_container/config</code>. My container name is <code style="margin:0px;padding:1px 5px;border:0px;font-size:13px;font-family:consolas,menlo,monaco,'lucida console','liberation mono','dejavu sans mono','bitstream vera sans mono','courier new',monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">mk7i_container</code>.</p><pre style="margin-top:0px;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,'lucida console','liberation mono','dejavu sans mono','bitstream vera sans mono','courier new',monospace,sans-serif;word-wrap:normal;color:rgb(17,17,17);background-color:rgb(239,240,241)"><code style="margin:0px;padding:0px;border:0px;font-family:consolas,menlo,monaco,'lucida console','liberation mono','dejavu sans mono','bitstream vera sans mono','courier new',monospace,sans-serif;white-space:inherit">#Video DRI
lxc.cgroup.devices.allow = c 226:* rwm
##/dev/dri mounts
lxc.mount.entry = /dev/dri dev/dri none bind,optional,create=dir
</code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(17,17,17);font-family:ubuntu,arial,'libra sans',sans-serif;line-height:19.5px">Now, restart the container. And the graphics should work fine.</p></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>---------- Forwarded message ----------<br>From: manik sheeri <<a href="mailto:sheeri185adidam@gmail.com">sheeri185adidam@gmail.com</a>><br>To: <a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>Cc: <br>Date: Thu, 22 Sep 2016 14:53:59 -0700<br>Subject: [lxc-users] slow game graphics in lxc container<br><div dir="ltr"><div>I have a privileged `lxc` container running on Ubuntu 16.0.4 LTS.</div><div><br></div><div>I have noticed that the graphics of our game are very sluggish in container compared to when running on host directly.</div><div><br></div><div>Could anyone point a reference as to what could be the cause ?</div><div><br></div><div>So I ran `glxgears` application inside the container. Though the application ran fine but I saw the following info + errors on console:</div><div><br></div><div> libGL error: failed to open drm device: Permission denied</div><div> libGL error: failed to load driver: nouveau</div><div> 4057 frames in 5.0 seconds = 811.356 FPS</div><div> 4238 frames in 5.0 seconds = 847.557 FPS</div><div> 4251 frames in 5.0 seconds = 850.081 FPS</div><div> 4254 frames in 5.0 seconds = 850.743 FPS</div><div> 4253 frames in 5.0 seconds = 850.431 FPS</div><div> 4255 frames in 5.0 seconds = 850.949 FPS</div><div> 4253 frames in 5.0 seconds = 850.450 FPS</div><div> 4254 frames in 5.0 seconds = 850.733 FPS</div><div> 4250 frames in 5.0 seconds = 849.960 FPS</div><div> 4247 frames in 5.0 seconds = 849.254 FPS</div><div> 4246 frames in 5.0 seconds = 849.129 FPS</div><div><br></div></div>
<br>______________________________<wbr>_________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.<wbr>linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.<wbr>org/listinfo/lxc-users</a><br></blockquote></div><br></div></div>