Maui Forums
[solved] Nvidia driver (legacy 304) won’t stay downgraded - Printable Version

+- Maui Forums (https://forums.mauilinux.org)
+-- Forum: Maui Support (https://forums.mauilinux.org/forumdisplay.php?fid=74)
+--- Forum: Software & Applications (https://forums.mauilinux.org/forumdisplay.php?fid=77)
+--- Thread: [solved] Nvidia driver (legacy 304) won’t stay downgraded (/showthread.php?tid=24123)



[solved] Nvidia driver (legacy 304) won’t stay downgraded - chatan - 21st November 2016

I have an older onboard nVidia graphics card, namely: NVIDIA C61 [GeForce 6100 nForce 405]
For a long time I’ve had to use the proprietary nvidia-304 drivers, but since the version went to 304.132, I can only get a black screen, so I downgraded to 304.131.  Coming out of suspend, all is good, but after a few wake-ups I get the "screen locker is broken" screen.  I can follow the loginctl unlock-sessions instructions and get back to the desktop.   I’ve tired numerous things including purging nvidia* and installing the 304-131 drivers with commands like:
  1. [font=Arial]sudo apt-get remove --purge nvidia-* libcuda*[/font]
  2. [font=Arial]sudo apt-get install nvidia-304-updates=304.131\* libcuda1-304-updates=304.131\* nvidia-opencl-icd-304-updates=304.131\*[/font]
  3. [font=Arial]Went to synaptic and held those 3 packages.[/font]
Which will work for a day or two, but inevitably, the drivers will revert to 304.132 and can only get black screens.

When things are good here what I have:
Code:
user@tiger-maui:~$ dmesg | grep NVIDIA
[   17.308192] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  304.131  Sun Nov  8 21:43:33 PST 2015
Code:
user@tiger-maui:~$ dpkg -l | grep -i nvidia
ii  libcuda1-304-updates                            304.131-0ubuntu3                                amd64        NVIDIA CUDA runtime library
rc  nvidia-304                                      304.131-0ubuntu3                                amd64        NVIDIA legacy binary driver - version 304.131
ii  nvidia-304-updates                              304.131-0ubuntu3                                amd64        NVIDIA legacy binary driver - version 304.131
rc  nvidia-opencl-icd-304                           304.131-0ubuntu3                                amd64        NVIDIA OpenCL ICD
ii  nvidia-opencl-icd-304-updates                   304.131-0ubuntu3                                amd64        NVIDIA OpenCL ICD
ii  nvidia-settings                                 361.42-0ubuntu1                                 amd64        Tool for configuring the NVIDIA graphics driver


Code:
user@tiger-maui:~$ inxi -G
Graphics:  Card: NVIDIA C61 [GeForce 6100 nForce 405]
         Display Server: X.Org 1.18.4 driver: nvidia Resolution: 1440x900@59.89hz
         GLX Renderer: GeForce 6100 nForce 405/integrated/SSE2 GLX Version: 2.1.2 NVIDIA 304.131


Then without me doing anything, the 304.132 drivers show up like magic and I have the black screens, broken screen lockers on resume, etc:
Code:
user@tiger-maui:~$ dpkg -l | grep -i nvidia
ii  libcuda1-304                                    304.132-0ubuntu0.16.04.2                        amd64        NVIDIA CUDA runtime library
iF  nvidia-304                                      304.132-0ubuntu0.16.04.2                        amd64        NVIDIA legacy binary driver - version 304.132
iU  nvidia-304-updates                              304.132-0ubuntu0.16.04.2                        amd64        Transitional package for nvidia-304
iU  nvidia-opencl-icd-304                           304.132-0ubuntu0.16.04.2                        amd64        NVIDIA OpenCL ICD
iU  nvidia-opencl-icd-304-updates                   304.132-0ubuntu0.16.04.2                        amd64        Transitional package for nvidia-opencl-icd-304
ii  nvidia-settings                                 361.42-0ubuntu1                                 amd64        Tool for configuring the NVIDIA graphics driver

When I have the problems, I also get this:

Code:
NVRM: API mismatch: the client has the version 304.132, but this kernel module has the version 304.131.  Please make sure that this kernel module and all NVIDIA driver components have the same version.

This is what my synaptic looks like holding the 304.131 packages:
[font=Arial][Image: YhHUo1GOeRhBq8Xp_YlyoY9LYYIXXoe1zMiK2vfX...qA9blpcsjK]

I've been googling all sort of terms, and trying various things, but all end up with the same story.  
Help ??
[/font]



RE: Nvidia driver (legacy 304) won’t stay downgraded - AJSlye - 21st November 2016

OK, you will need to re-install the legacy driver every time the kernel and/or legacy driver gets updated, this is normal.
The only way to avoid this would be to hold back both the Nvidia driver and kernel, but this may also require holding back other external driver modules as well (aka Broadcom WL STA).


RE: Nvidia driver (legacy 304) won’t stay downgraded - leszek - 21st November 2016

I suppose you did not hold back all necessary packages. Did you check xserver-xorg-video-nvidia-legacy-304xx. That needs holding back aswell and explains the API error you see.


RE: Nvidia driver (legacy 304) won’t stay downgraded - chatan - 22nd November 2016

Quote:re-install the legacy driver every time the kernel and/or legacy driver gets updated,


But I'm not doing any updates.   The 304-131 gets switched to 304-132 like every day or more.


Quote:Did you check xserver-xorg-video-nvidia-legacy-304xx.
I have lots of xserver-xorg-video..... stuff but nothing about -nvidia or -304xx that I can find.


See if gives clues:
1) When I resumed this morning:  I checked dpkg -l | grep -i nvidia and the drivers were still at 304.131, so great.
2) I read the forums and was going to open Synaptic to check for xserver-xorg-video-nvidia-legacy-304xx, but I got the "could not get a lock" message
3)  Weird because I wasn't doing anything with apt-get or aptitude
4)  Tried Synaptic a couple of more times, and it eventually opened.
5) ...but.....   I did dpkg -l | grep -i nvidia again and the drivers were now at 304.132
...it's the devil I tell you.....

