Page 1 of 3

Best way to stop the kernel from updating

Posted: Sat Feb 10, 2024 11:00 am
by dancytron
What's the best way to stop the kernel from downloading a new kernel and rebuilding the drivers. It seems like it's not actually updating, just staging each new kernel, but I'd like to just turn it off.

Can I just pin it in synaptic or is there a better MX specific way?


Kind of a generic question, but it seems like you want this anyway.

Code: Select all

System:
  Kernel: 6.1.0-13-amd64 [6.1.55-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/antiX-Frugal-6.1.0-13-amd64/vmlinuz bdir=antiX-Frugal-6.1.0-13-amd64
    buuid=2618304c-b5be-4cdc-bcc4-5eee05256f09 quiet splasht nosplash lang=en_US kbd=us
    tz=America/Chicago persist_root
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23.2_x64 Libretto October 15  2023 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Laptop System: HP product: HP 15 Notebook PC v: N/A serial: <superuser required> Chassis:
    type: 10 serial: <superuser required>
  Mobo: HP model: 8015 v: 11.27 serial: <superuser required> UEFI: American Megatrends v: F.34
    date: 12/07/2015
Battery:
  ID-1: BAT0 charge: 30.5 Wh (100.0%) condition: 30.5/30.5 Wh (100.0%) volts: 12.5 min: 10.9
    model: Hewlett-Packard Primary type: Li-ion serial: N/A status: full cycles: 274
CPU:
  Info: model: AMD A8-7410 APU with AMD Radeon R5 Graphics bits: 64 type: MCP arch: Puma level: v2
    built: 2014-15 process: GF 28nm family: 0x16 (22) model-id: 0x30 (48) stepping: 1
    microcode: 0x7030105
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB
    L2: 2 MiB desc: 1x2 MiB
  Speed (MHz): avg: 1281 high: 1294 min/max: 1000/2200 boost: enabled scaling:
    driver: acpi-cpufreq governor: ondemand cores: 1: 1258 2: 1294 3: 1282 4: 1291 bogomips: 17566
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT disabled
  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: Retpolines, STIBP: disabled, RSB filling, PBRSB-eIBRS: Not
    affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Mullins [Radeon R4/R5 Graphics] vendor: Hewlett-Packard driver: radeon v: kernel
    alternate: amdgpu arch: GCN-2 code: Sea Islands process: GF/TSMC 16-28nm built: 2013-17 ports:
    active: eDP-1 empty: HDMI-A-1 bus-ID: 00:01.0 chip-ID: 1002:9851 class-ID: 0300
  Device-2: Microdia HP Webcam type: USB driver: uvcvideo bus-ID: 2-1.2:3 chip-ID: 0c45:651b
    class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X: loaded: radeon
    unloaded: fbdev,modesetting,vesa dri: radeonsi gpu: radeon display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.21x7.99") s-diag: 414mm (16.31")
  Monitor-1: eDP-1 mapped: eDP model: AU Optronics 0x10ec built: 2014 res: 1366x768 hz: 60
    dpi: 101 gamma: 1.2 size: 344x193mm (13.54x7.6") diag: 394mm (15.5") ratio: 16:9 modes:
    max: 1366x768 min: 640x480
  API: OpenGL v: 4.5 Mesa 22.3.6 renderer: KABINI ( LLVM 15.0.6 DRM 2.50 6.1.0-13-amd64)
    direct-render: Yes
Audio:
  Device-1: AMD Kabini HDMI/DP Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel
    bus-ID: 00:01.1 chip-ID: 1002:9840 class-ID: 0403
  Device-2: AMD FCH Azalia vendor: Hewlett-Packard driver: snd_hda_intel v: kernel
    bus-ID: 00:14.2 chip-ID: 1022:780d class-ID: 0403
  API: ALSA v: k6.1.0-13-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: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8188EE Wireless Network Adapter vendor: Hewlett-Packard driver: rtl8188ee
    v: kernel modules: wl pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 01:00.0
    chip-ID: 10ec:8179 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Device-2: Realtek RTL810xE PCI Express Fast Ethernet vendor: Hewlett-Packard driver: r8169
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 02:00.0 chip-ID: 10ec:8136
    class-ID: 0200
  IF: eth0 state: down mac: <filter>
Bluetooth:
  Device-1: Edimax Bluetooth Adapter type: USB driver: btusb v: 0.8 bus-ID: 3-1:2
    chip-ID: 7392:c611 class-ID: e001 serial: <filter>
  Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 3.0 lmp-v: 5.1
    sub-v: 8a6b hci-v: 5.1 rev: 9a9
  Info: acl-mtu: 1021:6 sco-mtu: 255:12 link-policy: rswitch hold sniff park
    link-mode: peripheral accept service-classes: rendering, capturing, object transfer, audio,
    telephony
