Score:0

How to install Intel Iris Xe graphics drivers

qa flag

My outputs :

$ inxi -G
Graphics:
  Device-1: Microsoft Basic Render Driver driver: dxgkrnl v: 2.0.1
  Display: wayland server: Microsoft Corporation X.org driver: gpu: dxgkrnl
    resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz
  OpenGL: renderer: llvmpipe (LLVM 13.0.1 256 bits)
    v: 4.5 Mesa 23.0.0-devel (git-4b077ffb98)

$ lspci -v |grep -A8 VGA
lspci: Unable to load libkmod resources: error -2

System :

  • Asus ZenBook UX325EA Windows 11
  • WSL2 Ubuntu 22.04 Jammy
  • Intel i7 11th / Intel Iris Xe graphics
Pilot6 avatar
cn flag
You don't install drivers to WSL.
bouachalazhar avatar
qa flag
Why ? I have WSL2
pl flag
Because the Linux subsystem isn't talking directly to the hardware, it's virtualized, so you don't need bare-metal drivers. What are you actually trying to do that you believe needs the driver?
bouachalazhar avatar
qa flag
I need to use my gpu for test intel_extension_for_pytorch on object detection in my videos.
NotTheDr01ds avatar
vn flag
@bouachalazhar It's doubtful that you will be able to use Intel-specific extensions inside WSL2.
bouachalazhar avatar
qa flag
It's a deep learning framework based on PyTorch. I just would like to access at my intel gpu on WSL2.
Score:1
vn flag

As mentioned in the comments, you don't actually install (most1) hardware drivers into Ubuntu when it is running under WSL2.

WSL2 is an interesting combination of technologies:

  • WSL2 itself is a "managed virtual machine". As end users, we don't actually interact with the VM itself. As it is virtualized anyway, we would rarely install hardware drivers into it. For instance, when interacting with VirtualBox, you install the VirtualBox display driver, and the host operating system provides the hardware display driver.

  • Your Ubuntu distribution runs inside a "container" inside that VM, using namespaces and cgroups. This is similar to the way Docker and other container technologies work. Again, inside containers, we rarely install hardware drivers. The container relies on the host VM's (WSL2's in this case) kernel and drivers (virtual WSL2 drivers, in this case).

  • Graphics capabilities are provided through WSLg, which actually uses the RDP protocol to display Wayland and X applications in a virtual RDP session that WSL automatically connects to from Windows. As you can probably picture, the Windows display driver for your hardware is being used for this function.

  • GPU compute tasks are handled by WSL2 DirectML (and, for Nvidia, CUDA) libraries that are "injected" into the distribution (container) when it starts. Writing ML tasks on WSL2 is, if I understand correctly, done through DirectML, with TensorFlow (1 and 2) and PyTorch implementations for the technology. According to the Microsoft Docs:

    This package accelerates workflows on AMD, Intel, and NVIDIA GPUs.

    Again, this is done through the Windows GPU drivers, with the DirectML libraries running in WSL2 knowing how to proxy data between the Linux implementation and the Windows host driver.


Footnotes:

1 USB drivers can be an exception to this rule. WSL2 support USB/IP to allow USB devices to be shared from the Windows host to the Linux distribution. In this case, the actual hardware driver for the device must be available in Linux.

bouachalazhar avatar
qa flag
I understand for `inxi -G`, I must use DirectML for activate my gpu but why `lspci -v |grep -A8 VGA` doesn't work.
NotTheDr01ds avatar
vn flag
@bouachalazhar Simply because there are no physical PCI interfaces in the virtual environment. Just a `lspci` will show you the virtual devices, and you should see there that the Microsoft virtual DirectX driver is the one being used. There's no "VGA" since the output is to the RDP subsystem, rather than to a physical device.
bouachalazhar avatar
qa flag
For resume, I don't need to install any intel gpu drivers and I can use DirectML for it.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.