Skip to content

Instantly share code, notes, and snippets.

@Usulyre
Last active October 5, 2025 19:00
Show Gist options
  • Select an option

  • Save Usulyre/bb33f77b225b8d9336c1f9e744114fba to your computer and use it in GitHub Desktop.

Select an option

Save Usulyre/bb33f77b225b8d9336c1f9e744114fba to your computer and use it in GitHub Desktop.

Revisions

  1. Usulyre revised this gist Mar 31, 2024. No changes.
  2. Usulyre revised this gist Mar 31, 2024. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions Vulkan virtio driver for Chrome OS crostini
    Original file line number Diff line number Diff line change
    @@ -304,8 +304,9 @@ For an FPS counter vulkan apps only: add to /etc/environment this "VK_INSTANCE_L

    For Lutris:

    After installing Lutris you need to go to the mesa folder and run the install cmds again
    .
    After installing Lutris you need to go to the mesa folder and run the install cmds again:

    cd mesa

    sudo ninja -C build64 install

  3. Usulyre revised this gist Mar 31, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulkan virtio driver for Chrome OS crostini
    Original file line number Diff line number Diff line change
    @@ -56,7 +56,7 @@ sudo nano /etc/apt/sources.list

    Add the (type or copy/paste) below lines to the opened text file:

    deb-src [arch=amd64,i386] http://deb.debian.org/debian bullseye main
    deb-src [arch=amd64,i386] http://deb.debian.org/debian bookworm main

    deb http://http.us.debian.org/debian sid main non-free contrib

  4. Usulyre revised this gist Mar 31, 2024. 1 changed file with 0 additions and 6 deletions.
    6 changes: 0 additions & 6 deletions Vulkan virtio driver for Chrome OS crostini
    Original file line number Diff line number Diff line change
    @@ -87,12 +87,6 @@ If you want to update the mesa git repository use the cmd below in mesa folder

    git pull origin

    Special Note: If having trouble running vkcube or running any program requiring vulkan with latest mesa use this branch/commit of mesa, type or paste the following cmds as is:

    git checkout -t origin/23.1

    git checkout 2c40215ab9 .


    64 bit mesa driver:

  5. Usulyre renamed this gist Mar 31, 2024. 1 changed file with 12 additions and 4 deletions.
    16 changes: 12 additions & 4 deletions gistfile1.txt → Vulkan virtio driver for Chrome OS crostini
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    Compiling/installing the experimental mesa virtio-venus-experimental driver-(below done with new linux container)
    Compiling/installing the mesa virtio-venus-driver-(below done with new linux container)

    For: Chrome OS crostini-default debian container bullseye
    For: Chrome OS crostini-default debian container bookworm

    Best viewed in "raw" format

    @@ -10,7 +10,7 @@ chrome://flags

    type in "search flags" box "crostini" without quotes.

    Enable "Crostini GPU Support" and select "Bullseye" for
    Enable "Crostini GPU Support" and select "Bookworm" for

    "Debian version for new Crostini containers"

    @@ -77,6 +77,8 @@ sudo apt-get install libunwind-dev

    sudo apt-get install libudev-dev

    sudo apt-get install libxcb-keysyms1-dev

    (Press the "y" key if prompted and wait for the process to complete)

    cd mesa
    @@ -134,7 +136,7 @@ c = '/usr/bin/gcc'
    cpp = '/usr/bin/g++'
    ar = '/usr/bin/gcc-ar'
    strip = '/usr/bin/strip'
    pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'
    pkg-config = '/usr/bin/i686-linux-gnu-pkg-config'
    llvm-config = '/usr/bin/llvm-config'

    [built-in options]
    @@ -206,6 +208,12 @@ sudo apt-get install libelf-dev:i386

    sudo apt-get install libzstd-dev:i386

    sudo apt-get install libbsd-dev:i386

    sudo apt-get install libsensors-dev:i386

    sudo apt-get install libxcb-keysyms1-dev:i386


    Paste the below in the linux terminal program and press enter (the part in quotes, but don't paste the quotes, note that this a sample one can edit it for their system):

  6. Usulyre revised this gist Jan 19, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -137,7 +137,7 @@ strip = '/usr/bin/strip'
    pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'
    llvm-config = '/usr/bin/llvm-config'

    [properties]
    [built-in options]
    c_args = ['-m32']
    c_link_args = ['-m32']
    cpp_args = ['-m32']
  7. Usulyre revised this gist Oct 9, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -104,7 +104,7 @@ Paste the below in the linux terminal program and press enter (the part in quote
    -Dgallium-vdpau=disabled \
    -Dvalgrind=disabled \
    -Dgallium-drivers=virgl \
    -Dvulkan-drivers=virtio-experimental \
    -Dvulkan-drivers=virtio \
    -Dvulkan-layers=device-select"

    Type or paste the following cmd in the linux terminal program (the compiling/installation process may take some time):
    @@ -217,7 +217,7 @@ Paste the below in the linux terminal program and press enter (the part in quote
    -Dgallium-vdpau=disabled \
    -Dvalgrind=disabled \
    -Dgallium-drivers=virgl \
    -Dvulkan-drivers=virtio-experimental \
    -Dvulkan-drivers=virtio \
    -Dvulkan-layers=device-select"


  8. Usulyre revised this gist Jun 13, 2023. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -28,12 +28,12 @@ In chrome browser press "ctrl+alt+t" to get crosh

    Always start with the below command(s) in crosh and add to your existing vmc start cmdline (before starting any linux program that you want to use the vulkan driver!).

    --enable-gpu --enable-vulkan termina
    --enable-vulkan termina


    Example in crosh:

    vmc start --enable-gpu --enable-vulkan termina
    vmc start --enable-vulkan termina


    After your cmdline is entered wait until it is finished you should see "(termina) chronos@localhost ~ $"
    @@ -297,6 +297,7 @@ Some notes:

    There may be bugs, errors, etc. You can update the driver by deleting the mesa folder and use git clone to redownload the latest version of the driver,then go to the mesa folder and build/install the driver. Or go to the mesa folder and type without quotes "git pull origin" which will pull the newest updates to mesa to your system. You can then run the install cmds which should incorporate the newest updates. No need to redownload the dependencies, etc.

    For an FPS counter vulkan apps only: add to /etc/environment this "VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay" without quotes.


    For Lutris:
  9. Usulyre revised this gist Jun 13, 2023. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -293,9 +293,6 @@ Useful/optional flags in "chrome://flags:"

    chrome://flags/#exo-ordinal-motion

    chrome://flags/#exo-pointer-lock


    Some notes:

    There may be bugs, errors, etc. You can update the driver by deleting the mesa folder and use git clone to redownload the latest version of the driver,then go to the mesa folder and build/install the driver. Or go to the mesa folder and type without quotes "git pull origin" which will pull the newest updates to mesa to your system. You can then run the install cmds which should incorporate the newest updates. No need to redownload the dependencies, etc.
  10. Usulyre revised this gist Apr 21, 2023. 1 changed file with 11 additions and 3 deletions.
    14 changes: 11 additions & 3 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -42,11 +42,11 @@ Make sure to keep that tab/window open.

    Open the linux "Terminal" program located in linux apps.

    Type or paste the following cmd(s) one at a time in linux terminal program:
    Type or paste the following cmd(s) one at a time in linux terminal program and press "Y" key if prompted:

    sudo apt update

    sudo apt upgrade
    sudo apt upgrade

    sudo apt-get install nano

    @@ -67,7 +67,7 @@ Type or paste the following cmd(s) one at a time in the linux terminal program:

    sudo apt update

    sudo apt upgrade
    sudo apt full-upgrade -y

    git clone https://gitlab.freedesktop.org/mesa/mesa.git

    @@ -85,6 +85,13 @@ If you want to update the mesa git repository use the cmd below in mesa folder

    git pull origin

    Special Note: If having trouble running vkcube or running any program requiring vulkan with latest mesa use this branch/commit of mesa, type or paste the following cmds as is:

    git checkout -t origin/23.1

    git checkout 2c40215ab9 .


    64 bit mesa driver:

    Paste the below in the linux terminal program and press enter (the part in quotes, but don't paste the quotes, note that this a sample one can edit it for their system):
    @@ -110,6 +117,7 @@ If you need to rebuild the 64 bit mesa driver, just delete the build64 folder wh
    Example: sudo rm -rf build64



    32 bit mesa driver:

    Type or paste the following cmd(s) one at a time in the linux terminal program:
  11. Usulyre revised this gist Mar 30, 2023. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -96,7 +96,6 @@ Paste the below in the linux terminal program and press enter (the part in quote
    -Dgbm=enabled \
    -Dgallium-vdpau=disabled \
    -Dvalgrind=disabled \
    -Ddri-drivers=[] \
    -Dgallium-drivers=virgl \
    -Dvulkan-drivers=virtio-experimental \
    -Dvulkan-layers=device-select"
    @@ -209,7 +208,6 @@ Paste the below in the linux terminal program and press enter (the part in quote
    -Dgbm=enabled \
    -Dgallium-vdpau=disabled \
    -Dvalgrind=disabled \
    -Ddri-drivers=[] \
    -Dgallium-drivers=virgl \
    -Dvulkan-drivers=virtio-experimental \
    -Dvulkan-layers=device-select"
  12. Usulyre revised this gist Dec 14, 2022. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,8 @@ Compiling/installing the experimental mesa virtio-venus-experimental driver-(bel

    For: Chrome OS crostini-default debian container bullseye

    Best viewed in "raw" format

    In chrome browser type or paste

    chrome://flags
  13. Usulyre revised this gist Dec 14, 2022. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -144,7 +144,7 @@ endian = 'little'

    Press ctrl+x, press the "y" key and press enter to save.

    Note: depending on what version of llvm you have installed, you might have to change "llvm-config-11" to something else, check your /usr/bin folder.
    Note: At this time, llvm doesn't build/install for 32 bit. Don't actually know if it is necessary at all.

    Type or paste the following cmd(s) one at a time in the linux terminal program and Press the "y" key if prompted at any time.
    (The reason why one has to enter so many commands is because I don't know if mesa has a 32 bit build dependency package for debian, welcome to find out if they do which would greatly simplify the process)
    @@ -225,8 +225,6 @@ Type or paste the following cmd(s) into the linux terminal program:

    sudo apt-get install vulkan-tools

    sudo apt-get install libvulkan-dev:i386



    You can then list your installed vulkan drivers with the cmd below:
  14. Usulyre revised this gist Dec 14, 2022. No changes.
  15. Usulyre revised this gist Dec 14, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -40,7 +40,7 @@ Make sure to keep that tab/window open.

    Open the linux "Terminal" program located in linux apps.

    Type or paste two following cmd(s) one at a time in linux terminal program:
    Type or paste the following cmd(s) one at a time in linux terminal program:

    sudo apt update

  16. Usulyre revised this gist Dec 14, 2022. 1 changed file with 10 additions and 2 deletions.
    12 changes: 10 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -42,6 +42,10 @@ Open the linux "Terminal" program located in linux apps.

    Type or paste two following cmd(s) one at a time in linux terminal program:

    sudo apt update

    sudo apt upgrade

    sudo apt-get install nano

    sudo nano /etc/apt/sources.list
    @@ -57,11 +61,12 @@ deb http://http.us.debian.org/debian sid main non-free contrib
    Press ctrl+x, press the "y" key and press enter to save.



    Type or paste the following cmd(s) one at a time in the linux terminal program:

    sudo apt update

    sudo apt upgrade

    git clone https://gitlab.freedesktop.org/mesa/mesa.git

    sudo apt-get build-dep mesa
    @@ -121,7 +126,7 @@ cpp = '/usr/bin/g++'
    ar = '/usr/bin/gcc-ar'
    strip = '/usr/bin/strip'
    pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'
    llvm-config = '/usr/bin/llvm-config-11'
    llvm-config = '/usr/bin/llvm-config'

    [properties]
    c_args = ['-m32']
    @@ -188,6 +193,9 @@ sudo apt-get install libunwind-dev:i386

    sudo apt-get install libudev-dev:i386

    sudo apt-get install libelf-dev:i386

    sudo apt-get install libzstd-dev:i386


    Paste the below in the linux terminal program and press enter (the part in quotes, but don't paste the quotes, note that this a sample one can edit it for their system):
  17. Usulyre revised this gist Nov 21, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    Compiling/installing the experimental mesa virtio-venus-experimental driver-(below done with new linux container)


    For: Chrome OS crostini-default debian container bullseye

    In chrome browser type or paste

  18. Usulyre revised this gist Nov 21, 2022. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -249,9 +249,15 @@ VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/virtio_icd.i686.json:/usr/share/vulkan/

    Press ctrl+x, press the "y" key and press enter to save.

    Try typing "vulkaninfo" without quotes to get vulkan driver information.

    The command "vulkaninfo | grep driverName" should return something like this:

    If you enter the below "vkcube" in the linux terminal program, you should see something like below, and also a spinning cube:
    driverName = venus
    driverName = venus


    If you enter the below "vkcube" without quotes in the linux terminal program, you should see something like below, and also a spinning cube:

    usulyre@penguin:~$ vkcube

  19. Usulyre revised this gist Nov 21, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -278,7 +278,7 @@ chrome://flags/#exo-pointer-lock

    Some notes:

    There may be bugs, errors, etc. You can update the driver by deleting the mesa folder and use git clone to redownload the latest version of the driver,then go to the mesa folder and build/install the driver. No need to redownload the dependencies, etc.
    There may be bugs, errors, etc. You can update the driver by deleting the mesa folder and use git clone to redownload the latest version of the driver,then go to the mesa folder and build/install the driver. Or go to the mesa folder and type without quotes "git pull origin" which will pull the newest updates to mesa to your system. You can then run the install cmds which should incorporate the newest updates. No need to redownload the dependencies, etc.



  20. Usulyre revised this gist Nov 21, 2022. No changes.
  21. Usulyre revised this gist Nov 21, 2022. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -68,6 +68,8 @@ sudo apt-get build-dep mesa

    sudo apt-get install libunwind-dev

    sudo apt-get install libudev-dev

    (Press the "y" key if prompted and wait for the process to complete)

    cd mesa
    @@ -184,6 +186,8 @@ sudo apt-get install libxrandr-dev:i386

    sudo apt-get install libunwind-dev:i386

    sudo apt-get install libudev-dev:i386



    Paste the below in the linux terminal program and press enter (the part in quotes, but don't paste the quotes, note that this a sample one can edit it for their system):
  22. Usulyre revised this gist Nov 21, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -137,7 +137,7 @@ endian = 'little'

    Press ctrl+x, press the "y" key and press enter to save.


    Note: depending on what version of llvm you have installed, you might have to change "llvm-config-11" to something else, check your /usr/bin folder.

    Type or paste the following cmd(s) one at a time in the linux terminal program and Press the "y" key if prompted at any time.
    (The reason why one has to enter so many commands is because I don't know if mesa has a 32 bit build dependency package for debian, welcome to find out if they do which would greatly simplify the process)
  23. Usulyre revised this gist Nov 21, 2022. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -150,6 +150,8 @@ sudo dpkg --add-architecture i386

    sudo apt-get update

    sudo apt-get install pkg-config:i386

    sudo apt-get -t sid install libdrm-dev:i386

    sudo apt-get install libwayland-dev:i386
  24. Usulyre revised this gist Nov 21, 2022. 1 changed file with 1 addition and 5 deletions.
    6 changes: 1 addition & 5 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -68,8 +68,6 @@ sudo apt-get build-dep mesa

    sudo apt-get install libunwind-dev

    sudo apt-get install libudev-dev

    (Press the "y" key if prompted and wait for the process to complete)

    cd mesa
    @@ -120,7 +118,7 @@ c = '/usr/bin/gcc'
    cpp = '/usr/bin/g++'
    ar = '/usr/bin/gcc-ar'
    strip = '/usr/bin/strip'
    pkgconfig = '/usr/bin/pkg-config'
    pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'
    llvm-config = '/usr/bin/llvm-config-11'

    [properties]
    @@ -184,8 +182,6 @@ sudo apt-get install libxrandr-dev:i386

    sudo apt-get install libunwind-dev:i386

    sudo apt-get install libudev-dev:i386



    Paste the below in the linux terminal program and press enter (the part in quotes, but don't paste the quotes, note that this a sample one can edit it for their system):
  25. Usulyre revised this gist Nov 20, 2022. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -68,6 +68,8 @@ sudo apt-get build-dep mesa

    sudo apt-get install libunwind-dev

    sudo apt-get install libudev-dev

    (Press the "y" key if prompted and wait for the process to complete)

    cd mesa
    @@ -182,6 +184,8 @@ sudo apt-get install libxrandr-dev:i386

    sudo apt-get install libunwind-dev:i386

    sudo apt-get install libudev-dev:i386



    Paste the below in the linux terminal program and press enter (the part in quotes, but don't paste the quotes, note that this a sample one can edit it for their system):
  26. Usulyre revised this gist Nov 20, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -66,7 +66,7 @@ git clone https://gitlab.freedesktop.org/mesa/mesa.git

    sudo apt-get build-dep mesa

    sudo apt-get install -y libunwind-dev
    sudo apt-get install libunwind-dev

    (Press the "y" key if prompted and wait for the process to complete)

  27. Usulyre revised this gist Nov 20, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -180,7 +180,7 @@ sudo apt-get install libxxf86vm-dev:i386

    sudo apt-get install libxrandr-dev:i386

    sudo apt-get install -y libunwind-dev:i386
    sudo apt-get install libunwind-dev:i386



  28. Usulyre revised this gist Nov 20, 2022. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -180,6 +180,8 @@ sudo apt-get install libxxf86vm-dev:i386

    sudo apt-get install libxrandr-dev:i386

    sudo apt-get install -y libunwind-dev:i386



    Paste the below in the linux terminal program and press enter (the part in quotes, but don't paste the quotes, note that this a sample one can edit it for their system):
  29. Usulyre revised this gist Nov 20, 2022. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -66,6 +66,8 @@ git clone https://gitlab.freedesktop.org/mesa/mesa.git

    sudo apt-get build-dep mesa

    sudo apt-get install -y libunwind-dev

    (Press the "y" key if prompted and wait for the process to complete)

    cd mesa
  30. Usulyre revised this gist Nov 20, 2022. 1 changed file with 4 additions and 5 deletions.
    9 changes: 4 additions & 5 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -78,7 +78,7 @@ git pull origin

    Paste the below in the linux terminal program and press enter (the part in quotes, but don't paste the quotes, note that this a sample one can edit it for their system):

    "meson build64 --libdir /usr/lib/x86_64-linux-gnu -Ddri3=enabled \
    "meson setup build64 --libdir /usr/lib/x86_64-linux-gnu -Ddri3=enabled \
    -Dprefix=/usr \
    -Dglx=dri \
    -Degl=enabled \
    @@ -116,9 +116,8 @@ c = '/usr/bin/gcc'
    cpp = '/usr/bin/g++'
    ar = '/usr/bin/gcc-ar'
    strip = '/usr/bin/strip'
    pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'
    llvm-config = '/usr/bin/llvm-config'
    cmake = '/usr/bin/cmake'
    pkgconfig = '/usr/bin/pkg-config'
    llvm-config = '/usr/bin/llvm-config-11'

    [properties]
    c_args = ['-m32']
    @@ -183,7 +182,7 @@ sudo apt-get install libxrandr-dev:i386

    Paste the below in the linux terminal program and press enter (the part in quotes, but don't paste the quotes, note that this a sample one can edit it for their system):

    "meson build32 --cross-file gcc-i686 --libdir /usr/lib/i386-linux-gnu -Ddri3=enabled \
    "meson setup build32 --cross-file gcc-i686 --libdir /usr/lib/i386-linux-gnu -Ddri3=enabled \
    -Dprefix=/usr \
    -Dglx=dri \
    -Degl=enabled \