December 2023 Bits#

December 12 - Getting old nvidia drivers back#

On this laptop, I’ve had the best luck with 535.113.01 drivers, so I will install that straight from NVIDIA!

sudo apt remove ~nnvidia system76-driver-nvidia
sudo reboot
# make sure to select "Hybrid Graphics" in BIOS

Now that I’m booted back in, I try running the installer from NVIDIA and get this error message:

The major and minor number of the compiler used to
compile the kernel:

x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38

does not match the compiler used here:

cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

That error points me to this: https://forums.developer.nvidia.com/t/compiler-mismatch-error-while-installing-cuda-12-0-on-ubuntu-22-04/262976

So basically, I have gcc (cc points to gcc) version 11.4.0 on my system, and I need to use a more up to date version.

sudo apt install g++-12 gcc-12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12
# since we already have gcc-11 installed, we can do this so we can easily revert back to it later
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 90 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11
# now if we need to revert back:
sudo update-alternatives --config gcc
gcc --version
# should print version 12

Now that we have that figured out, I get this error:

WARNING: Unable to determine the path to install the libglvnd EGL vendor library config files. Check that
         you have pkg-config and the libglvnd development libraries installed, or specify a path with
         --glvnd-egl-config-path.

Easy solution:

sudo apt install build-essential libglvnd-dev pkg-config

We now progress a little farther and get this warning: WARNING: Failed to delete some directories. See /var/log/nvidia-installer.log for details.. I’ll ignore this warning for now… It completes successfully! Now to reboot…

And… it seems to have worked! Driver Version: 535.113.01   CUDA Version: 12.2 yay!

Well, this driver seems to work just as well as the 545 driver I had installed, and this is more glitchy when I put my laptop to sleep. Maybe I need to install some package that helps Pop!_OS interact better with these drivers, but that’s a problem for future me. I’ll likely remove these drivers and try installing from the official Pop!_OS repos, and if that 535 driver still doesn’t work well, I guess I’ll go back to 545.

Uninstalling these drivers#

# show installed drivers:
dpkg -l | grep -i nvidia

sudo apt-get remove --purge '^nvidia-.*' 'libnvidia*'
sudo rm /etc/X11/xorg.conf
# or instead
sudo nvidia-uninstall

sudo reboot

December 12 - Updating Server#

Followed this guide to update shork: https://linuxiac.com/how-to-upgrade-to-debian-12-from-debian-11/

I eventually ran into a problem where even basic docker compose commands took forever. I found that this might be the solution: https://stackoverflow.com/a/68172225/5434860

# if this is a value less than 1000,
cat /proc/sys/kernel/random/entropy_avail
# then a simple fix is this:
apt install haveged

Attempting to run this showed me that I have broken NVIDIA dependencies, which might mean that the slow docker compose commands is just a symptom of a bigger problem. I fix the broken packages, reboot, then install haveged, then reboot, and docker compose up -d is still as slow as ever. My entropy_avail also did not increase. I just down’d most of my docker containers and then up’d them again and that seemed to fix it.

Note

(Update) docker compose was slow because my system was still booting up (I think)

I also had the problem of transcoding not working. I tried editing /etc/pve/lxc/100.conf again to update the numbers, but that didn’t fix it. I install libcuda1 on my Proxmox host, and a CUDA version is reported in nvidia-smi now (yay). CUDA is not reported on shork, so I’ll install that on shork too.

Well, installing CUDA didn’t help. Maybe I’ll remove that later.

I have a couple of possible problems relating to 525.147.05:

None of those help… But here are some logs:

Dec 13, 2023 03:33:59.572 [139818227186488] ERROR - [Req#14d/Transcode] [FFMPEG] - Cannot load libnvidia-encode.so.1
Dec 13, 2023 03:33:59.572 [139818227186488] ERROR - [Req#14d/Transcode] [FFMPEG] - The minimum required Nvidia driver for nvenc is 455.28 or newer
Dec 13, 2023 03:33:59.597 [139818227186488] WARN - [Req#14d/Transcode] Codecs: avcodec_open2 returned -1 for encoder 'h264_nvenc'
Dec 13, 2023 03:33:59.597 [139818227186488] DEBUG - [Req#14d/Transcode] The Whole Nine Yards - video.bitrate limitation applies: 26181 > 2000
Dec 13, 2023 03:33:59.597 [139818227186488] DEBUG - [Req#14d/Transcode] MDE: Cannot direct stream video stream due to profile or setting limitations
Dec 13, 2023 03:33:59.597 [139818227186488] DEBUG - [Req#14d/Transcode] Codecs: testing h264 (decoder) with hwdevice vaapi
Dec 13, 2023 03:33:59.597 [139818227186488] DEBUG - [Req#14d/Transcode] Codecs: hardware transcoding: testing API vaapi for device '' ()
Dec 13, 2023 03:33:59.597 [139818227186488] DEBUG - [Req#14d/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Generic error in an external library
Dec 13, 2023 03:33:59.597 [139818227186488] DEBUG - [Req#14d/Transcode] Could not create hardware context for h264
Dec 13, 2023 03:33:59.597 [139818227186488] DEBUG - [Req#14d/Transcode] Codecs: testing h264 (decoder) with hwdevice nvdec
Dec 13, 2023 03:33:59.598 [139818227186488] DEBUG - [Req#14d/Transcode] Codecs: hardware transcoding: testing API nvdec for device '' ()

Now we have some other links to check out:

Sure enough, installing either nvidia-cuda-toolkit or libnvidia-encode1 made it work! Likely libnvidia-encode1, as the log message references that.

December 14 - Proxmox VM with Audio Passthrough#

I created a pretty simple Debian 12 VM. Important thing to note is that to use the SPICE audio driver, the display also needs to be set to use SPICE (https://forum.proxmox.com/threads/audio-could-not-init-spice-audio-driver.125589/). Then I need to run sudo apt install spice-vdagent. Upon reboot that service seemed to be running, but no matter which audio device I choose (ich9-intel-hda, intel-hda, AC97), none worked. I looked at documentation here: https://pve.proxmox.com/wiki/SPICE#Using_Audio but it didn’t help me. I’m not even sure if SPICE is designed for audio passthrough.

I did not end up being successful with this, which is too bad.

December 17 - Updating my Modded 3DS#

I have a modded 3DS with Luma3DS v7.1. It seems to update, I need to follow these steps: https://gbatemp.net/threads/release-luma-updater.471739/ which involves me updating boot9strap. That pretty much covered it perfectly.

Now I am going to upgrade the SD card. I have to use FAT32 and nothing else. More info here: https://www.reddit.com/r/3DS/wiki/sdcard/

December 18 - Increasing CT Volume Size in Proxmox#

If you need a CT volume to have an increase in size, look here: https://forum.proxmox.com/threads/how-to-increase-the-size-of-proxmox-lxc-container.119453/

pct resize 100 rootfs 250G