libvirt.libvirtError: internal error: Unknown PCI header type ‘127’ for device ‘0000:01:00.0’
After the laptop has been up for a bit - I start getting this error when trying to start the vm… Reboot fixes it.
I can still turn the video card on and off (seems to be working as on this laptop - the power button changes color when the dedicated gpu is on or off.
Restarting the libvirt service doesn’t seem to help it. Reboot does. I don’t know if it is a time thing or a go to sleep thing… Is there something else I should be resetting?
I turn the gpu off and on using
echo ‘_SB_.PCI0.PEG0.PEGP._OFF’ > /proc/acpi/call
echo ‘_SB_.PCI0.PEG0.PEGP._ON’ > /proc/acpi/call
this is a msi laptop from 2014 MSI GS60 2PC that is still alive and kicking. Love it. I use the dedicated video card pass through to run some cad software. This is a new install with debian bullseye. When it works - it works great. Then just stops working.
thanks!
sam
Oh - when it isn’t working lspic -v replies
01:00.0 3D controller: NVIDIA Corporation GK104M [GeForce GTX 860M] (rev ff) (prog-if ff)
!!! Unknown header type 7f
Kernel driver in use: vfio-pci
Kernel modules: nouveau
ok - not quite… when the video card is off
echo ‘_SB_.PCI0.PEG0.PEGP._OFF’ > /proc/acpi/call
01:00.0 3D controller: NVIDIA Corporation GK104M [GeForce GTX 860M] (rev ff) (prog-if ff)
!!! Unknown header type 7f
Kernel driver in use: vfio-pci
Kernel modules: nouveau
when it is on
echo ‘_SB_.PCI0.PEG0.PEGP._ON’ > /proc/acpi/call
01:00.0 3D controller: NVIDIA Corporation GK104M [GeForce GTX 860M] (rev a1)
Subsystem: Micro-Star International Co., Ltd. [MSI] GK104M [GeForce GTX 860M]
Flags: fast devsel, IRQ 11, IOMMU group 1
Memory at f5000000 (32-bit, non-prefetchable) [disabled] [size=16M]
Memory at e0000000 (64-bit, prefetchable) [disabled] [size=256M]
Memory at f0000000 (64-bit, prefetchable) [disabled] [size=32M]
I/O ports at e000 [disabled] [size=128]
Expansion ROM at f6000000 [disabled] [size=512K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [b4] Vendor Specific Information: Len=14 <?>
Capabilities: [100] Virtual Channel
Capabilities: [128] Power Budgeting <?>
Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
Capabilities: [900] Secondary PCI Express
Kernel driver in use: vfio-pci
Kernel modules: nouveau
(after I rebooted - so now the next time it fail I will see if turning it on changes to the correct info) Because it is working again.
sam
also - I get the same error if I don’t turn on the dedicated video card.
sam
ok - so it seems like when it comes out of sleep (closing/opening the lid) the video card stays
01:00.0 3D controller: NVIDIA Corporation GK104M [GeForce GTX 860M] (rev ff) (prog-if ff)
!!! Unknown header type 7f
Kernel driver in use: vfio-pci
Kernel modules: nouveau
whether it is on or off…
Ok - so… If the video card is ‘on’ when the lid is closed - it works when the lid is opened back up. I can actually fix the issue if I turn the card on - then close the lid and re-open it.
I have a script that turns the video card back off when the lid is opened back up. which seem to work ok - if the card is on when the lid is closed. So I thought I could do this…
#!/bin/sh
case $1/$2 in
pre/)
#echo “Going to $2…”
echo ‘_SB_.PCI0.PEG0.PEGP._ON’ > /proc/acpi/call
# Place your pre suspend commands here, or exit 0
# if no pre suspend action required
exit 0
;;
post/)
#echo “Waking up from $2…”
# Place your post suspend (resume) commands here, or exit 0
# if no post suspend action required
echo ‘_SB_.PCI0.PEG0.PEGP._OFF’ > /proc/acpi/call
;;
esac
(turning the card on before sleep) but it doesn’t seem to do it soon enough before sleep because it doesn’t work when enabled…
ok - wow - what a stream of consciousness… Yes the video card needs to be ‘on’ before it goes to sleep to make sure that it comes out of sleep working… My script above had an error - I must not have read the obvious directions.
Or exit 0 Duh
This seems to work now…
#!/bin/sh
case $1/$2 in
pre/)
#echo “Going to $2…”
# Place your pre suspend commands here, or exit 0
# if no pre suspend action required
echo ‘_SB_.PCI0.PEG0.PEGP._ON’ > /proc/acpi/call
;;
post/)
#echo “Waking up from $2…”
# Place your post suspend (resume) commands here, or exit 0
# if no post suspend action required
echo ‘_SB_.PCI0.PEG0.PEGP._OFF’ > /proc/acpi/call
;;
esac
So far so good… My laptop is back to working 100% the way I want it…
I installed the nonfree Debian Bullseye xfce a few months ago and had nothing but problems. Everything was just a bit off. It mostly worked but I would get an error when it was coming out of sleep, Sometimes it wouldn’t go to sleep. Bluetooth was so flakey… Just a bad experience. (I have been running linux in some flavor since 2005.) For work I installed the Debian cinnamon non-free bullseye. It has been a treat (5700g with a crap video card being passed to a windows 10 vm).
So I gave up and installed the same on my laptop. Other than the issue with the dedicated video card - which I think is now fixed - It has been awesome.
I don’t know why I had so many problems with xfce - I have used it for a long time. Liked its minimalist approach. I am liking cinnamon though.
sam
1 Like
I know the header 127
error only from regular graphics cards, cause that is the one you get when the card does not reset properly. Glad you got it to work as you intend.
not bad for a 7 year old laptop…
1 Like