Enable PCI hotplug in kernel so FN keys work on Asus Laptops

Some FN+x functions do not work on Asus laptops because asus-wmi and asus-nb-wmi are not present in the qubes kernel.

FN+ (f3+f4) buttons for Backlit keyboard do not work.

FN+ (f9) button for Touchpad disable does not work.

The reason asus-wmi and asus-nb-wmi are missing is because qubes “intentionally” disables PCI hotplug for security reasons (make it harder to perform DMA attack by plugging in ExpressCard/Thunderbolt device).

My laptop doesn’t even have an ExpressCard slot or a thunderbolt port.

Even if a laptop did have either of these ports the vulnerability PCI hotplug causes is only for physical attacks (performed by having physical access to the machine) which would not bother me and “probably” a lot of others too.

The post below by @fepitre explains that PCI hotplug can be re-enabled by deleting 1 line from the “config-qubes” file and then rebuilding the kernel.

I could probably just about do this if I had some instructions to follow but at the moment I am a bit clueless.
I think once the kernel has been rebuilt you have to tell qubes to use it somehow and I “think” this is done differently depending on whether you use UEFI or legacy boot.

Something about bumping the rel version was also mentioned but I don’t really understand this ? Maybe has something to do with stopping qubes from overwriting the changes when it updates ?

So yeah basically if anyone can give me some clear step by steps on what i need to do I would very much appreciate it.
I am fully prepared to do a fresh install of Qubes if that is what is needed.

Also if any of the Qubes devs read this, would you please consider adding an option during installation to set PCI hotplug to on or off, I think that would help a lot of people.

Thank You

p.s I am using uefi

Sorry to reply to my own post but I had a thought today that maybe there is a way to set PCI hotplug to on in the ISO so when I install qubes everything works and I do not have to go crazy trying to rebuild a kernel ?

Any thoughts anyone ? Is this possible ?


A post was split to a new topic: Qubes Builder: fails to build kernel

The only way is to build the Qubes kernel manually and drop the configuration we set for disabling PCI hotplug. You would have to maintain by your own this.

7 posts were split to a new topic: How to Build a Qubes Component?