brokedude2901 / dxgkrnl_ubuntu Goto Github PK
View Code? Open in Web Editor NEWMicrosoft GPU-P (dxgkrnl) on Hyper-V Ubuntu VM
Microsoft GPU-P (dxgkrnl) on Hyper-V Ubuntu VM
Thanks for this repository, it has a lot of helpful information for getting GPU access in Hyper-V.
Would it be possible to add the instructions that were run to compile the kernel and generate the deb files?
I've been trying to generate the latest kernel from the source, but am having troubles booting into it.
Thanks!
Hello.
I'm trying to use Ubuntu VM on a Hyper-V with Microsoft GPU-P support. The tutorial that I have used to reach the goal is the one below :
https://github.com/brokeDude2901/dxgkrnl_ubuntu
The result that I have achieved has been to enable the nVidia driver and CUDA libraries within an Ubuntu 20.04 VM,but Blender Cycles does not recognize my GPUs :
Do you know the reason ? Instead,Blender Cycles recognizes at least one GPU (I have 2 GPUs,but it recognizes only one : but I have an idea about the reason : on the script I have declared 16 GB of memory instead of the default,32 GB) if the VM is Windows 11 :
Something is missing or it does not work well if the VM is Ubuntu 20.04. I don't know what it is. What I can do to allow Blender Cycles to recognize my GPU as a good GPU for rendering ?
My host is win11 and Guest is ubuntu 22.04.
Guest kernel is linux-image-5.10.102.1 . And glxgear can use D3D12, but I can find /dev/dri/card0 and /dev/dri/renderD128 device.
Hi There,
Me and a Friend have been trying to successfully get Ubuntu to load with the partitioned GPU, we get as far as doing that perfectly, copying the drivers over then get stuck on installing the Custom Kernel.
It installs without a problem, however after rebooting the display manager does not start, leaving us on a blinking cursor.
Are there any suggestions? everything up to this point worked fine
Ran through the readme, and almost got it working.
However, after booting the screen is just black.
Through ssh I could see X was running, so in the hyperv connection windows i hit enter, then entered my password. Then confirmed through ssh that I was infact logged in:
user :1 :1 22:13 ?xdm? 54.19s 0.00s /usr/libexec/gdm-x-session --run-script env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --session=ubuntu
On the screen I can see the mouse curser when moving it, and when i click a button it shows an icon for home folder in the bottom right corner, but nothing else.
Opening the home folder icon shows me a completly garbbled output:
https://imgur.com/a/utX3e7t
dmesg has these errors, only showing some lines as there are about 20 of the same errors reoccuring:
dmesg | grep dxgk
[ 1.131381] hv_vmbus: registering driver dxgkrnl
[ 1.131421] (NULL device *): dxgk: dxg_drv_init Version: 2216
[ 1.132322] (NULL device *): dxgk: mmio allocated fe0000000 200000000 fe0000000 11dfffffff
[ 12.640211] dxgk:err: is_handle_valid Entry is freed 40000080 2
[ 12.640212] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
[ 12.640214] dxgk:err: adapter_by_handle failed 40000080
[ 12.651623] dxgk:err: is_handle_valid Entry is freed 40000080 2
[ 12.651624] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
[ 12.651626] dxgk:err: adapter_by_handle failed 40000080
[ 12.981306] dxgk:err: is_handle_valid Entry is freed 40000080 2
[ 12.981307] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
Any advice for this?
I'm planning to give this a try , one of the main reasons I use linux is to run a few apps that rely heavily on opengl ...
wsl2 was a real disappointment with very poor opengl performance ... I'm not running anything that is gpu intensive but what kind of opengl performance can I expect if i set things up with GPU-P support using the dxgrknl kernel?
I have followed the instruction to execute all commands without encountering any errors.
However, I am not able to use nvida-smi
.
By the way, nvidia-smi
works in my WSL2 with Ubuntu 20.04.
More info:
$ uname -r
5.15.0-41-generic
$ lspci
be44:00:00.0 3D controller: Microsoft Corporation Device 008e
Full error log:
Failed to initialize NVML: GPU access blocked by the operating system
Failed to properly shut down NVML: GPU access blocked by the operating system
I found kernel source in https://github.com/microsoft/WSL2-Linux-Kernel
And compile sucess,but I don't know How to change to run in hyper v
It can run in hyper v direct?
正在处理用于 libc-bin (2.35-0ubuntu3.7) 的触发器 ...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link
/sbin/ldconfig.real: /lib/libcuda.so.1 is not a symbolic link
[1] 6093
[2024:04:25:20:39:30]: Error: Couldn't find any of the following libraries: [libnvidia-fbc.so.1, libnvidia-fbc.so]
[2024:04:25:20:39:30]: Error: Environment variable WAYLAND_DISPLAY has not been defined
[2024:04:25:20:39:30]: Info: Detecting connected monitors
Authorization required, but no authorization protocol specified
[1]+ 已完成 sudo mkdir -p /dev/dri && sudo mkdir -p /root/.config/sunshine
These instructions only work with nvidia. When I copy those driver directories to my VM nothing is copied because those commands are for NVidia drivers.
最新是15了吧
lspci can see two display card.one is 2080ti another V100 (with wddm driver). when I already install step 4 reboot.there is not boot select menu. It start by Xory windows. input user and password.it can go into system. But still no nvidia graphics card in setting display.
Hi, does this work with Gen 1 Hyper-V Ubuntu 18.04 VM?
Thanks you!
P.S. Most of my projects run on 18.04 thud I can't switch go 20.04. I also tried installing Ubuntu 18.04 on a Gen 2 hyper-V but it can't install the iso image file, only Gen 1 works.
Hi
i have passion to get Steam os or Arch-linux base distro working in Hyper-V .
could you please make small video to trial or at least explain here the setup for Steam os or Arch-linux base distro .
thanks
Any idea how to set a custom resolution for sunshine streaming?
I followed the steps and I got this error on ldconfig:
libcuda.so.1 is not a symbolic link
Removing the file seemed to fix the error, but the GPU is not detected after rebooting with the new kernel. How to fix?
The ZFS modules are not loaded.
Try running /sbin/modprobe zfs as root to load them.
i tried runinng as root '/sbin/modprobe zfs'
Module zfs not found in directory /lib/modules/5.10.102.1-dxgrknl
Any suggestion on how to get zpool working with kernel version 5.10.102.1-dxgrknl.
I'm having some issues building and getting working with 5.15 Kernel and Ubuntu 22.04 and just wondering if anyone else had any luck? I'm getting NVML operating system block errors.
Hi,
I get the following errors after running step 2. I'm on Windows 10 Home but I used a script to enable hyper v. I hope that's not the issue.
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Windows\system32> # change ubuntu to your current vm name
>> $vm = "Ubuntu"
>>
>> # this will remove any current gpu-p adapter then reattach them all
>> Remove-VMGpuPartitionAdapter -VMName $vm
>> $gpu_list = Get-VMHostPartitionableGpu
>> foreach ($k in $gpu_list){
>> $instance_path = $k.Name
>> $instance_path
>> Add-VMGpuPartitionAdapter -VMName $vm -InstancePath $instance_path
>> }
>> Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionVRAM 1
>> Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionVRAM 11
>> Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionVRAM 10
>> Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionEncode 1
>> Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionEncode 11
>> Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionEncode 10
>> Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionDecode 1
>> Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionDecode 11
>> Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionDecode 10
>> Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionCompute 1
>> Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionCompute 11
>> Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionCompute 10
>> Set-VM -GuestControlledCacheTypes $true -VMName $vm
>> Set-VM -LowMemoryMappedIoSpace 1Gb -VMName $vm
>> Set-VM -HighMemoryMappedIoSpace 32GB -VMName $vm
Remove-VMGpuPartitionAdapter : Unable to find a Gpu partition adapter matching the given criteria.
At line:5 char:1
+ Remove-VMGpuPartitionAdapter -VMName $vm
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Remove-VMGpuPartitionAdapter], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.RemoveVMGpuPartitionAdapter
Get-VMHostPartitionableGpu : The term 'Get-VMHostPartitionableGpu' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:6 char:13
+ $gpu_list = Get-VMHostPartitionableGpu
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-VMHostPartitionableGpu:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Set-VMGpuPartitionAdapter : Unable to find a Gpu partition adapter matching the given criteria.
At line:12 char:1
+ Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionVRAM 1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Set-VMGpuPartitionAdapter], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.SetVMGpuPartitionAdapter
Set-VMGpuPartitionAdapter : Unable to find a Gpu partition adapter matching the given criteria.
At line:13 char:1
+ Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionVRAM 11
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Set-VMGpuPartitionAdapter], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.SetVMGpuPartitionAdapter
Set-VMGpuPartitionAdapter : Unable to find a Gpu partition adapter matching the given criteria.
At line:14 char:1
+ Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionVRAM 10
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Set-VMGpuPartitionAdapter], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.SetVMGpuPartitionAdapter
Set-VMGpuPartitionAdapter : Unable to find a Gpu partition adapter matching the given criteria.
At line:15 char:1
+ Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionEncode 1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Set-VMGpuPartitionAdapter], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.SetVMGpuPartitionAdapter
Set-VMGpuPartitionAdapter : Unable to find a Gpu partition adapter matching the given criteria.
At line:16 char:1
+ Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionEncode 11
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Set-VMGpuPartitionAdapter], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.SetVMGpuPartitionAdapter
Set-VMGpuPartitionAdapter : Unable to find a Gpu partition adapter matching the given criteria.
At line:17 char:1
+ Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionEncode 10
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Set-VMGpuPartitionAdapter], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.SetVMGpuPartitionAdapter
Set-VMGpuPartitionAdapter : Unable to find a Gpu partition adapter matching the given criteria.
At line:18 char:1
+ Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionDecode 1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Set-VMGpuPartitionAdapter], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.SetVMGpuPartitionAdapter
Set-VMGpuPartitionAdapter : Unable to find a Gpu partition adapter matching the given criteria.
At line:19 char:1
+ Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionDecode 11
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Set-VMGpuPartitionAdapter], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.SetVMGpuPartitionAdapter
Set-VMGpuPartitionAdapter : Unable to find a Gpu partition adapter matching the given criteria.
At line:20 char:1
+ Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionDecode 10
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Set-VMGpuPartitionAdapter], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.SetVMGpuPartitionAdapter
Set-VMGpuPartitionAdapter : Unable to find a Gpu partition adapter matching the given criteria.
At line:21 char:1
+ Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionCompute 1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Set-VMGpuPartitionAdapter], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.SetVMGpuPartitionAdapter
Set-VMGpuPartitionAdapter : Unable to find a Gpu partition adapter matching the given criteria.
At line:22 char:1
+ Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionCompute 11
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Set-VMGpuPartitionAdapter], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.SetVMGpuPartitionAdapter
Set-VMGpuPartitionAdapter : Unable to find a Gpu partition adapter matching the given criteria.
At line:23 char:1
+ Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionCompute 10
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Set-VMGpuPartitionAdapter], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.SetVMGpuPartitionAdapter
PS C:\Windows\system32>```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.