Sunday, February 19, 2023

Yushui 雨水

After Lichun, or 立春, comes Yushui, or 雨水, another of the 二十四節気 24 solar terms. It literally means "rain water", and signifies an increase in rain.
 

 

Saturday, February 18, 2023

Dynamic VFIO binding and unbinding for GPU passthrough

5 July 2026: Do not follow this guide as it is probably outdated.
 
Recently, I installed Proxmox with a desktop environment on a HP Z240 SFF computer for the purpose of learning how to do dynamic VFIO binding and unbinding of a discrete GPU for GPU passthrough to a virtual machine.

First, a bit about VFIO binding and GPU passthrough. In order to pass a GPU (or some other PCI device) to a VM, it is necessary that the host computer is not using that device. That device is then binded to VFIO so that it can be passed to the VM. The usual method, given in the Proxmox docs, is to pass the devices to the vfio module at boot. It is a straightforward method, but this means that the device will not be available to the host at all.

(Another disadvantage of the method in the official docs is when you have several devices with the same vendor:device ID pair, and you only want to passthrough some of them. Passing vendor:device ID pairs to the vfio module at boot will mean that all devices with that ID pair will not be available for the host.)

In my case, the HP Z240 SFF has an Intel Xeon E3-1245v5 CPU, which comes with Intel HD Graphics P530 as its integrated GPU. At the same time, I installed a Nvidia Quadro P600 as a discrete GPU in its PCIe slot. Here, I want to use the integrated GPU for the host, and passthrough the discrete GPU to a VM.

1. Make sure that the integrated GPU is used during boot. Usually, there will be a setting in BIOS to select the integrated GPU as the primary video device. This setting needs to be selected.

2. Make sure X11 uses the integrated GPU. This is done by creating a file called /etc/X11/xorg.conf.d/10-i915.conf with the following.
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection


Replace the portion in red with the correct PCI slot of your integrated GPU. For my case, running
lspci | grep VGA
gives me
00:02.0 VGA compatible controller: Intel Corporation HD Graphics P530 (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GP107GL [Quadro P600] (rev a1)
My integrated GPU is at 00:02.0, so
BusID "PCI:0@0:2:0"
was what I used.

3. Follow the Proxmox docs to do the necessary kernel boot parameters and such for passthrough. Open /etc/default/grub and change the line containing GRUB_CMDLINE_LINUX_DEFAULT to
GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on iommu=pt pcie_acs_override=downstream"
Then, run
update-grub
to make sure the new parameters are reflected.
Create /etc/modprobe.d/kvm.conf with the following
options kvm ignore_msrs=1 report_ignored_msrs=0
As the Quadro P600 has HDMI audio, I also created /etc/modprobe.d/snd-hda-intel.conf with the following
options snd-hda-intel enable_msi=1
Then run
update-initramfs -u -k all
to make sure the modules are properly reflected.

4. For switching between integrated and discrete GPU, I also installed bumblee using
apt install bumblebee
which will also add a list of modules that will be blacklisted so that Nvidia drivers do not get loaded automatically.

5. Next, I created a directory in the /root directory called passthrough, which will be used to hold various scripts needed.
mkdir /root/passthrough

6. Create the configuration file /root/passthrough/kvm.conf which will hold the PCI addresses of the device to pass through.
## Contents of kvm.conf
VIRSH_GPU_VIDEO=0000:01:00.0
VIRSH_GPU_AUDIO=0000:01:00.1
GPU_VIDEO_DRIVER=nvidia
GPU_AUDIO_DRIVER=snd_hda_intel


7. Create the vfio binding/unbinding helper script called /root/passhthrough/vfio.sh with the following:
#!/bin/bash

set -x

function unbind() {
    busid=$1

    vendor=$(cat /sys/bus/pci/devices/$busid/vendor)
    device=$(cat /sys/bus/pci/devices/$busid/device)

    modprobe vfio-pci #>/dev/null 2>/dev/null

    if [ -e /sys/bus/pci/devices/$busid/driver ]; then
        printf "Unbinding %s (%s:%s)\n" "$busid" "$vendor" "$device"
        echo $busid > /sys/bus/pci/devices/$busid/driver/unbind
        #echo vfio-pci > /sys/bus/pci/devices/$dev/driver/driver_override
    fi
    echo -n "$vendor $device" > /sys/bus/pci/drivers/vfio-pci/new_id &&     echo "$busid -> vfio-pci"
}

function rebind() {
    busid=$1; shift
    drv=$1; shift

    vendor=$(cat /sys/bus/pci/devices/$busid/vendor)
    device=$(cat /sys/bus/pci/devices/$busid/device)

    printf "Unbinding %s (%s:%s)\n" "$busid" "$vendor" "$device"
    echo -n "$vendor $device" > /sys/bus/pci/drivers/vfio-pci/remove_id
    echo $busid > /sys/bus/pci/devices/$busid/driver/unbind
    echo $busid > /sys/bus/pci/drivers/$drv/bind && echo "$busid -> $drv"
}

cmd=$1; shift || true
case $cmd in
    unbind)
        unbind $@
        ;;
    rebind)
        rebind $@
        ;;
    *)
        printf "Usage: %s [unbind <busid> | rebind <busid> <drv>]\n" "$0"
        exit 1
        ;;
