-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(win10): problem with launch win10 vm
- Loading branch information
Showing
5 changed files
with
56 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
modules/hardware/virtualization/hooks/win10/prepare/begin/boinc.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
systemctl stop display-manager.service | ||
systemctl stop boinc.serv | ||
systemctl stop boinc.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 13 additions & 11 deletions
24
modules/hardware/virtualization/hooks/win10/release/end/revert.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
#!/usr/bin/env bash | ||
set -x | ||
|
||
function _reboot() { | ||
reboot || systemctl reboot | ||
} | ||
|
||
# Reboot system cause "throw kernel panic". I think it's casues by nvidia proprietary driver | ||
_reboot && exit 0 | ||
|
||
trap _reboot SIGINT SIGABRT SIGTERM ERR | ||
|
||
# Disable VFIO | ||
modprobe -r vfio_iommu_type1 vfio_pci vfio_virqfd | ||
modprobe -r vfio_iommu_type1 vfio_pci | ||
|
||
# Re-Bind GPU to Nvidia Driver | ||
timeout 5s virsh nodedev-reattach pci_0000_01_00_0 | ||
timeout 5s virsh nodedev-reattach pci_0000_01_00_1 | ||
|
||
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/bind | ||
|
||
# Reload nvidia modules | ||
modprobe drm | ||
modprobe drm_kms_helper | ||
modprobe i2c_nvidia_gpu | ||
modprobe nvidia | ||
modprobe nvidia_modeset | ||
modprobe nvidia_drm | ||
modprobe nvidia_uvm | ||
|
||
nvidia-xconfig --query-gpu-info >/dev/null 2>&1 | ||
# Rebind VT consoles | ||
echo 1 >/sys/class/vtconsole/vtcon0/bind || _reboot | ||
echo 1 >/sys/class/vtconsole/vtcon1/bind || _reboot | ||
|
||
# Restart Display Manager | ||
systemctl start display-manager.service | ||
|
||
# Rebind VT consoles | ||
echo 1 >/sys/class/vtconsole/vtcon0/bind | ||
echo 1 >/sys/class/vtconsole/vtcon1/bind |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters