Fixes for Xubuntu 26.04 after upgrade with NVIDIA driver

Here are some fixes I had to do after upgrading to Xubuntu 26.04 when using the NVIDIA driver. I hope this helps someone.

First off switching virtual consoles (Ctrl+Alt+F1-F8) in Linux didn’t work properly when logged in to the Xorg session, it works to switch to text console, but when switching back to X session it gives black screen.

In order to fix this I had to edit the following kernel boot parameters (using ‘vim’ in example, any editor is fine).

sudo vim /etc/default/grub

Then find the line starting with “GRUB_CMDLINE_LINUX_DEFAULT” and add the kernel options as follows:

GRUB_CMDLINE_LINUX_DEFAULT="nvidia-drm.modeset=1 nvidia_drm.fbdev=1 nvidia.NVreg_PreserveVideoMemoryAllocations=1"

Then generate grub /boot config with:
sudo update-grub

Second, I had screen tearing when watching videos using ‘mpv’, ‘vlc’, ‘mplayer’ and other programs I tested regardless how “Sync to Vblank” setting was toggled in NVIDIA settings.

So I added an Xorg config file like this (in my case this file didn’t exist):
sudo vim /etc/X11/xorg.conf.d/10-nvidia.conf

With this content:
Section "Device"
Identifier "Nvidia Card"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "NoLogo" "true"
Option "metamodes" "nvidia-auto-select +0+0 { ForceCompositionPipeline = On }"
EndSection

You need to reboot the computer for these changes to take effect.

This part is not related to the NVIDIA driver, but if you like GNU Core Utilities written in C like me as opposed to the Rust versions installed by default, this is how you can install those:

sudo apt-get install --allow-remove-essential coreutils-from-gnu coreutils-from-uutils-

This still leaves ‘sudo’ in Rust which can be changed with:

sudo update-alternatives --config sudo

Select “sudo.ws” for C version.

Done.

1 Like