esac  


Remember to make it executable by
chmod +x /root/passthrough/vfio.sh

8. Create the script to bind the GPU called /root/passhthrough/bind_vfio.sh with the following:
#!/bin/bash

## Load the config file
source "/root/passthrough/kvm.conf"

systemctl stop bumbleed
systemctl stop nvidia-persistenced

# Unload Nvidia
modprobe -r nvidia_drm
modprobe -r nvidia_modeset
modprobe -r drm_kms_helper
modprobe -r nvidia
modprobe -r i2c_nvidia_gpu
modprobe -r drm
modprobe -r nvidia_uvm

## Load vfio
modprobe vfio
modprobe vfio_iommu_type1
modprobe vfio_pci
modprobe vfio_virqfd

## Unbind gpu from nvidia and bind to vfio
/root/passthrough/vfio.sh unbind $VIRSH_GPU_VIDEO
/root/passthrough/vfio.sh unbind $VIRSH_GPU_AUDIO

 
Remember to make it executable by
chmod +x /root/passthrough/bind_vfio.sh
 
9. Create the script to bind the GPU called /root/passhthrough/unbind_vfio.sh with the following:
#!/bin/bash

## Load the config file
source "/root/passthrough/kvm.conf"

## Unbind gpu from vfio and bind to nvidia
/root/passthrough/vfio.sh rebind $VIRSH_GPU_VIDEO $GPU_VIDEO_DRIVER
/root/passthrough/vfio.sh rebind $VIRSH_GPU_AUDIO $GPU_AUDIO_DRIVER

## Unload vfio
modprobe -r vfio_pci
modprobe -r vfio_iommu_type1
modprobe -r vfio
modprobe -r vfio_virqfd

# Reload nvidia modules
modprobe nvidia_drm
modprobe nvidia_modeset
modprobe drm_kms_helper
modprobe nvidia
modprobe drm
modprobe nvidia_uvm

systemctl start nvidia-persistenced
systemctl start bumbleed


Remember to make it executable by
chmod +x /root/passthrough/unbind_vfio.sh

10. Test the scripts by first running bind_vfio.sh, after which
lspci -v -s 01:00
should show
01:00.0 VGA compatible controller: NVIDIA Corporation GP107GL [Quadro P600] (rev a1) (prog-if 00 [VGA controller])
    Kernel driver in use: vfio-pci
    Kernel modules: nvidia

01:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)
    Kernel driver in use: vfio-pci
    Kernel modules: snd_hda_intel


11. Make sure unbinding works by running unbind_vfio.sh, after which
lspci -v -s 01:00
should show
01:00.0 VGA compatible controller: NVIDIA Corporation GP107GL [Quadro P600] (rev a1) (prog-if 00 [VGA controller])
    Kernel driver in use: nvidia
    Kernel modules: nvidia

01:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel


12. If this works, create a hook script
/var/lib/vz/snippets/gpu-hookscript.pl
with the following:
#!/usr/bin/perl

# Exmple hook script for PVE guests (hookscript config option)
# You can set this via pct/qm with
# pct set <vmid> -hookscript <volume-id>
# qm set <vmid> -hookscript <volume-id>
# where <volume-id> has to be an executable file in the snippets folder
# of any storage with directories e.g.:
# qm set 100 -hookscript local:snippets/hookscript.pl

use strict;
use warnings;

print "GUEST HOOK: " . join(' ', @ARGV). "\n";

# First argument is the vmid

my $vmid = shift;

# Second argument is the phase

my $phase = shift;

if ($phase eq 'pre-start') {

    # First phase 'pre-start' will be executed before the guest
    # is started. Exiting with a code != 0 will abort the start

    print "$vmid is starting, doing preparations.\n";

    system("/root/passthrough/bind_vfio.sh");

    # print "preparations failed, aborting."
    # exit(1);

} elsif ($phase eq 'post-start') {

    # Second phase 'post-start' will be executed after the guest
    # successfully started.

    print "$vmid started successfully.\n";

} elsif ($phase eq 'pre-stop') {

    # Third phase 'pre-stop' will be executed before stopping the guest
    # via the API. Will not be executed if the guest is stopped from
    # within e.g., with a 'poweroff'

    print "$vmid will be stopped.\n";

} elsif ($phase eq 'post-stop') {

    # Last phase 'post-stop' will be executed after the guest stopped.
    # This should even be executed in case the guest crashes or stopped
    # unexpectedly.

    print "$vmid stopped. Doing cleanup.\n";

    system("/root/passthrough/unbind_vfio.sh");

} else {
    die "got unknown phase '$phase'\n";
}

