Table of Contents

Debian 12 on a Thinkpad Yoga 14

NVIDIA driver compilation issues screw up Liquorix kernels

If the installs go real bad, you'll get kernel panics when trying to boot with the system complaining about missing initramfs.

Neovim/Wayland Clipboard

Laptop sleep

Bookworm's Linux kernel 6.2 with Nvidia driver 525 did not agree with my laptop wrt sleep. I had to:

snippet.diff
--- a/nvidia-drm/nvidia-drm-drv.c
+++ b/nvidia-drm/nvidia-drm-drv.c
@@ -20,6 +20,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
+#include <linux/version.h>
 #include "nvidia-drm-conftest.h" /* NV_DRM_AVAILABLE and NV_DRM_DRM_GEM_H_PRESENT */
 
 #include "nvidia-drm-priv.h"
@@ -873,7 +874,11 @@ static void nv_drm_update_drm_driver_features(void)
 
     nv_drm_driver.dumb_create      = nv_drm_dumb_create;
     nv_drm_driver.dumb_map_offset  = nv_drm_dumb_map_offset;
+// Rel. commit "drm: remove dumb_destroy callback" (Christian König, 26 Jan 2023)
+// NB: No resources are leaked, the kernel releases the same resources by default
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
     nv_drm_driver.dumb_destroy     = nv_drm_dumb_destroy;
+#endif
 #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
 }
 
-- 
2.40.1

Liquorix 6.5 and NVIDIA 525

The signature of the get_user_pages function changed in Linux kernel 6.5 and above. Apply this patch to get 525 working with Liquorix: https://gist.github.com/Fjodor42/cfd29b3ffd1d1957894469f2def8f4f6

snippet.bash
cd /usr/src/nvidia-current-525.125.06
wget https://gist.github.com/Fjodor42/cfd29b3ffd1d1957894469f2def8f4f6
patch -i nvidia-535xx-fix-linux-6.5.patch -p 1

AppImageLauncher on Debian

The .deb didn't work so I'm building from scratch from the master branch:

sudo apt install checkinstall automake libtool wget libglib2.0-dev libcairo2-dev librsvg2-dev libfuse3-dev libfuse-dev libssl-dev qtbase5-dev qtdeclarative5-dev libqcoro5quick0 libxpm-dev qttools5-dev-tools patchelf

Debian 12 Bluetooth

If Bluetooth stops working, some PulseAudio stuff likely made it in. Clean it out and start fresh:

snippet.bash
apt install pipewire-audio
apt install libspa-0.2-bluetooth

Overloaded USB bus and write timeouts

If you're getting a kernel panic doing heavy reads and writes to USB devices with the message blocked for more than 120 seconds, slow down the writes and get the system to flush the write cache more often. The issue is that the computer can't write cached writes to disk fast enough and the kernel freaks out. I got this while rsyncing one drive to another on a mini PC.

# /etc/sysctl.conf

vm.dirty_background_ratio = 5
vm.dirty_ratio = 10

And to be extra safe, slow down the data transfer:

snippet.bash
rsync -vra --progress --bwlimit=1500 /src /dest

Kubuntu 24.04

Kdenlive AppImages and fonts

checkinstall -> fpm

checkinstall is ancient and not maintained, but `fpm` can do the same thing:

snippet.sh
./configure --prefix=/tmp/build/usr/local
make -j3
make install
cd /tmp/build
fpm -s dir -t deb -n <package name>-<version> ./usr
sudo dpkg -i <package name>-<version>.deb

https://stackoverflow.com/a/43882862