ludi1012
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: 'DG2 kernel driver installation for Ubuntu20.04.5' disqus: hackmd --- DG2 kernel driver installation for Ubuntu20.04.5 === ## Table of Contents [TOC] ## OV GPU installation guide Ref: https://dgpu-docs.intel.com/installation-guides/ubuntu/ubuntu-focal-arc.html https://hub.docker.com/r/openvino/ubuntu20_dev https://github.com/openvinotoolkit/docker_ci/blob/master/configure_gpu_ubuntu20.md https://github.com/intel-sandbox/atsm-va-sample-demo/blob/main/system-setup.md Pre-request BIOS settings for DG2/ATS-M --- * **Intel Advanced Menu -> system Agent configuration -> ABove 4GB MMIO BIOS assignment (Enabled)** * **Intel Advanced Menu -> system Agent configuration -> PCI Express Configuration -> PCIE Resizeable BAR Support (Enabled)** ![](https://i.imgur.com/HlGA7ah.png) Add package repository --- set up proxy for host env. ```gherkin= sudo -E apt-get install -y gpg-agent wget wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | sudo gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu focal-devel main' | \ sudo tee /etc/apt/sources.list.d/intel.gpu.focal.list ``` > If can't download by wget behine lab network, download manually and change as below ```gherkin= sudo -E apt-get install -y gpg-agent wget cat intel-graphics.key | sudo gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu focal-devel main' | \ sudo tee /etc/apt/sources.list.d/intel.gpu.focal.list ``` Install Linux OEM kernel flows --- ```gherkin= sudo -E apt-get install linux-image-5.14.0-1047-oem cat /boot/grub/grub.cfg ``` >From this file, we can find the menuentry for $menuentry_id_option and the corresponding submenu. e.g. submenu 'Advanced options for Ubuntu' ... { menuentry 'Ubuntu, with Linux 5.14.0-1047-oem'... >Now edit the file /etc/default/grub and change the default boot entry, e.g. ```gherkin= sudo vim /etc/default/grub #GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.14.0-1047-oem" sudo update-grub sudo reboot uname -r ``` > The system should boot to prerelease kernel automatically. Make sure you get the right kernel name from "uname -r" command. > Please ensure you are using 5.14.0-1047-oem or higher version. Then proceed blow instructions. Install dkms and kernel header files ```gherkin= sudo -E apt-get update sudo -E apt-get install gawk sudo -E apt-get install dkms \ linux-headers-$(uname -r) \ libc-dev ``` Install DKMS kernel modules --- ```gherkin= sudo -E apt-get install intel-i915-dkms intel-platform-cse-dkms pmt ``` Install Install run-time packages --- ```gherkin= sudo -E apt-get install \ intel-opencl-icd \ intel-level-zero-gpu level-zero \ intel-media-va-driver-non-free libmfx1 libmfxgen1 libvpl2 \ libegl-mesa0 libegl1-mesa libegl1-mesa-dev libgbm1 libgl1-mesa-dev libgl1-mesa-dri \ libglapi-mesa libgles2-mesa-dev libglx-mesa0 libigdgmm11 libxatracker2 mesa-va-drivers \ mesa-vdpau-drivers mesa-vulkan-drivers va-driver-all ``` OPTIONAL: Install developer packages --- If you will be doing development, you may want to install optional development packages. oneAPI users will need to install these packages for some of the oneAPI tools to function correctly: ```gherkin= sudo -E apt-get install \ libigc-dev \ intel-igc-cm \ libigdfcl-dev \ libigfxcmrt-dev \ level-zero-dev ``` > Reboot system to be effective Configuring permissions --- In order to access GPU capabilities, a user needs to have the correct permissions on system. The following will list the group assigned ownership of the render nodes, and list the groups the active user is a member of: ```gherkin= stat -c "%G" /dev/dri/render* groups ${USER} ``` If a group is listed for the render node which isn’t listed for the user, you will need to add the user to the group using gpasswd. In the following, the active user will be added to the ‘render’ group and a new shell spawned with that group active: ```gherkin= sudo gpasswd -a ${USER} render newgrp render ``` BKC --- Graphics Compiler 1.0.11378 libdrm2 2.4.110.5 libva2 2.14.0.2-29 Media driver for VAAPI 22.4.3 Mesa 22.2.0.20220611.1 OpenCL* runtime 22.24.23453 ```gherkin= apt list | grep $packages ``` Verify the installations --- ### Verify the device is working with i915 driver ``` sudo apt-get install hwinfo hwinfo --display ``` Similar information will be showed as below: >28: PCI 02.0: 0300 VGA compatible controller (VGA) [Created at pci.386] Unique ID: _Znp.rCilE76BCCB SysFS ID: /devices/pci0000:00/0000:00:02.0 SysFS BusID: 0000:00:02.0 Hardware Class: graphics card Device Name: "GPU" Model: "Intel VGA compatible controller" Vendor: pci 0x8086 "Intel Corporation" Device: pci 0x9bca SubVendor: pci 0x8086 "Intel Corporation" SubDevice: pci 0x2081 Revision: 0x04 Driver: "i915" Driver Modules: "i915" ### Verify Media drivers installation ``` export DISPLAY=:0.0 sudo apt-get install vainfo vainfo ``` Similar information will be showed as below: >libva info: VA-API version 1.14.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_14 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.14 (libva 2.12.0) ### Verify Computing drivers installation ``` sudo apt-get install clinfo clinfo ``` Similar information will be showed as below: >Number of platforms 2 Platform Name Intel(R) OpenCL HD Graphics Platform Vendor Intel(R) Corporation Platform Version OpenCL 3.0 Platform Profile FULL_PROFILE ### Verify 3D drivers installation Below verification needs a running desktop UI on top of your Linux distribution. ``` sudo apt install mesa-utils glxinfo |grep OpenGL ``` Similar information will be showed as below: >OpenGL vendor string: Intel OpenGL renderer string: Mesa Intel(R) Graphics (DG2) OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.2.0-devel (git-44289c46d9) OpenGL core profile shading language version string: 4.60 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.2.0-devel (git-44289c46d9) ###### tags: `DG2` `BKC` `kernel` `installation`

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully