Fw: Unable to use GPU in guix shell container with FHS

  • Open
  • quality assurance status badge
Details
3 participants
  • dan
  • Jacob Hrbek
  • Ludovic Courtès
Owner
unassigned
Submitted by
Jacob Hrbek
Severity
normal
Merged with
J
J
Jacob Hrbek wrote on 10 Nov 2022 11:16
(name . bug-guix@gnu.org)(address . bug-guix@gnu.org)
xHd1cq7RQlUrcdcmp_Af4n5HwvXr3nl5OuJh2rj8K49rd1QkEfI2N8WQZ52DlrKayKIX4NBdRK4NhsaLVjDDAJSiNhKiahwwppXX7TM5f6M=@rixotstudio.cz
I am unable to send an e-mail to help-guix@gnu.org mailing list so submitting as a bug

kreyren@dreamon ~$ guix shell -CF bash coreutils mesa mesa-utils -- glxgears
substitute: updating substitutes from '[https://substitutes.REDACTED](https://substitutes.nonguix.org/)'... 100.0%
0,4 MB will be downloaded
glew-2.1.0 343KiB 4.0MiB/s 00:00 [##################] 100.0%
mesa-utils-8.4.0 29KiB 3.9MiB/s 00:00 [##################] 100.0%
The following derivation will be built:
/gnu/store/r81kp1djl75p3c4bzqfjavnk53klqf2j-profile.drv

applying 4 grafts for mesa-utils-8.4.0 ...
building CA certificate bundle...
listing Emacs sub-directories...
building fonts directory...
building directory of Info manuals...
building profile with 5 packages...
Error: couldn't open display (null)
^^^^^^^^^^^^^^^^^^^^^

Question: How can i make it to work by showing the glxgears?
-- Jacob "Kreyren" Hrbek

------- Original Message -------
On Friday, November 4th, 2022 at 5:46 AM, Jacob Hrbek <kreyren@rixotstudio.cz> wrote:

Toggle quote (18 lines)
> kreyren@dreamon ~$ guix shell -CF bash coreutils mesa mesa-utils -- glxgears
> substitute: updating substitutes from '[https://substitutes.REDACTED](https://substitutes.nonguix.org)'... 100.0%
> 0,4 MB will be downloaded
> glew-2.1.0 343KiB 4.0MiB/s 00:00 [##################] 100.0%
> mesa-utils-8.4.0 29KiB 3.9MiB/s 00:00 [##################] 100.0%
> The following derivation will be built:
> /gnu/store/r81kp1djl75p3c4bzqfjavnk53klqf2j-profile.drv
>
> applying 4 grafts for mesa-utils-8.4.0 ...
> building CA certificate bundle...
> listing Emacs sub-directories...
> building fonts directory...
> building directory of Info manuals...
> building profile with 5 packages...
> Error: couldn't open display (null)
>
> Question: How can i make it to work by showing the glxgears?
> -- Jacob "Kreyren" Hrbekil.
Attachment: file
D
(address . 59166@debbugs.gnu.org)
3b2189b6-7e19-fc49-b958-904b8715aa67@dan.games
hi jacob,

to use gpu in a container, you need a few additional parameters
(assuming you are also using x11):

Toggle quote (1 lines)
> guix shell -CF bash coreutils mesa mesa-utils --expose=/tmp/.X11-unix --expose=$XAUTHORITY --expose=/dev/dri --expose=/etc/udev -E "DISPLAY|XAUTHORITY" -- glxgear
hope it could help.

--
dan
L
L
Ludovic Courtès wrote on 12 Nov 2022 18:24
control message for bug #59069
(address . control@debbugs.gnu.org)
87h6z4cchg.fsf@gnu.org
merge 59069 59166
quit
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 59166@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 59166
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch