I installed Ubuntu Jammy a few months ago, when it was released, on a desktop computer. It was a terrible experience: crashes now and then, and the Wayland session was not working well on some applications. After a week, I uninstalled it immediately and switched to Fedora on that computer.
Then, a new point release came out, 22.04.1. I heard that, in the meantime, many bugs were fixed. I decided to give it another chance. In particular, I decided to install that on an older computer, a Dell m3800, because it comes with an integrated video card and a “terrible” Nvidia card, which is well-known to give headaches to Linux users 😉 In the past, I used Bumblebee on such a computer to keep the power consumption low. However, Bumblebee gave me problems in the past, and I seem to understand that it is not actively maintained anymore. So, let’s try a fresh installation of Ubuntu Jammy and see how it deals with the Nvidia card.
The installation went fine and smoothly. In the end, when rebooting into the new installation, I could verify that the Nvidia drivers were installed automatically and working correctly (meaning no crashes or other issues)!
Since it uses Nvidia, Ubuntu does not show any gear icon on the login screen to switch the graphical session: it’s X11 automatically, and you cannot change it. I guess that’s done because Nvidia does not work correctly in a Wayland session.
Another nice thing is that it detected my huge screen resolution, 3200×1800, and automatically enabled 200% scaling. However, I seem to remember that this is a feature of Gnome itself.
Having said that, I found using the Nvidia drivers really a problem: the computer gets immediately hot, the fans get pretty noisy, and it looks like the battery does not entirely charge even when connected to the AC. It also looks like the battery goes down a bit, even when connected to the AC.
I opened the Nvidia settings. However, it looks like Hybrid mode will not work with this version of the driver.
Of course, when running on battery, the power consumption is too much, and the battery would drain in less than two hours, as reported by powertop. That’s the reported consumption (even when the computer is idle):
33.6 W of power consumption is too much.
Since I’m not using graphical intensive software, I tried to switch to the integrated Intel graphics card. You cannot select this choice in the Nvidia settings because it’s greyed out (you can find many posts on the Internet reporting this problem without a solution). However, we can use the command line:
$ sudo prime-select intel
Info: selecting the intel profile
Updating the initramfs. Please wait for the operation to complete:
Let’s reboot, and now the gear icon appears, and you can select the Wayland session since the Nvidia card is not used. By the way, Nvidia settings still have the greyed-out entry for the integrated card, but at least it recognized that’s the one selected:
The power consumption on battery is better (about 15 W, i.e., half), but I seem to understand that the Nvidia card itself it’s still using power since it’s not completely turned off:
At least the computer is not that hot anymore, and the battery seems to charge correctly.
Let’s try to use a tool to turn the Nvidia card off: EnvyControl.
Let’s install that:
sudo apt install python3-pip
mkdir -p ~/git
git clone https://github.com/geminis3/envycontrol.git
sudo pip3 install .
As noted here, there are a few additional steps when installing EnvyControl in Ubuntu:
sudo prime-select on-demand
sudo systemctl disable gpu-manager.service
We could use the envycontrol command to set the card, but let’s now install a Gnome extension with a GUI for the switch: GPU profile selector.
Let’s also activate the extension.
Let’s reboot, and now, in the Gnome dropdown menu about the battery and power profile, we also have the menu entries to select the card:
Remember that we had to set the “on-demand” mode for installing EnvyControl. That’s why the “Hybrid” entry is selected.
Let’s select “Integrated” and reboot; now, the Nvidia card should be off.
The power consumption on battery is even better now (13.8 W):
If we switch to the Wayland session, it even improves a bit:
I find this installation usable, and I saw no issues for the moment.
That’s all for now!