{"id":5521,"date":"2023-02-21T22:54:12","date_gmt":"2023-02-21T17:24:12","guid":{"rendered":"https:\/\/www.suramya.com\/blog\/?p=5521"},"modified":"2023-02-21T22:54:12","modified_gmt":"2023-02-21T17:24:12","slug":"fixing-problems-with-nvidia-driver-on-debian-unstable-after-latest-upgrade","status":"publish","type":"post","link":"https:\/\/www.suramya.com\/blog\/2023\/02\/fixing-problems-with-nvidia-driver-on-debian-unstable-after-latest-upgrade\/","title":{"rendered":"Fixing problems with nvidia-driver on Debian Unstable after latest upgrade"},"content":{"rendered":"<p>Earlier today I ran my periodic update of my main desktop that is running Debian Unstable. The upgrade finished successfully and since a new kernel was released with this update I restarted the system to ensure that all files\/services etc are running the same version. After the reboot the GUI refused to start and I thought the problem could be because of a NVIDIA kernel module issue so I tried to reboot to an older kernel but that didn&#8217;t work either. Then I tried running <em>apt-get dist-upgrade<\/em> again which gave me the following error:<\/p>\n<pre class='code'>root@StarKnight:~# apt-get dist-upgrade \r\nReading package lists...\r\nBuilding dependency tree...\r\nReading state information...\r\nYou might want to run 'apt --fix-broken install' to correct these.\r\nThe following packages have unmet dependencies:\r\n nvidia-driver : Depends: nvidia-kernel-dkms (= 525.85.12-1) but 515.86.01-1 is installed or\r\n                          nvidia-kernel-525.85.12 or\r\n                          nvidia-open-kernel-525.85.12 or\r\n                          nvidia-open-kernel-525.85.12\r\nE: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).<\/pre>\n<p>So I ran the <em>apt &#8211;fix-broken install<\/em> command as recommended and that failed as well with another set of errors:<\/p>\n<pre class='code'>\r\nroot@StarKnight:\/var\/log# apt --fix-broken install\r\nReading package lists... Done\r\nBuilding dependency tree... Done\r\nReading state information... Done\r\nCorrecting dependencies... Done\r\n0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.\r\n1 not fully installed or removed.\r\nAfter this operation, 0 B of additional disk space will be used.\r\ndpkg: dependency problems prevent configuration of nvidia-driver:\r\n nvidia-driver depends on nvidia-kernel-dkms (= 525.85.12-1) | nvidia-kernel-525.85.12 | nvidia-open-kernel-525.85.12 | nvidia-open-kernel-525.85.12; however:\r\n  Version of nvidia-kernel-dkms on system is 515.86.01-1.\r\n  Package nvidia-kernel-525.85.12 is not installed.\r\n  Package nvidia-open-kernel-525.85.12 is not installed.\r\n  Package nvidia-open-kernel-525.85.12 is not installed.\r\n\r\ndpkg: error processing package nvidia-driver (--configure):\r\n dependency problems - leaving unconfigured\r\nErrors were encountered while processing:\r\n nvidia-driver\r\nE: Sub-process \/usr\/bin\/dpkg returned an error code (1)<\/pre>\n<p>Looking at the logs, I didn&#8217;t see any major errors but I did see the following message:<\/p>\n<pre class='code'>2023-02-21T19:48:27.668268+05:30 StarKnight kernel: [    3.379006] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  515.86.01  Wed Oct 26 09:12:38 UTC 2022\r\n2023-02-21T19:48:27.668286+05:30 StarKnight kernel: [    4.821755] NVRM: API mismatch: the client has the version 525.85.12, but\r\n2023-02-21T19:48:27.668287+05:30 StarKnight kernel: [    4.821755] NVRM: this kernel module has the version 515.86.01.  Please\r\n2023-02-21T19:48:27.668287+05:30 StarKnight kernel: [    4.821755] NVRM: make sure that this kernel module and all NVIDIA driver\r\n2023-02-21T19:48:27.668288+05:30 StarKnight kernel: [    4.821755] NVRM: components have the same version.<\/pre>\n<p>Searching on the web didn&#8217;t give me a solution but since I am running the Debian Unstable branch it is expected that once in a while things might break and sometimes they break quite spectacularly&#8230; So I started experimenting and tried removing and reinstalling the nvidia-driver but that was failing as well because the package was expecting nvidia-kernel-dkms version 525.85.12 but we had 515.86.01-1 installed. <\/p>\n<pre class='code'>root@StarKnight:~# apt-get install nvidia-driver\r\nReading package lists... Done\r\nBuilding dependency tree... Done\r\nReading state information... Done\r\nThe following NEW packages will be installed:\r\n  nvidia-driver\r\n0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.\r\nNeed to get 0 B\/494 kB of archives.\r\nAfter this operation, 1,398 kB of additional disk space will be used.\r\nSelecting previously unselected package nvidia-driver.\r\n(Reading database ... 439287 files and directories currently installed.)\r\nPreparing to unpack ...\/nvidia-driver_525.85.12-1_amd64.deb ...\r\nUnpacking nvidia-driver (525.85.12-1) ...\r\ndpkg: dependency problems prevent configuration of nvidia-driver:\r\n nvidia-driver depends on nvidia-kernel-dkms (= 525.85.12-1) | nvidia-kernel-525.85.12 | nvidia-open-kernel-525.85.12 | nvidia-open-kernel-525.85.12; however:\r\n  Version of nvidia-kernel-dkms on system is 515.86.01-1.\r\n  Package nvidia-kernel-525.85.12 is not installed.\r\n  Package nvidia-open-kernel-525.85.12 is not installed.\r\n  Package nvidia-open-kernel-525.85.12 is not installed.<\/pre>\n<p>Now I had a couple of options, first was to wait for a couple of days (if I am lucky) for someone to upload the correct versions of the packages to the channel. The second option was to remove the package and installed the Open Source version of the Nvidia driver. I didn&#8217;t want to do that because that package is a memory hog and doesn&#8217;t work that well either. The last option was to try to manually install the older version (525.85.12) of the nvidia-kernel-dkms package and this is what I decided to go with, a search on the Debian Packages site gave me the .deb file for nvidia-kernel-dkms and firmware-nvidia-gsp (a dependency for the dkms package). I downloaded both the packages and installed them using the following command:<\/p>\n<pre class='code'>root@StarKnight:\/home\/suramya\/Media\/Downloads# dpkg -i firmware-nvidia-gsp_525.85.12-1_amd64.deb \r\nroot@StarKnight:\/home\/suramya\/Media\/Downloads# dpkg -i nvidia-kernel-dkms_525.85.12-1_amd64.deb <\/pre>\n<p>Once the packages were successfully downgraded I rebooted the system and the GUI came up without issues post the reboot. <\/p>\n<p>Moral of the story is that you need to be prepared to have to troubleshoot your setup if you are running Debian Unstable or Debian Testing on your system. If you don&#8217;t want to do that then you should stick to Debian Stable which is rock solid or one of the other distributions such as Ubuntu or Linux Mint etc.<\/p>\n<p>&#8211; Suramya<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Earlier today I ran my periodic update of my main desktop that is running Debian Unstable. The upgrade finished successfully and since a new kernel was released with this update I restarted the system to ensure that all files\/services etc are running the same version. After the reboot the GUI refused to start and I [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[18,13,2],"tags":[],"class_list":["post-5521","post","type-post","status-publish","format-standard","hentry","category-computer-software","category-linuxunix-related","category-techie-stuff"],"_links":{"self":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/5521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/comments?post=5521"}],"version-history":[{"count":1,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/5521\/revisions"}],"predecessor-version":[{"id":5522,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/5521\/revisions\/5522"}],"wp:attachment":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/media?parent=5521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/categories?post=5521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/tags?post=5521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}