-
-
Notifications
You must be signed in to change notification settings - Fork 116
Don't apply PM overrides to thunderbolt when PCI hotplug enabled #727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Don't apply PM overrides to thunderbolt when PCI hotplug enabled #727
Conversation
These are only needed because Qubes disabled PCI hotplugging in kernel config. If the user compiled a kernel with it enabled, the kernel does PM better.
017e5de
to
454dd54
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #727 +/- ##
=======================================
Coverage 70.55% 70.55%
=======================================
Files 61 61
Lines 13642 13642
=======================================
Hits 9625 9625
Misses 4017 4017
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Would it be possible for the Linux kernel to handle power management even with PCI hotplug disabled? |
I have no idea, sadly. I think @HW42 can probably explain it. My understanding is that the reason for his suspend PM patches is because of this inability to do power managment when virtualisation is in use and PCI hotplug disabled. I'm curious about the details myself. |
See description of the patch adding this option: https://github.com/QubesOS/qubes-linux-kernel/blob/main/xen-pciback-pm-suspend.patch |
It doesn't really explain the problem that motivated the patch though, beyond that it doesn't work "for some, not yet fully clear, reasons". But I guess maybe we still don't know what's causing it. If so, it's not possible to answer @DemiMarie's question. |
It's actually pretty simple what causes it. This line https://github.com/torvalds/linux/blob/c8bc81a52d5a2ac2e4b257ae123677cf94112755/drivers/pci/pci-acpi.c#L820 causes pciehp_is_native to return false for any Thunderbolt ports, which in turn causes pci_bridge_d3_possible to return false for those ports: https://github.com/torvalds/linux/blob/c8bc81a52d5a2ac2e4b257ae123677cf94112755/drivers/pci/pci.c#L3060 and hence the kernel completely blocks D3 for the ports. |
These are only needed because Qubes disabled PCI hotplugging in kernel config. If the user compiled a kernel with it enabled, the kernel does PM better.