exit(0);


Remember to make it executable by
chmod +x /var/lib/vz/snippets/gpu-hookscript.pl

13. If you have not created a VM, create a VM (here, it will be VM 100 for this example).

14. This hook script can then be added to a VM by running
qm set 100 --hookscript local:snippets/gpu-hookscript.pl
Here, 100 is the VM number (which can be replaced with the actual VM number).

15. Now, when you start the VM, it should bind the GPU to vfio, and after stopping the VM, it should unbind the GPU from vfio.

Time to test... so I created a Linux Mint VM on this server. After the post install stuff such as updating the packages, I shut down the VM. Then, on the host server, as root, I added the hookscript using 
qm set 100 --hookscript local:snippets/gpu-hookscript.pl
and started the VM.
 
On the host server, I ran
lspci -vv -s 01:00 | grep Kernel
and got:
    Kernel driver in use: vfio-pci
    Kernel modules: nvidia
    Kernel driver in use: vfio-pci
    Kernel modules: snd_hda_intel

Good! The Quadro P600 was being binded to VFIO.

Next, I proceeded to shutdown the VM. After the VM was stopped, on the host server, I ran
lspci -vv -s 01:00 | grep Kernel
and got:
    Kernel driver in use: nvidia
    Kernel modules: nvidia
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel


Good! The Quadro P600 has been unbinded from VFIO. I could even run nvidia-smi to check that it is available to the host server.
 
I started the VM again, and installed the proprietary Nvidia drivers from within the VM, rebooted the VM, and could confirm that the Nvidia drivers were loaded correctly.
 
Hurray! Dynamic VFIO binding and unbinding!

Note: If your GPU has more "devices" like USB and serial and such, just add them as additional variables to the /root/passthrough/kvm.conf files, and edit /root/passthrough/bind_vfio.sh and /root/passthrough/unbind_vfio.sh to add in the commands to bind/unbind these devices.
For example, in /root/passthrough/kvm.conf:
VIRSH_GPU_USB=0000:01:00.2
GPU_USB_DRIVER=xhci_pci
Then, in /root/passthrough/bind_vfio.sh, add:
/root/passthrough/vfio.sh unbind $VIRSH_GPU_USB
And in /root/passthrough/unbind_vfio.sh, add:
/root/passthrough/vfio.sh rebind $VIRSH_GPU_USB $GPU_USB_DRIVER
This should allow you to make sure all the "devices" on the GPU are passed to the guest VM.

References used in developing the scripts and such:
https://pve.proxmox.com/wiki/Pci_passthrough
https://github.com/bryansteiner/gpu-passthrough-tutorial  (for hints on the bind_vfio.sh and unbind_vfio.sh scripts)

Friday, February 10, 2023

Installing Proxmox VE followed by Xfce desktop

In my comparison of ways to install a Proxmox workstation, I stated that one way is to install Proxmox, and then install the Xfce desktop environment, followed by theming Xfce to look like Mint. Given that this is the recommended method in the Proxmox docs, I decided to give it a try.

First, I installed Proxmox the usual way. Nothing special here.

According to the Proxmox docs, the next step is to install X Windows by installing Xfce, a greeter (lightdm), and Chromium. However, I decided to make a slight change, since I wanted to easily install Xfce by using the task-xfce-desktop metapackage.

So, I instead added the non-free Debian repo first. This step is found in a later part of the Proxmox docs. I changed buster to bullseye since Proxmox is now running on Debian 11 instead of 10.
cat <<EOF >>/etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian
bullseye main contrib non-free
 
deb http://security.debian.org/debian-security/ bullseye-security main
deb-src http://security.debian.org/debian-security/ bullseye-security main

deb http://deb.debian.org/debian
bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian
bullseye-updates main contrib non-free
EOF
 
Then, I went back and followed the docs, using task-xfce-desktop instead of xfce4.
apt update
apt upgrade
apt install task-xfce-desktop lightdm chromium

Next was to add a normal user so that I don't have to run things as root.
adduser user
(replace user with the user name you want)

I am doing this on a HP Z240 SFF desktop, which has an Intel E3-1245v5 processor (which has integrated graphics) as well as a Nvidia Quadro P600 discrete GPU. I plan to use this system to play around with dynamic VFIO binding and unbinding. Anyway, I next installed the Nvidia proprietary drivers from Debian repo (which, as of now, is version 470... way way way older than the version 525 I have on other systems).

First, the open-source nouveau driver needs to be blacklisted.
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf

