You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
793 B
29 lines
793 B
#!/usr/bin/bash
|
|
#
|
|
# Author: Dmitry Razumov <asmeron@ublinux.com>
|
|
# Copyright (c) 2021-2025 UBLinux <support@ublinux.com>
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
#
|
|
set -x
|
|
|
|
# Re-Bind GPU to Nvidia Driver
|
|
virsh nodedev-reattach pci_0000_09_00_1
|
|
virsh nodedev-reattach pci_0000_09_00_0
|
|
|
|
# Reload nvidia modules
|
|
modprobe nvidia
|
|
modprobe nvidia_modeset
|
|
modprobe nvidia_uvm
|
|
modprobe nvidia_drm
|
|
|
|
# Rebind VT consoles
|
|
echo 1 > /sys/class/vtconsole/vtcon0/bind
|
|
# Some machines might have more than 1 virtual console. Add a line for each corresponding VTConsole
|
|
#echo 1 > /sys/class/vtconsole/vtcon1/bind
|
|
|
|
nvidia-xconfig --query-gpu-info > /dev/null 2>&1
|
|
echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind
|
|
|
|
# Restart Display Manager
|
|
systemctl start display-manager.service |