Work Around: Nvidia 304xx Bug with Modern Kernel
February 2, 2016
I run Arch on an older Intel Dual Core PC as a media center, which uses a pretty old, but relatively high memory Nvida Card. After upgrading Arch, I ran into a bug with Nvidia’s legacy 304xx driver and the latest kernel, which prevented XFCE/Xorg from properly starting.
The bug, aside from just the obvious no XFCE, was:
modprobe: ERROR: could not insert 'nvidia': Unknown symbol in module, or unknown parameter (see dmesg) dmesg nvidia: Unknown symbol mtrr_del (err 0) nvidia: Unknown symbol mtrr_add (err 0)
After a bit of digging, I came across several bugs on the topic from various distros, including an Arch one bug report, which indicates that the bug was introduced in Nvidia 304.128 driver on Kernel 4.3.
Per the bug, I found the easiest way to fix it was to just enable the Arch LTS Kernel, which uses an older version of the Linux Kernel, at the time of this writing 4.1.16-1, which works a bit better with legacy hardware.
Warning: The below involves changing your grub settings, so use caution, make backups, and as with any time you mess with grub, you should be comfortable booting to alternate media(like a live CD) if something goes wrong.
1) First, install the LTS Kernel, LTS Headers(optional,) and LTS Nvidia Driver. Depending on your hardware, you may need other LTS software like if you run an older Realtek network card.
pacman -S linux-lts linux-lts-headers nvidia-304xx-lts
2) As root, make a backup of your /boot/grub/grub.cfg file
cp /boot/grub/grub.cfg ~/grub.cfg.bac
3) Update /boot/grub/grub.cfg to use the LTS Headers(again you should be comfortable fixing with a Live CD before messing with grub)
In the first grub menuentry section, probably titled ‘Arch Linux,’ find the two lines(which will probably be a bit different depending on your install):
linux /vmlinuz-linux root=UUID=xxx-xxx-xxx-xxx- rw quiet echo 'Loading initial ramdisk ...' initrd /initramfs-linux.img
Add ‘lts’ to both the linux and initrd lines as shown below, so that they read /vmlinuz-linux-lts and /initramfs-linux-lts respectively:
linux /vmlinuz-linux-lts root=UUID=xxx-xxx-xxx-xxx- rw quiet echo 'Loading initial ramdisk ...' initrd /initramfs-linux-lts.img
4) Reboot your system and if all goes well you should now be able to get your display working. If your system doesn’t boot at all, you can revert your grub.cfg to the backup you made. Otherwise, you may need to do a bit more troubleshooting.