When starting to learn Android Development recently, I decided that I’d use my desktop gaming computer to run Android Studio. My choice of Linux distribution has for a very long time been Debian, and I have been happily running the sid release for years without problem.
My computer has an Intel i5-12500 processor, 32GB of RAM and an Nvidia RTX 3070. It’s served me well, but I’ve never run Linux on it. I am using a Gigabyte B660M Gaming X motherboard.
I always knew that Nvidia and Linux haven’t gone particularly well together, often excaserbated by the non-free nature of the drivers. I was willing to give the nouveau driver a try, but got all sorted of weird tearing and artifacting.
There were a few things from stopping me changing my /etc/apt/sources.list
file to include non-free
and non-free-firmware
, updating, and successfully installing nvidia-driver
.
After installation and a reboot, I was greeted with a failure and no graphics drivers loaded. The first section of this page gives a pretty good overview: secure Boot is enabled, and the kernel module isn’t signed.
Followed the instructions here (which were surprisingly easy to follow).
I ignored the part about modifying /etc/dkms/framework.conf
, and instead just ran these two commands:
sudo cp /var/lib/shim-signed/mok/MOK.der /var/lib/dkms/mok.pub
sudo cp /var/lib/shim-signed/mok/MOK.priv /var/lib/dkms/mok.key
DKMS is preconfigured to look in these locations (at least according to the comments in /etc/dkms/framework.conf
).
Next, I installed the kernel headers with sudo apt install inux-headers-$(uname -r)
, and the kernel module was built and signed.
I rebooted and enrolled my MOK key when prompted.
Everything worked! Or so I thought… turns out there’s a BIOS setting I need to change, otherwise my computer won’t wake from sleep…
After a fair bit of Googling, I found this Reddit thread and more specifically this comment.
boot into BIOS> Advance mode > Settings > IO Ports > IOAPIC 24-119 Entries - Disable
It worked… Crazy.