Minecraft

Finally got around to doing this. Now to figure out why.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: minecraft
  labels:
    app: minecraft

spec:
  replicas: 1
  selector:
    matchLabels:
      app: minecraft
  template:
    metadata:
      labels:
        app: minecraft
    spec:
      containers:
        - name: minecraft
          image: itzg/minecraft-server
          volumeMounts:
            - mountPath: /data
              name: minecraft-vol
              subPath: data
          ports:
            - containerPort: 25565
          env:
            - name: "EULA"
              value: "TRUE"
      volumes:
        - name: minecraft-vol
          persistentVolumeClaim:
            claimName: minecraft-pvc
---
apiVersion: v1
kind: Service
metadata:
  name: minecraft-svc
spec:
  selector:
    app: minecraft
  ports:
    - protocol: TCP
      port: 25565
      targetPort: 25565
  type: LoadBalancer


Friday, January 05, 2024


eGPU

eGPU

Well, I’m not sure what to make of this one. I ended up getting an external GPU for my Dell XPS 9315 laptop. Basically, it’s a metal box with a power supply and a PCI-E slot that you put a standard graphics card into, and run a Thunderbolt cable to your laptop. At first I just got the enclosure and tested it with an old NVidia GTX 1060 I had in the basement, and when that worked fine I went and got a 4070 during Black Friday. I figured, I’m going to work my way to a gaming PC eventually, but I might as well do it in installments and reap some benefits until it’s complete.

Unfortunately, the 4070 is bottlenecked somewhere along the line and I’m getting inconsistent performance. It does work though. I’m getting into the 30s with Baldur’s Gate 3 and 40s in Doom Eternal. Control gets into the 30s but grinds when I turn on RTX.

Control (some post tweaks in Darktable)

There’s also the added complication of this laptop running on Linux and Xorg being very unhappy when you hot-unplug GPUs. If I unplug the GPU everything freezes and I need to do a hard reset. I guess I don’t blame it though. The GPU is supposed to be bolted in and secured inside a case along with the rest of the computer, not off to the side with a single USB cable running over to where the CPU is. Since Xorg likes to have its displays defined at the start, I need to keep a separate xorg.conf file that includes:

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce RTX 4070"
    Option         "AllowExternalGpus" "True"
    Option         "AllowEmptyInitialConfiguration" "true"
    BusID          "PCI:3:0:0"
EndSection

…But xorg will not start if it looks for the 4070 and does not find it, so I need to delete it and restart if I want to undock my laptop.

And so I have this:

#!/bin/bash
echo "Changing xorg.conf"
if [ ! -f /etc/X11/xorg.conf ]; then
  echo "Nvidia config does not exist"
  cp /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf && reboot
else
  mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup && reboot
fi

There’s probably a more elegant way with udev rules and stuff where I can just have it detect whether or not the eGPU is plugged in at boot, but I think that can be a next year problem.

Happy New Year!


Tuesday, December 26, 2023


Steam Deck Debian

steam deb This was way easier than I thought it would be, but I don’t know why I expected anything else.

(also, love the default tate mode)


Monday, October 16, 2023


SSD

Last week we stopped by at Microcenter and I picked up a 1TB Samsung SSD on sale. The one in my Dell XPS13 was 256Gb. I had only occupied about 40Gb of it becuase I had been storing most of my heavy stuff on a repurposed Macbook Pro in the closet with a few spinning hard drives plugged into it. I should probably write a thing or two about that later.

Anyway, I put it off installing it all week because I had a feeling I would run into problems, and indeed I did.

First, I needed to boot into a temporary OS on a separate drive. I decided on Debian on a live USB because, frankly, I kind of don’t really know much about the differences between the distributions other than that Debian just works most of the time for what I need to do. This would allow me to use gparted to resize the main partition down to the 40Gb that was actually in use. Otherwise dd would copy all 256Gb in the partition, including the empty part (gparted is not included in the Debian live image so I had to apt get it).

Next, since the laptop would only support one USB at a time, I would need to have yet another storage medium to offload the contents of the original SSD onto, perform the SSD swap, then load it back onto the new SSD. Fortunately, the laptop has a MicroSD slot, and I had a 64Gb MicroSD card. It would be as simple as: #dd if=/dev/nvme0n1 of=/dev/mmcblk0. I usually tack on bs=4M status=progress to save a little time and to watch the progress, becuase I hate when I hit enter and see nothing till it’s done. Anyway, I did that, put the new one in, and ran dd in reverse. Then, I used gparted again to expand the partition out to the full 1Tb. That went much faster than shrinking it down.

Ideally, the only thing left to do was to boot into it and carry on. Instead, I was rewarded with the BIOS telling me I had no bootable drives.

Next followed about four hours of me trying just about everything, including starting the whole process over again just to end up in the same place. I messed with GRUB a few times, reinstalled it a few times, reinstalled Arch a few times (did you know the arch-install-scripts is also in the Debian repos? And so you can run arch-chroot and other stuff to mess around with an Arch installation.). Everything took so long because it was a loop of: change a thing > reboot > see if it worked > didn’t work > try another change.

Anyway, ultimately I learned that the uuid is a property of partitions, and NOT a property of the drive. Originally I thought it was sort of like a MAC address/serial number baked into the drive. Instead there are ways to set it logically that I will not go into because I think the root of my problem was that, when I dd‘ed my drive, it made a bit-for-bit clone to my SD card, which included the uuids of the partitions on it, and then cloned it again to the new drive. I hadn’t removed the SD card when I booted up again, so when GRUB went to look for a partition to boot, it found two with identical UUIDs, which is the opposite of what you’d want from supposedly universally unique identifiers.


Sunday, October 08, 2023


Arch Linux

Arch

For whatever reason I decided to switch to Arch Linux on my primary laptop. I had been using Manjaro somewhat happily for a while, and figured I could use a change. Also, there was a weird week or two where my audio controls just randomly went haywire. I’m not sure it had anything to do with Manjaro, but the maybe was enough to get me to start thinking about other distributions. Some similar impulse was how I ended up on Manjaro in the first place (previously Debian).

I had bailed on an Arch installation before, but I figured, if I wiped my main laptop and went for it, I’d have no choice but to go all the way. I figured, as long as I got into a GUI and a web browser, I could handle the rest as I realized I needed it. What I didn’t realize was that it would be another 3 hours of typing at the CLI before I finally figured everything out.

It has you start from formatting your own boot partition. Having spent some time repeatedly formatting and partitioning SD cards for my Rasperry Pi stack, I wasn’t super worried about this.

Things got annoying when I realized the network doesn’t come set up out of the box, which is a problem because you need that to install stuff on an OS that comes with nothing installed. So that’s when I learned me some iwctl. It’s actually a pretty handy tool and I’m probably actually going to come back to it some day for a real-world scenario, but also takes an extra step to get it to handle DHCP. Even now I don’t fully understand Linux networking. Every little function and layer is split up across config files and daemons all over the place.

And then it came time to get the GUI going. I think what I have here is the Plasma desktop environment, on top of an Xorg display server, using the SDDM display manager. Something went wrong along the way and I found myself looking at the X windows without the Plasma layer on top, and wow that was pretty horrific.

Anyway, I think I’m out the other side, almost to the point where I was in Manjaro. Maybe need to tweak some themes a bit. Jury’s still out on this Gruvbox console theme.


Sunday, September 24, 2023