Thursday, January 19, 2023

Cinnamon Desktop / Gnome Desktop Nvidia Graphic Driver Fix

I switched to Cinnamon Desktop a few days ago and did my first update today.  After the update I started getting an error when I logged on saying  "Your system is currently running without video hardware acceleration, you may experience poor performance and high CPU usage".  I noticed a Kernel Update during the update which was a clue to what happened.  I also booted to Gnome Desktop and noticed my Nvidia drivers were not working nor would they reinstall. In both Cinnamon and Gnome Desktop in Additional Drivers, section it showed Nvidia drivers active but system info showed X.ORG X or Nouveau drivers were in use.  In Steam all my games were running at 1 or 2 frames a second.  In addition I noticed that my option to logon to Gnome Wayland Desktop was missing as an option too.

To fix your Nvidia drivers if they broke after a kernel update it may be caused by missing headers. To fix the missing headers open a Terminal Window and type the following command:

sudo apt install linux-headers-$(uname -r)

After rebooting, the above command fixed all my Nvidia driver problems.  Below, in the Trouble Shooting Section, are some of the commands and tools I used trying to solve this problem.


Trouble Shooting Section:

If missing headers are not your troubles here are a few thing to help you diagnose the problem.  Open a Terminal Window and type:

inxi -Fxxxz

This will display a very useful and long list of things about your system.  For our purpose we are only interested the GRAPHICS: section (see screen shot below for what a correct Nvidia install looks like)



This command will let you know if your system sees your video card.  If it doesn't it may be a problem in BIOS:

sudo lshw -C display




This command will display more information from the NVIDIA System Management Interface program.  It can do a lot more than display info so read it's manual here: Link to nvidia-smi PDF manualNote: that this command may not run if your Nvidia driver installation is broken.

nvidia-smi

Output of nvidia-smi on a working machine



This command will use nvidia-smi to display your Nvidia driver version:
 
nvidia-smi --query-gpu=driver_version --format=csv


To make changes to your Nvidia driver settings (launch Nvidia X Server Setting GUI) using the following command.  Leave out the SUDO if you just want to view setting in the GUI.

 sudo nvidia-settings


Sometimes you need to completely remove the Nvidia drivers to fix them.  To completely remove your Nvidia Drivers from your system with Terminal Commands type the following: 

sudo apt-get purge nvidia*
sudo apt --purge autoremove

After you removed your Nvidia drivers you will need to reinstall them.  To do this you will need to figure out what Nvidia drivers are available.  To do this use the following command to a list all Nvidia driver's names: 

apt-cache search 'nvidia-driver-' | grep '^nvidia-driver-[[:digit:]]*'



After you've found the driver version you want to install use the following three (3) commands to reinstall your Nvidia Drivers.  NOTE: Change the "nvidia-driver-525" part to the name of the driver you want to install ( the apt-cache search 'nvidia-driver-' | grep '^nvidia-driver-[[:digit:]]*' command above will provide you with the needed driver name)

sudo apt update
sudo apt upgrade
sudo apt install --reinstall nvidia-driver-525


Another, more complete, install command you can use in place of sudo apt install --reinstall nvidia-driver-525 is: (again replace the 525 with your desired version number) :

sudo apt install nvidia-driver-525 nvidia-dkms-525


Once you've installed/re-installed your desired driver version reboot your system with

sudo reboot


After the reboot, verify your driver install using the nvidia-smi command (above) to verify the installation.


Well that's it, that's everything I went through trying to fix the "Your system is currently running without video hardware acceleration, you may experience poor performance and high CPU usage" .  I had just switched to Cinnamon Desktop a couple of days ago and thought I'd ruined my system on it's first update.  I was getting ready to reinstall my complete operating system when I stumbled onto a solution to someone else's problem.  The "missing headers" was a suggestion to fix their problem.  It didn't work for them, but it did for me.





Monday, January 16, 2023

Dumped Gnome Desktop for Cinnamon Desktop

I have become sick of trying to track down a memory leak in Gnome Desktop on my Ubuntu 22.04.  It eats up 12gb of ram over a 4 day period.  logging off and back on fixes it but I shouldn't have to do this.  I tried logging on using Wayland and Classic Gnome, neither of which fixed the problem.  I was using the Ubuntu desktop at logon but it had the same issue.  I also disabled all the Extensions which slowed it down but didn't stop it.  

In addition to the memory leak, I have become annoyed at the Gnome Desktop Development Team for removing features and "dumbing down" the desktop to the point to where it is just a picture display machine.  Oh, they will tell you that you can add the missing features back in with Extensions but then the memory leaks start and since they don't have or change their Extensions API, the Extensions rarely work from one version to the next.  When you are releasing a new version of your desktop and the most exciting new feature is a new theme then it's time to move on.

What I want in my desktop is a functional file manage with more features than just copy, cut and paste (Yes I'm talking about you Nautilus), I want desktop shortcuts built in, and the ability to customize my desktop more than just changing the background image.  What I don't want is an Apple IOS Tablet ripoff like Gnome 3.x has become.  I've tried Gnome 3 vanilla, Ubuntu Gnome 3, KDE Plasma, Cinnamon, Xfce, and Mate. Of all those, Cinnamon, comes the closest to what I want.  KDE Plasma was good but was a bit too "busy" for me, Xfce and Mate were alright too just a little too "lite" for what I was looking for.  The sad thing is, all these other desktops were better than Gnome 3.x in my opinion, why Ubuntu keeps it as their main build is beyond me. 


The Cinnamon Desktop

Enough ranting lets install the Cinnamon Desktop.  I figured it would be harder than it was to change your desktop or I would have done this months ago.  Okay, open a Terminal Window and type the following two command.  Wait until the first command finishes before starting the second one.

sudo apt update

sudo apt install cinnamon-desktop-environment

Once the commands are finished all you need to do is reboot your computer.  Then on the logon screen, click on the little gear cog in the lower right corner which will bring up a menu that will let you select your Desktop.  Once you've clicked on your desktop choice, just type in your password like normal and your done.  You should now see your new Desktop.  If you don't like the new Desktop just log out and select the desktop you want.

Sorry for the bad picture but it's your logon screen.