Thanks again.


RE: Nvidia driver (legacy 304) won’t stay downgraded - leszek - 22nd November 2016

Did you activated some automatic updating somewhere?
It sounds like it.
Usually this should not happen as we don't ship with auto update enabled by default.


RE: Nvidia driver (legacy 304) won’t stay downgraded - chatan - 22nd November 2016

(22nd November 2016, 10:55)leszek Wrote: Did you activated some automatic updating somewhere? 

Not that I know of.   My synaptic preferences (see screenshot) doesn't seem to indicate any auto upgrades.

I found at package installed called "unattended-upgrades"
It has a config file  ( /etc/apt/apt.conf.d/50unattended-upgrades )  that has this:


Code:
// Automatically upgrade packages from these (origin:archive) pairs
Unattended-Upgrade::Allowed-Origins {
    "${distro_id}:${distro_codename}";
    "${distro_id}:${distro_codename}-security";
//    "${distro_id}:${distro_codename}-updates";
//    "${distro_id}:${distro_codename}-proposed";
//    "${distro_id}:${distro_codename}-backports";
};

// List of packages to not update (regexp are supported)
Unattended-Upgrade::Package-Blacklist {
//    "vim";
//    "libc6";
//    "libc6-dev";
//    "libc6-i686";
};

Looks like I should try to put the nvidia stuff in the blacklist section.   I guess it ignores the pinning in synaptic.
Cheers


RE: Nvidia driver (legacy 304) won’t stay downgraded - leszek - 22nd November 2016

The unattended-upgrades should be disabled by default.


From the debian wiki (also applies to ubuntu base here)
Quote:To activate unattended-upgrades, you need to ensure that the apt configuration stub /etc/apt/apt.conf.d/20auto-upgrades contains at least the following lines:

Code:
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

Is this configured that way on your system ?

Can you also make sure that mintUpdate isn't upgrading those packages. It should have an autoupgrade also available in its settings.


RE: Nvidia driver (legacy 304) won’t stay downgraded - chatan - 22nd November 2016

leszek Wrote:Can you also make sure that mintUpdate isn't upgrading those packages. It should have an autoupgrade also available in its settings.

I don't find an option for auto-upgrades in mintupdate...see screenshot



(22nd November 2016, 12:31)leszek Wrote: Is this configured that way on your system ?
Yes,  I have "1"s in that file;  I changed them to "0", so crossing fingers -  I'll report back...

unattended-upgrades appears to be the culprit:
cat /var/log/unattended-upgrades/unattended-upgrades-dpkg.log  ends with....

Code:
DKMS: install completed.
Setting up nvidia-304-updates (304.132-0ubuntu0.16.04.2) ...
Setting up nvidia-opencl-icd-304 (304.132-0ubuntu0.16.04.2) ...
Setting up nvidia-opencl-icd-304-updates (304.132-0ubuntu0.16.04.2) ...
Processing triggers for libc-bin (2.23-0ubuntu4) ...
Processing triggers for initramfs-tools (0.122ubuntu8.5) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-47-generic
Log ended: 2016-11-22  05:14:14

Thanks for (hopefully) leading me to the solution!


RE: [solved] Nvidia driver (legacy 304) won’t stay downgraded - chatan - 8th December 2016

(22nd November 2016, 14:33)chatan Wrote: Yes,  I have "1"s in that file (/etc/apt/apt.conf.d/20auto-upgrades);  I changed them to "0", so crossing fingers -  I'll report back...
That worked.  Haven't had the driver update after numerous days and reboots.


Quote:$dmesg | grep NVIDIA
[    0.000000] ACPI: DSDT 0x00000000BBEE3180 006395 (v01 NVIDIA NVDAACPI 00001000 MSFT 0100000E)

[   15.258604] nvidia: module license 'NVIDIA' taints kernel.
[   15.282804] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  304.131  Sun Nov  8 21:43:33 PST 2015

Cheers