Then, the actual driver installation, which requires kernel headers.
apt install pve-headers
apt-get update
apt-get install nvidia-driver

I then rebooted the system, and was greeted by a GUI login screen, which allowed me to log in as a normal user into the Xfce desktop environment.

I followed my own guide to theme Xfce to look like Mint. This required the installation of Mint packages. First, I needed to add the official Mint repo by creating this file /etc/apt/sources.list.d/official-package-repositories.list with the following contents.
deb http://packages.linuxmint.com elsie main upstream import backport 
This allowed me to install the following packages.
apt install mint-x-icons mint-y-icons mint-y-icons-legacy mint-themes mint-themes-legacy mint-artwork
 
Running neofetch got me this.

Note: Similar to installing Proxmox on top of LMDE 5, I had an error where Proxmox did not recognise the version codename "Elsie" (which is LMDE 5). It caused the error message "unknown Debian code name 'elsie' (500)" and so I had to edit /usr/lib/os-release and change
VERSION_CODENAME=elsie
to
VERSION_CODENAME=bullseye
 
This felt really smooth, but I guess that is the advantage of following the official Proxmox docs. Next would be dynamic VFIO binding and unbinding! 
 

Tuesday, February 07, 2023

Comparing various ways to install a Proxmox developer workstation

I recently installed Proxmox on top of Linux Mint Debian Edition 5 and themed the Xfce desktop to get that Mint look. One may wonder, what is the advantage of this process? Especially since the official Proxmox docs contain steps necessary for installing Proxmox as a developer workstation as well as installing Proxmox on top of vanilla Debian.

First, the end goal: a Proxmox developer workstation running Xfce desktop themed to look like Mint.


The options?
 
1. Install Proxmox, and then install the Xfce desktop environment, followed by theming Xfce to look like Mint.
2. Install Debian with Xfce, then install Proxmox on top of it, and theme Xfce to look like Mint.
3. Install LMDE 5, then install Proxmox on top of it, then install Xfce desktop environment (because LMDE 5 comes with Cinnamon by default), and theme Xfce to look like Mint again. (This is the method I used.)

Method 1 is the "normal" method. Here, the Proxmox features should definitely work, since it is first and foremost Proxmox. You also get a clean and lean install of Xfce desktop, which you can slowly add programs as necessary. One thing to note, though, is that Proxmox usually partitions a smaller base partition for itself, while using the rest of the storage device as a LVM for VMs. If you are going to install a lot of stuff onto the base partition, you may soon run out of space...

Method 2 is the "normal" workaround, since by installing Debian first, you can partition the storage device to your own liking. Installing Proxmox subsequently on a more or less clean install of Debian should mean that Proxmox features should work without issues, since Proxmox is based on Debian in the first place. This method should provide a lean desktop environment that also runs Proxmox.

Method 3 looks like a very complex process to achieve the same outcome. Actually, you get the same basic outcome, but you also gain other features too. For a start, you gain all the extras that come with Linux Mint, as compared to vanilla Debian. For example, codecs and such that may be needed for video playback, and ease of installing proprietary drivers. At the same time, this can be baggage if you don't use them. In my case, I ended up with a Cinnamon desktop and corresponding files that won't be used.

At the end of the day, the bottom line is that all three methods work and deliver the same baseline results. And for Linux-based systems, you can basically achieve whatever result you want, as long as you are willing to spend time on tweaking. Linux is like the diversity champion in operating systems, there is something for everyone, and if not, you can always create your own.

Saturday, February 04, 2023

Watching "Kin no Kuni Mizu no Kuni" (金の国 水の国)

Kin no Kuni Mizu no Kuni (金の国 水の国) actually premiered in Japan last week, but I didn't managed to catch it until today.

