How to clear old dkms drivers  [Solved]

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
MikeR
Posts: 258
Joined: Sun Jun 25, 2023 6:42 am

How to clear old dkms drivers

#1 Post by MikeR »

Greetings Oh excellent gurus of MX support!

There seem to be several unneeded / unwanted / outdated drivers, according to the following;
$ dkms status
/usr/sbin/dkms.mx status
8812au/5.13.6, 6.1.0-35-amd64, x86_64: installed
8812au/5.13.6, 6.1.0-37-amd64, x86_64: installed
rtl8188fu/1.0, 6.1.0-23-amd64, x86_64: installed (WARNING! Diff between built and installed module!)
rtl8188fu/1.0, 6.1.0-35-amd64, x86_64: installed
rtl8188fu/1.0, 6.1.0-37-amd64, x86_64: installed
MX-Cleanup suggests the following:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'rtl8814au-dkms' is not installed, so not removed
Package 'rtl8821au-dkms' is not installed, so not removed
Package 'rtl8821cu-dkms' is not installed, so not removed
Package 'rtl8821ce-dkms' is not installed, so not removed
Package 'broadcom-sta-dkms' is not installed, so not removed
The following packages will be REMOVED:
rtl8812au-dkms*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 33.4 MB disk space will be freed.
Do you want to continue? [Y/n]
(I chose 'n')

Are they in any way interfering? Should they be purged? Can they be ignored?
I occasionally use different wifi dongles, and would prefer to keep that functionality.
I don't want to do anything that might break that, and I'm wary of messing up...

All advice would be gratefully accepted.
QSI follows:

Code: Select all

Snapshot created on: 20250525_1446
System:
  Kernel: 6.1.0-37-amd64 [6.1.140-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-37-amd64 root=UUID=<filter> ro quiet splash
  Desktop: GNOME v: 43.9 info: gnome-panel wm: Metacity v: 3.46.1 dm: LightDM v: 1.32.0
    Distro: MX-23.6_x64 Libretto June 26 2024 base: Debian GNU/Linux 12 (bookworm)
Machine:
  Type: Desktop System: HP product: HP ProDesk 400 G4 DM (TAA) v: SBKPF
    serial: <superuser required> Chassis: type: 6 serial: <superuser required>
  Mobo: HP model: 83F3 v: KBC Version 07.D2.00 serial: <superuser required> UEFI: HP
    v: Q23 Ver. 02.25.00 date: 09/28/2023
CPU:
  Info: model: Intel Core i5-8500T bits: 64 type: MCP arch: Coffee Lake gen: core 8 level: v3
    note: check built: 2018 process: Intel 14nm family: 6 model-id: 0x9E (158) stepping: 0xA (10)
    microcode: 0xFA
  Topology: cpus: 1x cores: 6 smt: <unsupported> cache: L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB
    L2: 1.5 MiB desc: 6x256 KiB L3: 9 MiB desc: 1x9 MiB
  Speed (MHz): avg: 800 min/max: 800/3500 scaling: driver: intel_pstate governor: powersave
    cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 bogomips: 25199
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: indirect_target_selection status: Not affected
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT disabled
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: IBRS; IBPB: conditional; STIBP: disabled; RSB filling;
    PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Graphics:
  Device-1: Intel CoffeeLake-S GT2 [UHD Graphics 630] vendor: Hewlett-Packard driver: i915
    v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports: active: DP-1 empty: DP-2,
    DP-3, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:3e92 class-ID: 0300
  Device-2: Jieli USB PHY 2.0 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-4.3:38
    chip-ID: 1224:2a25 class-ID: 0102
  Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9 driver: X: loaded: intel
    dri: i965 gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22") s-diag: 582mm (22.93")
  Monitor-1: DP-1 mapped: DP1 model: Lenovo C24-20 serial: <filter> built: 2021 res: 1920x1080
    hz: 60 dpi: 92 gamma: 1.2 size: 530x300mm (20.87x11.81") diag: 604mm (23.8") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  API: OpenGL v: N/A renderer: N/A direct-render: N/A
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Hewlett-Packard driver: snd_hda_intel v: kernel
    bus-ID: 1-4.3:38 chip-ID: 1224:2a25 alternate: snd_soc_skl,snd_sof_pci_intel_cnl class-ID: 0102
    bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403
  Device-2: Jieli USB PHY 2.0 type: USB driver: snd-usb-audio,uvcvideo
  API: ALSA v: k6.1.0-37-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: off 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Hewlett-Packard
    driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 02:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Realtek RTL8192EU 802.11b/g/n WLAN Adapter type: USB driver: rtl8xxxu bus-ID: 1-8:3
    chip-ID: 0bda:818b class-ID: 0000 serial: <filter>
  IF: wlan0 state: up mac: <filter>
