cant rebind efi-framebuffer and vtcon1 disapeared
ambrosiaforest opened this issue · 6 comments
my vm starting works just fine and my vm works great but the stop.sh script failes everytime. This is my script:
#!/bin/bash
set -x
# Attach GPU devices to host
# Use your GPU and HDMI Audio PCI host device
virsh nodedev-reattach pci_0000_07_00_0
virsh nodedev-reattach pci_0000_07_00_1
virsh nodedev-reattach pci_0000_07_00_2
virsh nodedev-reattach pci_0000_07_00_3
# Unload vfio module
modprobe -r vfio-pci vfio_iommu_type1 vfio
# Rebind framebuffer to host
echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind
# Load NVIDIA kernel modules
modprobe nvidia_drm
modprobe nvidia_modeset
modprobe nvidia
# Bind VTconsoles: might not be needed
echo 1 > /sys/class/vtconsole/vtcon0/bind
echo 1 > /sys/class/vtconsole/vtcon1/bind
this is what i get when i run the stop script right after running the start over ssh:
+ virsh nodedev-reattach pci_0000_07_00_0
Device pci_0000_07_00_0 re-attached
+ virsh nodedev-reattach pci_0000_07_00_1
Device pci_0000_07_00_1 re-attached
+ virsh nodedev-reattach pci_0000_07_00_2
Device pci_0000_07_00_2 re-attached
+ virsh nodedev-reattach pci_0000_07_00_3
Device pci_0000_07_00_3 re-attached
+ modprobe -r vfio-pci
+ echo efi-framebuffer.0
/etc/libvirt/hooks/qemu.d/win10/release/end/stop.sh: line 15: echo: write error: No such device
+ modprobe nvidia_drm
+ modprobe nvidia_modeset
+ modprobe nvidia
+ echo 1
+ echo 1
/etc/libvirt/hooks/qemu.d/win10/release/end/stop.sh: line 24: /sys/class/vtconsole/vtcon1/bind: No such file or directory
seems like the framebuffer broke and vtcon1 is just gone? host is gentoo with custom kernel i will supply kernel config or other things if needed, any help is appreciated thanks
Try rebinding the efi framebuffer after loading NVIDIA modules.
Also, you can try setting kernel parameter video=efifb:off
and using reset -s
command in EFI shell as mentioned here to reboot to host:
https://www.reddit.com/r/VFIO/comments/wp85ve/comment/ir9oe16/?utm_source=share&utm_medium=web2x&context=3
i still get the same errors after changing the framebuffer to rebind after the nvidia modules. and when i set video=efifb:off i get no display output when i boot the host machine
after some troubleshooting it seems like the issue is me not using a display manager. if i use sddm and modify my scripts to start and stop sddm it works just fine. it's just that i use startx to start my window manager that it's not working. i would prefer to not use a display manager
I'm not sure if this works, but try including this at the end of stop script:
su -l YOUR_USERNAME -c startx
.
If it doesn't work, rebooting the system on guest shutdown or using display manager might be the only option..
this does work but i can't use ttys. i'm guessing this is some error with the proprietary nvidia drivers since i can't use tty either with a display manager. thanks.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.