The movie itself is 117 minutes, almost two hours. It started with a brief narration about the setting: two countries that have not been on good terms with each other for a thousand years, waging wars countless times. An ancient sign of goodwill is for Country A to send its most beautiful girl to Country B as a wife, and for Country B to send its most intelligent youth to Country A as a husband. Instead, Country A sent a kitten to be the wife of Naranbayar (a young architect from Country B), and Country B sent a puppy to be the husband of Sara (the 93rd princess of Country A, born by one of the king's concubines). Naranbayar and Saya kept their spouses' true identities a secret, knowing that their respective kings would be enraged and go to war again.
 
Country A is rich due to trade but lacks water, while Country B has tons of water but is otherwise poor due to the lack of trade routes. This is why Country A is the land of gold, while Country B is the land of water. Country B has a Persian/Arabian look, something that makes you think about Arabian Nights. Meanwhile, terms of architecture and clothing, Country B seems to be Oriental, with something of a northern Chinese + nomadic Mongol look. They have been fighting each other hoping to get what each needs through force.
 
As luck would have it, Naranbayar and Sara ended up bumping into each other, and along the way, realised that the other person is the one who was supposed to have received the bride/husband from his/her own country. To keep up the facade, they posed as each other's spouse, and this white lie was used to further propel their stories forward.

I shan't go much further into the story, but it is mainly about a win-win alternative to war. The music by Evan Call alone makes it worthy to go watch this movie. Actually, that was what brought me to the cinema in the first place. Evan Call composed the music used in this movie, as well as the three songs: 優しい予感 (Yasashii Yokan), Brand New World, and Love Birds. All these songs were performed by 琴音 (Kotone) and you can hear them here.
 
The movie has only been showing for a week, but it probably hasn't drawn much of a crowd, and is not expected to do so, since the local theater is showing it at one of the smallest screens it has. And the movie is just barely into its second week...

I watched the movie at lunch time on a Saturday (it only has two screenings today, a weekend!) and the smallest screen at the cinema was not even half filled. Actually, I wonder why. I mean, one of the main character is being voiced by a popular actress, and the movie is produced by a major TV network. One would think that it would be expected to do better at the box office. By comparison, the special screening of Demon Slayer (which is basically episodes 10 and 11 of the Entertainment District arc that aired last year, plus episode 1 of the Swordsmith Village arc that will air later this year) had a ton of people...



Lichun 立春

Lichun, or 立春, is one of the 二十四節気 24 solar terms. It signifies the start of spring. This is the first in my series of using the 24 solar terms for calligraphy practice.


Sunday, January 29, 2023

Deleting a Proxmox cluster

I had put my rack servers (Dell Poweredge R720 and R430) in a cluster together with a Raspberry Pi 4 to give quorom so that I can leave the R430 off when not needed. While there is no problem, I really didn't need to use the features of a high availability cluster, since I don't need to move my VMs around the nodes or have a VM run on another node when a node is down. So I decided to delete the cluster.

Before proceeding, note that deleting a Proxmox cluster can cause irreparable damage if not done properly. I actually have my VMs backed up to another disk, so that if anything happens, I can reinstall Proxmox and restore those backups.

As reference, I watched this YouTube video:

I also use the official Proxmox documentation as a guide.

These are the steps I used.

First, on the main cluster node, which is the R720 for me, I ran
pvecm nodes
to see the names of the nodes.
 
Then, I used the following commands to remove the nodes, replacing NODENAME with the name of the first node (not the main one!) to delete. 
pvecm delnode NODENAME
rm -r /etc/pve/nodes/NODENAME

If pvecm delnode NODENAME fails, work around by pvecm expected 1, then try again.

Next, SSH into the node being deleted and run the following commands to stop the cluster on that node.
systemctl stop pve-cluster
systemctl stop corosync
Next, restart the cluster on that node in standalone mode.
pmxcfs -l
Then, delete the corosync configuration files.
rm /etc/pve/corosync.conf
rm -r /etc/corosync/*
Then, restart the service again as a normal service.
killall pmxcfs
systemctl start pve-cluster

Remove the remaining cluster-related files on this node.
rm /var/lib/corosync/*
This separates the node from the cluster.
This node will still have files from the other nodes in the cluster, so you can remove them too.
rm -r /etc/pve/nodes/NODENAME
Replace NODENAME with the name of the nodes, other than its own node name. In my case, I started by removing the R430 (nodename pve430) from the cluster, so for this command, I ran the following
rm -r /etc/pve/nodes/pve730 (for the R720)
rm -r /etc/pve/nodes/pverpi4 (for the Raspberry Pi 4)
 
This removed the R430 from the cluster.
I then repeated the above steps to remove the Raspberry Pi 4 from the cluster.

Once that has been done, my R430 and Raspberry Pi 4 are no longer in cluster configuration.

Finally, to delete the cluster on the main node, I ran the following commands.
First, stop the running cluster.
systemctl stop pve-cluster
systemctl stop corosync

Then, force the node to run in local mode.
pmxcfs -l
Then, delete all the cluster configuration files.
rm -f /etc/pve/cluster.conf /etc/pve/corosync.conf
rm -f /etc/cluster/cluster.conf /etc/corosync/corosync.conf
rm /var/lib/pve-cluster/.pmxcfs.lockfile
rm -r /etc/corosync/*

Next, restart empty cluster service.
killall pmxcfs
systemctl start pve-cluster
Remove the remaining cluster-related files on this node.
rm /var/lib/corosync/*
This separates the main node from the cluster.
This node will still have files from the other nodes in the cluster, so you can remove them too.
rm -r /etc/pve/nodes/NODENAME
In my case, my main node is the R720 (nodename pve720), so for this command, I ran the following
rm -r /etc/pve/nodes/pve430 (for the R430)
rm -r /etc/pve/nodes/pverpi4 (for the Raspberry Pi 4)
 
There is no need to actually reboot, but I did so anyway just to make sure everything can run.

As you can see, no more cluster! 

Again, remember, deleting a Proxmox cluster can cause irreparable damage if not done properly. Follow these steps at your own risk!! I will not be responsible for any damages or loss arising from anyone following these steps. I am just sharing what I did. It worked for me, but it may not work for you. I recommend reading the official documentation, and watching the video, to get an idea of what you are trying to do, before attempting to actually do anything. Plus backup backup backup!

Theming XFCE to look like Linux Mint

After installing Proxmox on Linux Mint Debian Edition 5, I installed the XFCE desktop in place of the Cinnamon desktop. But when switching to XFCE, there was a "small" problem. It looked like the generic XFCE desktop, not the one you see when using Linux Mint XFCE edition.

But this could be fixed. After all, it is all about themes and icons, right?

The first thing to do was to move the panel from the top to the bottom of the screen. First, under Settings Manager, I opened Panel and from the dropdown menu, chose "Panel 2" and then the minus button to remove it. Then, select "Panel 1" from the dropdown menu, uncheck the "Lock panel" checkbox. The pane will then show a small handle at the side of the panel, allowing you to drag the panel to the bottom of the screen. Once it is there, check "Lock panel" again to keep it there.

Still in the Panel settings, under "Items", add a new item called "Whisker Menu". This is the Whisker menu used by Linux Mint. Then, right click on the original menu button on the panel and remove it. Right click on the Whisker menu button on the panel, select "Properties", then the "Panel Button" pane, which allows you to change the icon. The Linux Mint icons usually start with "linuxmint-logo" and there is a variety to choose from.

Then, go back to Settings Manager, and choose Appearance. Choose the Linux Mint style under "Style" and icons under "Icons". I use "Mint-Y-Legacy-Dark" for both.

Again, return to the Settings Manager, and choose Window Manager, and choose the Linux Mint style you want under "Style". Once again, I am using "Mint-Y-Legacy-Dark".

Finally, from Settings Manager, choose Desktop, which will allow you to set the background. The Linux Mint backgrounds can be found in the folder /usr/share/backgrounds/linuxmint, after which you can choose the one that you like.

All that remains is to add in the launcher buttons of favorite programs to the panel. This can be easily done from the Whisker menu. When you right click on an application, etc. in the Whisker menu, there is a "Add to Panel" option. Use this option to add that menu item to the panel as a launcher. You can move the launcher to its preferred location on the panel by right clicking on the icon, selecting "Move", and then moving it around the panel.
 
This is the result.
 
(After a lot of stuff like launchers and applets have been added to my taste.)

Note: As mentioned in my other post, use
sudo apt install mint-y-icons-legacy mint-themes-legacy
in order to get the legacy icons and themes, which I prefer.

Saturday, January 28, 2023

Watching Suzume again (5th time)

Starting 28 January 2023, people who watch Suzume at the theaters in Japan are being given a small booklet written by director Shinkai Makoto containing a short story about Serizawa, the character who is Sota's friend.

That's a good enough reason for me to watch Suzume again, which makes this the fifth time watching the movie.

I really like this movie, and it can still move me even though I have already watched it four times.

As for the short story, it gives a bit of background to how Serizawa came to befriend Sota. It is also a portrayal of life for a university student during the COVID-19 pandemic (although most do not end up doing part-time jobs at "host clubs"). It isn't as touching at the first booklet Suzume—Tamaki’s Story (unofficial translation of 小説すずめの戸締まり~環さんのものがたり~), though. I may still translate it if I have time.
 
Update 30 May 2023: I have finally gotten down to translating Serizawa's story!

Friday, January 27, 2023

Installing Proxmox on Linux Mint Debian Edition 5

Ever since I started using Proxmox, one idea I had was to convert my existing desktop into a Proxmox workstation. Basically, it will run Proxmox with a desktop environment so that I can easily access a Windows VM on it for work, while continuing to use Linux mostly for everything else.

The instructions on the Proxmox website contains steps for installing Proxmox on Debian 11 (Bullseye). My preferred Linux distro, however, is Linux Mint. As luck would have it, Linux Mint has a Debian edition, which is based on the latest version of Debian, so I thought I would give it a try to see if I can install Proxmox on it.

The first step is to install LMDE 5 on my desktop. This is no different from installing any other version of Linux Mint. Basically, download the ISO, burn it to a USB thumb drive, and boot the desktop using the USB thumb drive, and follow the steps to install it.

Next is to follow the steps in "Install Proxmox VE on Debian 11 Bullseye":
1. Adapt sources.list
2. Install the Proxmox VE kernel
3. Install the Proxmox VE packages
4. Remove the Debian kernel
5. Remove the os-prober package (optional)

Also, you need to set a password for root by
sudo passwd root
Otherwise, you are going to have problems trying to access the web interface.
Also, check that /etc/ssh/sshd_config has this
PermitRootLogin yes
in it. This is especially needed if you are ever going to hook up this node to a cluster, as nodes in a Proxmox cluster use ssh to talk to each other.
 
And do not reboot yet! There is still one more thing to do, which is to create a bridge interface as mentioned here. This is because Proxmox disables NetworkManager, which means you will not be able to connect your computer to the outside world if you do not create a bridge first. So, open a web browser (LMDE comes with Firefox) and go to https://127.0.0.1:8006/ to access the Proxmox web interface, and from there, select your node, look for "Network", and create a "Linux Bridge" using the web interface.

I also had to follow some steps here to get Bluetooth working, since the Proxmox kernel is not compatible with the firmware-iwlwifi package.
wget http://ftp.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-iwlwifi_20210315-3_all.deb
sudo dpkg -x firmware-iwlwifi_20210315-3_all.deb firmware-iwlwifi
sudo cp -r firmware-iwlwifi/lib/firmware/* /lib/firmware/
sudo update-initramfs -k all -u

Also, Proxmox does not recognise the version codename "Elsie" (which is LMDE 5). It causes the error message "unknown Debian code name 'elsie' (500)" and so I had to edit /usr/lib/os-release and change
VERSION_CODENAME=elsie
to
VERSION_CODENAME=bullseye

By default, LMDE 5 comes with Cinnamon. But recently, I have come to like XFCE more, so I decided to switch Cinnamon for XFCE.
sudo apt install task-xfce-desktop
sudo dpkg-reconfigure lightdm
Once this is done, reboot, and at the login screen, click on the icon next to the user name to get a menu that allows you to choose between Cinnamon and XFCE. Choose XFCE, then enter your password to log in.
 
Running neofetch:

As you can see, I chose to opt into the newer 5.19 kernel by using
sudo apt install pve-kernel-5.19
(instead of sudo apt install pve-kernel-5.15)
 
Oh, I also had to do
sudo apt install mint-y-icons-legacy mint-themes-legacy
in order to get the legacy icons and themes, which I prefer.

Next, I hope to test out the steps here to install Proxmox VE first, then installing a desktop environment onto it. Before that, I need to import my previous Windows VM (qcow2 file) into this new Proxmox instance using the steps here. Wish me luck!
 
Update 29 January 2023: I tried to import my Windows VM (qcow2 file) that was on my desktop previously. That VM had some issues, which was why I stopped using it. But I decided to try to see if importing it will make it work. Conclusion: That VM is buggy and keeps rebooting randomly and I don't have the time to troubleshoot.
 
Anyway, for anyone interested, I followed the steps here to import the VM.
qm create 100
qm importdisk 100 windowsVM.qcow2 local
(local is the name of the Proxmox storage to use for this VM)
Then, I used the web UI to configure the VM. It worked, the VM could run and such, but because the VM was faulty in the first place (I think I messed up a Windows update previously...), it keeps rebooting randomly.

In the end, I took a working VM on my R720 server, made a backup of it, and copied that backup file (with the extension zst) to this new "server". I then restored the VM on this server, making sure to set the SMBIOS UUID to the one I previously used so that Windows can detect the license activation. I also changed the MAC address too. Once I "restored" the VM, I booted it up and made the changes to the network settings (so that it used another network address than the VM on the R720) and changed its name too.

Update 6 February 2023: The "cloned" VM kept giving me issues with GPU passthrough. Somehow, it just won't use the GPU for apps. I have therefore deleted the "cloned" VM and am installing a Windows 10 VM from scratch to see if it works... sigh...
 
Update 18 February 2023: After reinstalling the Windows 10 VM, and making sure to set Display to None, I managed to get the GPU passthrough working. I even managed to play Fortnite at 1440p (using Performance mode with all settings at Low except view distance at Epic).
 
Update 21 January 2024: For those who installed Proxmox VE 7 on Linux Mint Debian Edition 5 (LMDE 5), I managed to do a dual in-place upgrade from Proxmox VE 7 to 8, and LMDE 5 to 6. Details can be found here.
Dual upgrade: Proxmox 7 to 8 and Linux Mint Debian Edition 5 to 6


Thursday, January 26, 2023

Cold...

It has been really cold these two days.

So much so that the R720 rack server is complaining.

😅

Wednesday, January 11, 2023

5th anniversary of Violet Evergarden anime series

Today marks the 5th anniversary since Violet Evergarden anime series aired in Japan.

(A bit about dates... the series started showing on 10 January 2018 at 24:00, or 0:00 of 11 January 2018. This means the actual anniversary is 11 January, but in Japan, shows that start at midnight or later are counted based on the previous date, using times like 24:00 for midnight and 25:00 for 1:00 the next day. So depending on who you ask, it can either be 10 January, or 11 January.)

I recently caught Violet Evergarden The Movie in a cinema again because there was a special screening. Hopefully, the entire series comes back for a rebroadcast on TV, instead of just the special cut that was shown on Nippon TV in October 2021.

Oh, KyoAni has been conducting 10th anniversary events and such for its past series like Hyouka, so we can probably expect something for Violet Evergarden series in 2028. Five more years to wait!

My overall thoughts on Violet Evergarden The Movie

Events:
 
Translations of short stories:
Gilbert Bougainvillea and the Fleeting Dream (unofficial translation of "ギルベルト・ブーゲンビリアと儚い夢")
The Starry Night and the Lonely Two (unofficial translation of 星降りの夜とさみしいふたり)
Diethard Bougainvillea's If (unofficial translation of ディートフリート・ブーゲンビリアIf) 
The Tailor and the Auto-Memories Doll (unofficial translation of 仕立て屋と自動手記人形)
 
Tellsis (Nunkish) translation:
Last line of Violet's final letter to Gilbert
 
Insights on the movie:
 
Audio commentary notes:
 
 
All posts related to Violet Evergarden.

Friday, January 06, 2023

Watching Violet Evergarden the Movie at a LIVE ZOUND cinema (15th viewing)

What better way to start 2023 than by watching Violet Evergarden the Movie at a cinema?

So when I found out that a cinema in the next city will be holding a special screening of Violet Evergarden the Movie, I blocked off the date in my calendar, booked a ticket, and made my way there. It was my 15th viewing of the movie at a cinema, after the 14th viewing more than a year ago.

It was my first time going to Cinecitta in Kawasaki.

There was even this fountain show in front of the place, and when I arrived, it was just in time for the show.


This cinema has a special sound and projection system that uses its original LIVE ZOUND system based on concert hall speaker technology and a 4K RGB laser projection system. This is my first time watching the movie in this different "format".

My thoughts about the movie can be found in other posts linked below. Here, I will touch on the LIVE ZOUND version. First, the sound. I think the sound system is kind of better than what you would get from a "normal" cinema. However, it is not that noticeably better, not like a Dolby Cinema. You do get to enjoy the small little sounds, like people in the background, the wind, rain, clock ticking, and stuff like that. But I feel it kind of lacked the "boom"... no real impact? may be the word.

What really irked me was the visual part of the movie. Although the cinema advertises its 4K RGB laser projection system as part of the LIVE ZOUND package/format, well, this is only going to be meaningful if you use video source that has been properly remastered for that colour range and resolution. Watching the movie, it didn't feel that way. The colours were kind of washed out, making the brighter scenes look too bright (lack of contrast), while the darker scenes kind of had this white/gray filter look. It was not as noticeable for brighter landscape scenes, but those with faces of people up close... the faces ended up either too bright or too bland. I don't think it is even worth comparing with the vivid colour contrast that I enjoyed at the local Dolby Cinema. I don't think the "normal" cinema version was even this bland. In a way, it reminded me of trying to watch the HDR version of the movie on a SDR monitor.

Still, I am glad that the cinema took the effort to offer a special screening of the movie, more than two years after its release in September 2020. I am sure other fans shared that sentiment, since there was a round of applause when the movie ended.

They even put up Violet's "uniform" on display, although I didn't see it when I arrived, and only managed to take a few photos when I was leaving.


(On my way back, there was an accident on the JR lines. Someone got injured and so most of the trains in the area were suspended. I ended up having to take the Keikyu line and Yokohama municipal subway to get home... a long detour that had me a bit worried because it was really late and I didn't know if I would make the last trains.)

I think my favorite is still the Dolby Cinema version of the movie. Hopefully, Violet Evergarden the Movie will come back for a special "revival" screening at the nearby Dolby Cinema. 🙇‍♀️🙇‍♀️🙇‍♀️🙇‍♀️🙇‍♀️🙇‍♀️🙇‍♀️🙇‍♀️🙇‍♀️🙇‍♀️

My overall thoughts on Violet Evergarden The Movie

Events:
 
Translations of short stories:
Gilbert Bougainvillea and the Fleeting Dream (unofficial translation of "ギルベルト・ブーゲンビリアと儚い夢")
The Starry Night and the Lonely Two (unofficial translation of 星降りの夜とさみしいふたり)
Diethard Bougainvillea's If (unofficial translation of ディートフリート・ブーゲンビリアIf) 
The Tailor and the Auto-Memories Doll (unofficial translation of 仕立て屋と自動手記人形)
 
Tellsis (Nunkish) translation:
Last line of Violet's final letter to Gilbert
 
Insights on the movie:
 
Audio commentary notes:
 
 
All posts related to Violet Evergarden.