Kernels galore and no NVIDIA driver in sight

Little Girl littlergirl at gmail.com
Sat Dec 21 18:14:57 UTC 2024


Hey there,

Keith via ubuntu-users wrote:
>On 12/20/24 8:19 AM, Little Girl wrote:

>> apt list --installed | grep "linux-image"
>
>$ man apt-patterns
>
>It'll save you a little typing, and you won't have to pipe results
>to grep to filter out what you need as regex is built-in
>
>$ apt list ~i~nlinux-image

Thanks. Between you and Ralph, my collection of snippets and commands
grows and has becomes more interesting and useful all the time.

>> WARNING: apt does not have a stable CLI interface. Use with caution
>> in scripts.
>
>Add the following lines to a file and place it in
[SNIP]

Thanks. Noted.

>> That gave me 118 lines of output (!!!), so I'm attaching it to this
>> message as a text file instead of pasting it here. Can any of that
>> be cleaned out? It seems excessive.
>
>the entries that begin with "rc" means that those packages are not 
>installed, but have been removed. However, they have config files
>that are still left on the system. You can remove them with apt

There are 93 of those in that output, which would leave me with a
nice, neat 25 lines.

>$ sudo apt -s purge ~c

Ouch. That gave output of 363 lines that I've attached to this
message as a text file.

>You can also run the following command but I would check apt's sim 
>output first to make sure nothing is removed unintentionally.
>
>$ sudo apt -s autopurge

I'll wait to do that until I've heard back from you on whether the
attached output looks good to remove or not.

>> modinfo /usr/lib/modules/$(uname
>> -r)/kernel/drivers/video/nvidia.ko | grep version
>
>the modinfo command internally runs "uname -r" and automatically 
>searches "/lib/modules" for modules so you shouldn't have to specify
>a full path.

Okay. It works fine without the path.

>But I would use lsmod to actually see what kernel modules are loaded
>since modinfo doesn't tell you if a module is in use or not. It just
>lists some module metadata, available parameters, device ids that it
>works with, and file location.
>
>$ lsmod |grep -i nvidia

The output from that one is:

nvidia_uvm           1511424  0
nvidia_drm             77824  4
nvidia_modeset       1306624  14 nvidia_drm
nvidia              56741888  913 nvidia_uvm,nvidia_modeset
drm_kms_helper        311296  1 nvidia_drm
drm                   622592  8 drm_kms_helper,nvidia,nvidia_drm

>$ modinfo nvidia

Some of the output from that one seems like it would be better not to
share in public. I'm assuming this is the part you'd be interested in:

filename:       /lib/modules/5.15.0-130-generic/updates/dkms/nvidia.ko
firmware:       nvidia/535.183.01/gsp_tu10x.bin
firmware:       nvidia/535.183.01/gsp_ga10x.bin
alias:          char-major-195-*
version:        535.183.01
supported:      external
license:        NVIDIA
srcversion:     E1D7E062E93D47A443165F6
alias:          pci:v000010DEd*sv*sd*bc06sc80i00*
alias:          pci:v000010DEd*sv*sd*bc03sc02i00*
alias:          pci:v000010DEd*sv*sd*bc03sc00i00*
depends:        drm
retpoline:      Y
name:           nvidia
vermagic:       5.15.0-130-generic SMP mod_unload modversions 
sig_id:         PKCS#7

Let me know if there's another line or if there are other lines that
you were after and I'll run it again.

>It looks like all the entries that have kernel specific versions in 
>their package names are in "rc" status. So if you remove those
>(you'd be removing just the residual config files anyway since all
>other package files have already been removed), you'll be left with
>mostly 535 version nvidia packages which is likely what your running
>since you only have the 535 nvidia Xorg video driver package
>installed.

Thank you for all of this help and information. Would there be any
harm in my doing the sudo apt autoremove command that I usually run
after getting a new kernel to remove the oldest one? My goal is just
not to make my NVIDIA card unhappy.

-- 
Little Girl

There is no spoon.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: output_of_purge_simulation.txt
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20241221/ec03d3d5/attachment.txt>


More information about the ubuntu-users mailing list