系統環境 ██████████████████ ████████ littleblacklb@lb-desktop ██████████████████ ████████ ██████████████████ ████████ OS: Manjaro Linux x86_64 ███████████ ...
系統環境
██████████████████ ████████ littleblacklb@lb-desktop
██████████████████ ████████ ------------------------
██████████████████ ████████ OS: Manjaro Linux x86_64
██████████████████ ████████ Host: MS-7A40 2.0
████████ ████████ Kernel: 6.1.69-1-MANJARO
████████ ████████ ████████ Uptime: 4 hours, 47 mins
████████ ████████ ████████ Packages: 1802 (pacman)
████████ ████████ ████████ Shell: zsh 5.9
████████ ████████ ████████ Resolution: 1920x1080
████████ ████████ ████████ DE: Plasma 5.27.10
████████ ████████ ████████ WM: KWin
████████ ████████ ████████ Theme: [Plasma], Orchis-Grey-Dark [GTK2/3]
████████ ████████ ████████ Icons: Fluent-dark [Plasma], Fluent-dark [GTK2/3]
████████ ████████ ████████ Terminal: yakuake
CPU: AMD Ryzen 7 3700X (16) @ 4.200GHz
GPU: NVIDIA GeForce RTX 3060 Ti Lite Hash Rate
Memory: 9370MiB / 15915MiB
經過
按照LED 顯卡直通做完所有工作後,win10直通虛擬機成功運行且安裝上了驅動。
但是當虛擬機關機後,顯卡似乎並沒有歸還,導致顯示屏一直處於黑屏,但是ssh可以連接。
經過hooks日誌查看發現,當鉤子執行到
echo 1 > /etc/class/vtconsole/vtcon0/bind
echo 1 > /etc/class/vtconsole/vtcon1/bind
時腳本會被kill.
解決
google後,在reddit帖子下找到解決辦法:
adding video=efifb:off in the "" of GRUB_CMDLINE_LINUX_DEFAULT="....." worked perfectly for me.
- 在
/etc/default/grub
文件中的GRUB_CMDLINE_LINUX_DEFAULT
鍵中添加video=efifb:off
- 輸入
sudo update-grub
後reboot
即可
efifb是什麼
https://www.reddit.com/r/VFIO/comments/ks7ve3/alternative_to_efifboff/
Let's say you have multiple GPUs. When Linux boots, it will try to display the boot log on one of your monitors using one of your GPUs. To do this, it attaches a simple 'efifb' graphics driver to that GPU and uses it to display the boot log.
The problem comes when you wish to pass the GPU to a VM. Since the 'efifb' driver is attached to the GPU, qemu will not be able to reserve the GPU for the VM and your VM will not start.
簡單來說efifb是一個EFI驅動用於顯示開機日誌以及tty,當關閉後無法顯示開機日誌以及tty終端。
這是這個辦法的缺點,但是我目前還沒有找到更佳辦法。