Drives:
  Local Storage: total: 465.76 GiB used: 140.23 GiB (30.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: HGST (Hitachi) model: HTS545050A7E680 size: 465.76 GiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: A3J0 scheme: GPT
Partition:
  Message: No partition data found.
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 5.86 GiB used: 1.3 MiB (0.0%) priority: -2 dev: /dev/sda7
    maj-min: 8:7
Sensors:
  System Temperatures: cpu: 59.0 C mobo: N/A gpu: radeon temp: 55.0 C
  Fan Speeds (RPM): N/A
Repos:
  Packages: pm: dpkg pkgs: 2180 libs: 1088 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak 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
    3: deb-src http://deb.debian.org/debian/ bookworm non-free-firmware non-free contrib main
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
    1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/google-earth-pro.list
    1: deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://mirrors.rit.edu/mxlinux/mx-packages/mx/repo/ bookworm main non-free
Info:
  Processes: 234 Uptime: 18h 3m wakeups: 2 Memory: 10.63 GiB used: 3.63 GiB (34.1%) 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
SecureBoot enabled

Re: Best way to stop the kernel from updating  [Solved]

Posted: Sat Feb 10, 2024 11:04 am
by fehlix
remove both meta packages
linux-image-amd64
linux-headers-amd64

Re: Best way to stop the kernel from updating

Posted: Sat Feb 10, 2024 11:15 am
by dancytron
Perfect.

Thanks.

Re: Best way to stop the kernel from updating

Posted: Sat Feb 10, 2024 11:29 am
by Charlie Brown
@dolphin_oracle would you consider such an option in MX Tweak (maybe "Other" tab) ? "Disable auto-updating of the default kernel" (or so) ... Cause it's simple in the background: remove/install when checked/unchecked ...

Re: Best way to stop the kernel from updating

Posted: Sat Feb 10, 2024 12:12 pm
by dolphin_oracle
Charlie Brown wrote: Sat Feb 10, 2024 11:29 am @dolphin_oracle would you consider such an option in MX Tweak (maybe "Other" tab) ? "Disable auto-updating of the default kernel" (or so) ... Cause it's simple in the background: remove/install when checked/unchecked ...
its not actually that simple, as mx-tweak has no internet or package handling capabilities.

however, the "debian 64 bit" and "debian 32 bit" kernel entries in mxpackageinstaller actually just handle the metapackages. I'll change the description on those to be more clear.

Re: Best way to stop the kernel from updating

Posted: Sat Feb 10, 2024 12:14 pm
by Charlie Brown
Ok... maybe any other tools just to make it 1 click and gui ... ? (Maybe MX Cleanup ) ...

Re: Best way to stop the kernel from updating

Posted: Sat Feb 10, 2024 1:38 pm
by fehlix
dancytron wrote: Sat Feb 10, 2024 11:15 am Perfect.

Thanks.
Of, course we have another way,
in case you want to keep the meta-packages installed but also stopping kernel-auto-update,
you can set both meta-packages on "hold", by running this:

Code: Select all

sudo apt-mark hold linux-image-amd64 linux-headers-amd64
This would tell apt to ignore the newer-versioned meta-packages to upgrade
and by this also keeps the current installed as newest without upgrading to a newer version
of the image and header packages.
So incase you ever want to upgrade to the latest again,
just un-hold botth again:

Code: Select all

sudo apt-mark unhold linux-image-amd64 linux-headers-amd64
which makes both ready for upgrading to the latest kernel.

Re: Best way to stop the kernel from updating

Posted: Sat Feb 10, 2024 3:50 pm
by figueroa
You get fresh kernels because important bugs had been closed and/or security issues have been fixed. Not allowing the kernel to update is short-sighted. When the kernel updates on your frugal or live-usb installation you should 1. remaster, 2. reboot, then run the 3. live-usb-kernel-updater, in that order. Finally, In order to actually be running the new kernel, 4. reboot one more time.

You don't have to do those things immediately after the kernel updates, but you should put it on your schedule. The whole process should take less than half an hour. For safety's sake, I usually make a snapshot immediately before doing a remaster. But, even if one does not make a snapshot, the remaster/reboot process has a built in roll-back feature in case of a glitch. (I've never had a glitch.)

Re: Best way to stop the kernel from updating

Posted: Sat Feb 10, 2024 5:45 pm
by oops
"What's the best way to stop the kernel from downloading a new kernel ...and rebuilding the drivers.?"

FI: to have less drivers (dkms) to rebuild , mx-cleanup can help too (for MX23 & MX21). (plug your wifi devices first)

viewtopic.php?p=764208#p764208

Re: Best way to stop the kernel from updating

Posted: Sun Feb 11, 2024 1:46 am
by Stevo
I believe the OP's headers metapackage was already removed after 6.1.0-13, which is why the OP is getting the new kernel linux-image updates, but no headers, leading to all the dkms build failures.