Ubuntu Upgrade Had Our Old Nvidia GPU Begging For A Downgrade
The Reg FOSS desk spent some quality time downgrading Ubuntu to restore graphics acceleration. How and why would we do this?
Ubuntu 24.04 "Noble" is a long-term support version, and back in September it got its first point release. One of the biggest Ubuntu downstreams, Linux Mint, just put out its first point release to its Noble-based version too. This is the time when the more cautious type may consider upgrading. If you have an integrated Nvidia GPU that needs an Nvidia "Legacy" driver, you may want to hold fire – or even revert to an Ubuntu Jammy-based version.
We described this issue in Ubuntu in March when 24.04 went into beta testing, and we warned that the same problem also affects Debian 12 when the last point release of Debian 11 appeared in September. No solution is looming, nor does it look likely that one will, so we thought it might be useful to describe how we got one of our test ThinkPads working again.
Nvidia releases new models of GPU – and new major versions of its graphics drivers – quite frequently. Just like CPUs, they belong to families of related products. This means that any specific version of the Nvidia driver only supports certain recent families of GPU. The drivers for older GPUs then get relegated to "legacy" status, and are no longer updated. This causes two types of incompatibility issue: firstly, older drivers won't install or run on current kernels and those kernels' supporting tools; and secondly, some software requires features from newer drivers and won't work right on older ones.
The problem is that Nvidia's graphics drivers are proprietary code. Nobody outside the company can modify or update them to work with newer toolchains. The company is working on more-open drivers but as the bootnote in that story describes, although more of the driver is FOSS code, the company achieved this by moving lots of code into an impenetrable "firmware" binary – packages sometimes called BLOBs.
At the time of writing, versions 550 and 565 are current; 470, 390, and older are now considered legacy. Version 390 won't install on kernel 6.5 or newer. Worse still, the kernel version alone isn't the only issue. For instance, although it uses kernel 6.1, Debian 12 only includes version 535 and no older driver is supported. This also applies to Debian downstreams, such as MX Linux.
There are alternatives to the proprietary driver, but they have significant downsides. There is the FOSS Nouveau driver, which works on most Nvidia GPU models, but it can't deliver full acceleration, or even run the GPU at full speed – see the large areas of red ("TODO"), yellow ("MOSTLY"), and blue ("STALLED") on the Nouveau power management page. There is also NVK, which is new code based in part on the code headers that Nvidia has released, but it only supports some recent models of GPU.
The issue has bitten The Reg FOSS desk due to our fondness for older ThinkPads, notably with the old seven-row keyboard. We're not the only Reg hack to disdain the newer chiclet keyboards. Several older ThinkPads have integrated onboard discrete GPUs, which cannot be upgraded. For instance, ThinkWiki lists 11 models; this vulture owns no fewer than three of them.
We have tried several workarounds with newer versions of Ubuntu, Debian, and related distros. We have tried TeejeeTech's Ubuntu Kernel Upgrade Utility (UKUU), and its FOSS fork Mainline, to install theoretically compatible kernel versions from Canonical's own kernel repository. We've tried using a patched older driver. None of these worked.
So, most recently, we gave up and reverted. When upgrading a machine, if time and disk capacity permit, we try to preserve a copy of the older OS version in a separate partition. Boot a Ventoy key and use Gparted Live or similar to duplicate the root partition, if necessary give it a new UUID, edit the new copy's /etc/fstab
file to tell it where to find its new root partition, and then re-run update-grub
to add the partition to the GRUB startup menu.
Sadly, there wasn't room on our test T420 as it already had Windows 7, Windows 10, MX Linux, and Elementary OS in addition to Ubuntu. Its discrete Nvidia Quadro NVS 4200M is a supplementary chip to the CPU's integrated Intel HD 3000; the machine switches between them on the fly using Nvidia's Optimus technology, although you can turn this off in the firmware and set either as being the primary. The switching meant that nothing suddenly failed when we upgraded to 23.10 – we just saw some display corruption, which went away after a reboot.
![Upgrading an existing install of 23.04 triggered several worrying warnings. We literally don't know what to say, but it completed and works fine Upgrading an existing install of 23.04 triggered several worrying warnings. We literally don't know what to say, but it completed and works fine](https://regmedia.co.uk/2023/10/13/mantic-upgrade-warning.jpg?x=648&y=402&infer_y=1)
Upgrading an existing install of 23.04 triggered several worrying warnings. We literally don't know what to say, but it completed and works fine – click to enlarge
We still had a fully updated copy of 22.04.5 on a different machine – an X220, with no discrete GPU. We imaged that partition – from the command line using partclone, because Rescuezilla tries to be helpful and also copies the boot sector and things, which we didn't want. We compressed the image, copied it onto a USB key, copied it back onto the T420's data partition, unzipped it using MX Linux, and wrote it back on top of our Ubuntu partition. Then adjust the fstab
file, run update-grub
to add it to MX Linux's copy of GRUB, and try it. GRUB picked the wrong root partition, so we had to edit the boot command line to include root=/dev/sdb5
, then we were in business.
There's a mandatory last step: downgrade the kernel. "Jammy" now defaults to the 6.8 kernel from "Noble," thanks to the latest Ubuntu HWE update. That won't work with the legacy driver. To get back to the kernel 5.15 it shipped with, we did:
apt install linux-generic
Rebooted, checked it was working, and then removed the pesky linux-generic-hwe-22.04
and the too-new kernel it installed. With the linux-generic kernel, we have 5.15.00.130.128, and could use Ubuntu's "Software & Updates" tool to install version 390 of the Nvidia proprietary driver.
- WINE 10 is still not an emulator, but Windows apps won't know the difference
- OpenZFS 2.3 is here, with RAID expansion and faster dedup
- Better power management, security, and scheduling in Linux kernel 6.13
- Linux Mint 22.1 Xia arrives fashionably late
Everything now works very smoothly and we have full graphics acceleration again. We also removed MX Linux and replaced it with the Xfce-based Zorin OS Lite to have a fallback distro with working acceleration.
We thought we'd share this rather complicated multi-stage process, if only as an incentive to motivate people (ourselves included) to keep better backups. It was a lot of work for a 2011 laptop, but it's a good machine, with two SSDs, USB 3, and 16 GB of RAM. It's far behind state of the art, but it's still perfectly usable and has a better keyboard and more ports than any of its slim-but-unrepairable descendants. Every other part of the machine works perfectly with the most recent distros we've tried. Incidentally, the same steps work even when moving a partition from a BIOS machine to a UEFI one: just add the necessary GRUB support with sudo apt install grub-efi
.
Why go to such lengths, or at least, why explain it to the world? Two reasons. We think, from memory, that this installation of Ubuntu started out as version 13.10. It's about 12 years old now and has been upgraded repeatedly through about five LTS releases – and different laptops – and a few interim ones too. It's a testament to the long-term durability of the OS. It's also got over a decade of customizations and extra apps which would be a pain to reproduce. Secondly, we described the process because most of this – downgrading the kernel, adding the graphics drivers, and so on – applies equally to a new clean install, which would be somewhat quicker.
There's abundant room for improvement here. We wish that the upgrade tools in distros such as Ubuntu, Debian, and Linux Mint were smart enough to detect and list hardware that won't be supported before offering to upgrade. It would also be very helpful if Nvidia published the source code to older legacy drivers for discontinued hardware. Last, but worth a shot, it would be handy if Nouveau could automatically detect and run in Optimus mode.
Sadly, though, all seem unlikely to happen. So, if you need the services of a non-upgradable GPU on Nvidia's legacy list, stick with the Jammy Jellyfish – possibly with a free Ubuntu Pro account and extended support. Alternatively, the relevant versions of the downstream distros based upon Ubuntu 22.04, such as Mint 21, Elementary 7, Zorin OS 17, Linux Lite 6, and the various others. And if you're on Debian 11 or a relative thereof, it might be time to switch distros. ®
From Chip War To Cloud War: The Next Frontier In Global Tech Competition
The global chip war, characterized by intense competition among nations and corporations for supremacy in semiconductor ... Read more
The High Stakes Of Tech Regulation: Security Risks And Market Dynamics
The influence of tech giants in the global economy continues to grow, raising crucial questions about how to balance sec... Read more
The Tyranny Of Instagram Interiors: Why It's Time To Break Free From Algorithm-Driven Aesthetics
Instagram has become a dominant force in shaping interior design trends, offering a seemingly endless stream of inspirat... Read more
The Data Crunch In AI: Strategies For Sustainability
Exploring solutions to the imminent exhaustion of internet data for AI training.As the artificial intelligence (AI) indu... Read more
Google Abandons Four-Year Effort To Remove Cookies From Chrome Browser
After four years of dedicated effort, Google has decided to abandon its plan to remove third-party cookies from its Chro... Read more
LinkedIn Embraces AI And Gamification To Drive User Engagement And Revenue
In an effort to tackle slowing revenue growth and enhance user engagement, LinkedIn is turning to artificial intelligenc... Read more