Drives:
  Local Storage: total: 238.47 GiB used: 25.46 GiB (10.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: MZVLB256HAHQ-000H7 size: 238.47 GiB
    block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: EXD70H2Q temp: 39.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 40 GiB size: 39.08 GiB (97.69%) used: 9.34 GiB (23.9%) fs: ext4
    dev: /dev/nvme0n1p5 maj-min: 259:2
  ID-2: /home raw-size: 40 GiB size: 39.08 GiB (97.69%) used: 16.13 GiB (41.3%) fs: ext4
    dev: /dev/nvme0n1p6 maj-min: 259:3
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 50 (default 100)
  ID-1: swap-1 type: partition size: 10 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/nvme0n1p7
    maj-min: 259:4
Sensors:
  System Temperatures: cpu: 41.0 C pch: 49.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: pm: dpkg pkgs: 2510 libs: 1201 tools: apt,apt-get,aptitude,gnome-software,nala,synaptic
    pm: rpm pkgs: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://nl.mxrepo.com/mx/repo/ bookworm main non-free
  Active apt repos in: /etc/apt/sources.list.d/protonvpn-stable.sources
    1: deb https://repo.protonvpn.com/debian stable main
Info:
  Processes: 258 Uptime: 1d 15h 38m wakeups: 1 Memory: 7.6 GiB used: 2.17 GiB (28.5%)
  Init: SysVinit v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0
  alt: 12 Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI
Thanks,
Mike
Old RSTS hack
Registered Linux user #542196

User avatar
DukeComposed
Posts: 1499
Joined: Thu Mar 16, 2023 1:57 pm

Re: How to clear old dkms drivers

#2 Post by DukeComposed »

MikeR wrote: Tue May 27, 2025 2:51 am There seem to be several unneeded / unwanted / outdated drivers, according to the following;

Are they in any way interfering? Should they be purged? Can they be ignored?
I occasionally use different wifi dongles, and would prefer to keep that functionality.
I don't want to do anything that might break that, and I'm wary of messing up...
Is something broken right now? If not, there's no harm in leaving your machine alone.

DKMS drivers need a specific kernel. If you have, say, kernel 6.1.38 installed and you upgrade to 6.1.39, the DKMS packages will rebuild a new driver (a.k.a. "kernel module") for the new kernel. If you never use an rtl8812au wireless device, then you don't need the driver.

Under normal circumstances, people only have a few wireless options and it's generally safe to uninstall the DKMS driver packages of hardware they are not using and never will. Since you mentioned you have different wifi dongles you use, you could either (a) uninstall the drivers, hope for the best, and re-install the ones you need when you need them with a different network interface or (b) go through your wifi dongles one at a time and check which driver each one uses. If any one or more dongles uses one of your DKMS wireless drivers, keep that package.

Removing DKMS packages doesn't really do anything except save you some time when you install new kernels, at the risk of not having that driver later when you may need it. Keeping DKMS package around you don't need will waste a little bit of time when you add new kernels, so you can weigh the options and decide for yourself if you want to keep them around or not.

User avatar
MikeR
Posts: 258
Joined: Sun Jun 25, 2023 6:42 am

Re: How to clear old dkms drivers

#3 Post by MikeR »

@DukeComposed

Sorry to use this expression, "Yes, but..."
I have kernels 6.1.0-35 and -37 currently installed, so I suppose the relevant drivers will be removed when the kernels are removed.
OTOH
rtl8188fu/1.0, 6.1.0-23-amd64, x86_64: installed (WARNING! Diff between built and installed module!)
does not correspond to an installed kernel
For no other reason than the wish to "tidy up" how to go about purging it?
(I have been accused of being "obsessive compulsive" before...)

Thanks,
Mike
Old RSTS hack
Registered Linux user #542196

User avatar
DukeComposed
Posts: 1499
Joined: Thu Mar 16, 2023 1:57 pm

Re: How to clear old dkms drivers  [Solved]

#4 Post by DukeComposed »

MikeR wrote: Tue May 27, 2025 6:18 am OTOH
rtl8188fu/1.0, 6.1.0-23-amd64, x86_64: installed (WARNING! Diff between built and installed module!)
does not correspond to an installed kernel
For no other reason than the wish to "tidy up" how to go about purging it?
"man dkms" will be useful here, as the "dkms" command support severals options, one of which is "remove" if you provide a module name and kernel version.

User avatar
MikeR
Posts: 258
Joined: Sun Jun 25, 2023 6:42 am

Re: How to clear old dkms drivers

#5 Post by MikeR »

Read man dkms
tried what seemed to be the correct command, and got:
$ sudo dkms remove rtl8188fu/1.0 -k 6.1.0-23-amd64
[sudo] password for mike:
/usr/sbin/dkms.mx remove rtl8188fu/1.0 -k 6.1.0-23-amd64
Module rtl8188fu 1.0 is not installed for kernel 6.1.0-23-amd64 (x86_64). Skipping...
Module rtl8188fu 1.0 is not built for kernel 6.1.0-23-amd64 (x86_64). Skipping...
and
$ sudo dkms uninstall rtl8188fu/1.0 -k 6.1.0-23-amd64
/usr/sbin/dkms.mx uninstall rtl8188fu/1.0 -k 6.1.0-23-amd64
Module rtl8188fu 1.0 is not installed for kernel 6.1.0-23-amd64 (x86_64). Skipping...
Again, OTOH, after those two attempts, checked again, and saw:
$ dkms status
dkms status/usr/sbin/dkms.mx status
8812au/5.13.6, 6.1.0-35-amd64, x86_64: installed
8812au/5.13.6, 6.1.0-37-amd64, x86_64: installed
rtl8188fu/1.0, 6.1.0-35-amd64, x86_64: installed
rtl8188fu/1.0, 6.1.0-37-amd64, x86_64: installed
So something worked, even though the the messages reported "Skipping..."

Thanks, @DukeComposed,
Mike
Old RSTS hack
Registered Linux user #542196

Post Reply

Return to “MX Help”