What's `acpi_call` alternative in Fedora 42

I have a Legion Laptop with Hybrid GPU (amd/nvidia) and trying to power down dGPU when I don’t need it.

I tried envycontrol which sets udev rules to disable the hardware. But it doesn’t help and ends up consuming constant 28W on dGPU.

A fellow Legion User seems to have found some success using Arch.

And I tried with Arch, it works for me too. Telling the ACPI Firmware to turn dGPU off seems to be the solution.

echo "_SB.PCI0.GPP0.PG00._OFF" | sudo tee /proc/acpi/call

But the thing is I use Fedora as my default. And I do need Secureboot. Nvidia drivers works for me when I use the RPM Fusion Guide and use the key in akmods.

sudo mokutil --import /etc/pki/akmods/certs/public_key.der

But I’m unable to modprob acpi_call due to kernel module not being signed ( I think ).
And the acpi_call is from some random package from GitHub. I checked the code and it’s legit but still installing a random .rpm seems weird.

So What’s the Fedora and akmods way of telling the ACPI Firmware to turn off that PC ?

If the module you’re trying to install is not from rpmfusion and distributed via an akmod-* package it won’t get automatically signed.

You will have to sign it yourself, provided that you trust it.

For that, you can either generate your MOK key or use the akmods one. There was a really good guide for Fedora in “System Administrator’s Guide: Signing Kernel Modules for Secure Boot”, but that document is gone.

I wrote the following script back then to make it easier for me. I used the missing document above, a third-party GIST and some adaptations of mine --please check it out and see what and how it’s done before running it:

NOTE: it’s been a while since I last used it, as now everything I need is covered by RPMFusion’s akmods automatic signing.