This commit is contained in:
2025-07-10 19:39:04 +02:00
parent c9eeaca475
commit 1e83c8adf7
7 changed files with 105 additions and 114 deletions
@@ -33,7 +33,7 @@ in
"nvme_core.shutdown_timeout=10"
"amd_iommu=on"
"amdgpu.ppfeaturemask=0xffffffff"
"amdgpu.runpm=0"
#"amdgpu.runpm=0"
"iommu=pt"
"psi=1"
"i915.force_probe=!56a6"
@@ -124,7 +124,7 @@
"dolphinrc"."General"."RememberOpenedTabs" = false;
"kwalletrc"."Wallet"."Enabled" = false;
"kwalletrc"."Wallet"."Enabled" = true;
};
dataFile = {
@@ -44,6 +44,8 @@ let
systemctl stop windows-share-mount.service
# Make sure nothing renders on gpu to prevent "sysfs: cannot create duplicate filename" after rebinding to amdgpu
echo remove > /sys/bus/pci/devices/$VIRSH_GPU_VIDEO/drm/card*/uevent
sleep 2s
chmod 0 /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-render
chmod 0 /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-card
fuser -k /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-render
@@ -57,19 +59,19 @@ let
# Weird bug on kernel 6.7+, after changing bar sizes and binding to vfio driver, performance after returning to host will be lower than expected
# binding to amdgpu after changing bar sizes and binding after it to vfio will work as expected.
# I could skip changing bar sizes since I'm able to use full bar, but keeping it just in case
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
sleep 1s
echo "${bar0_host}" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
echo "${bar2_host}" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
#echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
#sleep 1s
#echo "${bar0_host}" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
#echo "${bar2_host}" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
echo ''$VIRSH_GPU_VIDEO > /sys/bus/pci/drivers/amdgpu/bind
#echo ''$VIRSH_GPU_VIDEO > /sys/bus/pci/drivers/amdgpu/bind
sleep 1s
chmod 0 /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-card
chmod 0 /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-render
fuser -k /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-render
fuser -k /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-card
#sleep 1s
#echo remove > /sys/bus/pci/devices/$VIRSH_GPU_VIDEO/drm/card*/uevent
#chmod 0 /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-card
#chmod 0 /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-render
#fuser -k /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-render
#fuser -k /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-card
#####################################################################
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
@@ -175,9 +177,9 @@ in
${startHook}
fi
if [ ''$2 = "started" ] && [ ''$3 = "begin" ]; then
${startedHook}
fi
#if [ ''$2 = "started" ] && [ ''$3 = "begin" ]; then
#fi
if [ ''$2 = "release" ] && [ ''$3 = "end" ]; then
${stopHook}
@@ -67,6 +67,7 @@ let
open-vsx.ms-vscode.hexeditor
open-vsx.alefragnani.project-manager
vscode-marketplace.cantonios.project-templates
vscode-marketplace.betterthantomorrow.joyride
#Icons
open-vsx.pkief.material-icon-theme