Open this article in new tab
Ages ago, I stumbled across a bit of advice suggesting keeping a journal documenting every tweak and fix you've done to a computer. If you ever need to make that same change again, it's right there in your journal, saving you the pain of hunting down that one forum thread again (and saving you a lot of suffering if that thread no longer exists). My little journal's come in handy a few times. This page holds the entries that I'm comfortable putting online for anyone else that can make use of them.
Converting an OVA image to QCOW on Linux
- Go to the .ova image's directory.
- Extract the image with
tar -xvf(I forget where I picked this up, but I always remember those tags as "eXtract ze Vucking File"). This will spit out a bunch of files, but you only need to care about the VMDK.
- Make sure you have qemu-image installed.
qemu-img convert [VMDK name]-disk001.vmdk [VMDK name].qcow2 -O qcow2; the arguments are the input filename, output filename, and the format of the output (-O).
- Check that it worked using
- If the image works, then you can discard the other files. You no longer need them.
Installing Windows 11 Without Meeting Hardware Requirements
It turns out that you can circumvent the hardware checks (as of , anyway) with some slightly cursed registry editing. Credit to Tom's Hardware for this one.
- Boot into the install media.
- Instead of starting the install, hit Shift + F10. This will open a command prompt.
- Make your way over to
- Add three new 32-bit DWORD registry keys here:
BypassRAMCheck. Set each of these equal to
- You don't need to make all three in all cases. Each key does what it says on the tin (stops the TPM check, stops the secure boot check, and stops the RAM check respectively), so you only need to add the keys that are stopping you from a successful install.
CUPS and Network Printing
TL;DR: if you've installed CUPS and Avahi but still can't discover printers, check your firewall settings.
Printing on Linux usually uses CUPS (which needs to be enabled, either through cups.service for on-boot activation or cups.socket for on-demand activation). CUPS depends on Avahi to discover network printers. Avahi needs UDP port 5353 open to do its job. If this port is blocked, then Avahi won't find anything; ergo, no printers. If you're unable to find printers despite having all the necessary software installed and configured, then your firewall is the next place to check.
Mass Search and Replace
Search and replace works for HTML across multiple files in Kate if you tweak the settings to save changed files on exit. That's all. Hooray, not needing to manually replace 30+ headers anymore!
Changing the Linux console font
It turns out there are a few different ways to do this!
- The easy way: if you're on an apt-based distribution, run
dpkg-reconfigure console-fontas root. Requires the console-setup package.
- Slightly harder: edit /etc/vconsole.conf and reboot to change your console font on Systemd systems.
- Harder still (but really not that bad): edit /etc/default/console-setup manually.
FONTFACEis your font family of choice; it needs to be a console font. Don't go chucking Arial in there expecting it to work.
FONTSIZEis the font size. Available sizes can be found in the filenames of your available console fonts; they'll be the reverse of the numbers listed (so
Terminus32x16.psf.gzshould be 16x32 in /etc/default/console-setup). Run
setupconto apply your new settings.
- You can find all of your console font files at one of the following locations (varies by distribution):
Tweaks for a Windows 10 guest in virt-manager
Setting up SPICE
AKA "the thing that makes copy paste, display resizing, and a whole lot more work".
- Install spice-guest-tools on the Windows guest. Then, shut it down.
- Go to the View menu and select Details.
- Click Add Hardware. Select Channel. Set the name to
com.redhat.spice.0. Set the device type to Spice Agent (spicevmc). Click Finish to add the device.
- Click Video. Set guest video to QXL.
- Click Display. Set display to SPICE.
- In virt-manager: go to the View menu for the guest. Scale display. Make sure "auto resize VM with window" is on (you're welcome- that took a half hour of digging and several frustrated mutterings of "why is it saying SPICE is disconnected?").
- Set up SPICE as above. Start up your guest.
- Use virt-viewer on its own to connect to your client's graphical console, not virt-manager's built-in virt-viewer. The separate virt-viewer has additional menus you'll need to make this work.
- In virt-viewer: File menu, Preferences, Share Folder. Check this and select your folder of choice. You'll need to do this every time you boot up the guest and want to share a folder.
- On the guest: go to C:\Program File\SPICE webdavd\map-drive.bat. Run it and your shared folder will show up as a new drive. I'd suggest putting a shortcut to this on your desktop or running it on boot so you don't have to track it down every time.
Virt-manager apparently only offers up threads from one CPU core by default (Windows 10 Home only recognizes 1 socket, 2 if you're lucky, so this is somewhat sensible as a default). As a result, Windows is outright painful to use. Luckily, we can tell virt-manager to let Windows know it can use more cores.
- Open your guest (don't start it, just open it). Go to the View menu and click Details.
- Click CPUs.
- Click Topology and check "Manually set CPU topology".
- Set however many sockets, cores, and threads you'd like. The post I found suggesting this advised one socket, 2 cores, and 8 threads, but the specific numbers will depend on your hardware configuration and preferences.
Unconventionally restarting a Linux computer
I was helping a friend install Linux Mint. Everything seemed to be going well, and the install went smoothly until the very end. When prompted to remove the USB stick and restart, the computer failed to respond to the provided restart key. The power button also failed to shut the computer down. Opening up another console in hopes of running a reboot command didn't work either; one repeating error was clogging the console, and input wasn't recognized. Every single console had the same issue. Some serious digging turned up one of the strangest fixes I've ever done, and I'd think it was bullshit if it didn't work.
- Hold down the Alt key.
- While still holding down the Alt key, hold down the Print Screen key. Continue holding these two keys.
- Very slowly, type the letters REISUB. The computer should reboot.
If you want the computer to shut down instead of rebooting, enter the letters REISUO instead.
This works because holding down Alt and Print Screen changes your keystrokes into system requests. As the site where I learned about this explains:
- R: Switch the keyboard from raw mode to XLATE mode
- E: Send the SIGTERM signal to all processes except init
- I: Send the SIGKILL signal to all processes except init
- S: Sync all mounted filesystems
- U: Remount all mounted filesystems in read-only mode
- B: Immediately reboot the system, without unmounting partitions or syncing
Fun fact: entering C instead of REISUB supposedly forces a crash. Don't try this at home.
Integrated AMD GPU crash fix; DPM problems
At the end of 2021, I came across one of the most annoying crashes I've had to troubleshoot. It took hours of trawling forums to find a solution.
Pushing the GPU too hard caused the screen to freeze for a few seconds, then go completely black. The computer was unresponsive until reboot (even caps lock didn't do anything; the indicator light didn't turn on when the key was pressed). A reliable way to cause this crash was starting Firefox, then opening a large number of tabs and loading a new website on each one as quickly as possible. Steam could also cause this crash if used intensively.
It turns out the problem is with specific models of integrated AMD GPUs that use Radeon's dynamic power management (DPM). Turning DPM off resolves the issue with no apparent hit to performance.
- Open up /etc/default/grub and go to the line
- Add the following to the end of the line:
grub-mkconfig -o /boot/grub/grub.cfgas root.
- Reboot and rejoice in your non-crashing computer.
I also add a few other lines to /etc/default/grub that may be relevant/worth adding if this doesn't work. All of these lines were found by trawling forums for similar-looking crash reports and seeing what people claimed fixed their issue.
amdgpu.vm_update_mode=3: from kernel documentation:
"Override VM update mode. VM updated by using CPU (0 = never, 1 = Graphics only, 2 = Compute only, 3 = Both)."
radeon.cik_support=0: Disables Carribean Islands support for Radeon. Helps prevent/fix other crashes specific to certain integrated AMD GPU models by forcing use of amdgpu instead of radeon.
lspci -k | grep -A 3 -E "(VGA|3D)"should output a list of which drivers are currently in use.
radeon.si_support=0: Disables Sea Islands support for Radeon. Helps prevent/fix other crashes specific to certain integrated AMD GPU models by forcing use of amdgpu instead of radeon.
lspci -k | grep -A 3 -E "(VGA|3D)"should output a list of which drivers are currently in use.
amdgpu.cik_support=1: Ensures Carribean Islands uses amdgpu. See above Radeon arguments.
amdgpu.si_support=1: Ensures Sea Islands uses amdgpu. See above Radeon arguments.
Finally, amdgpu's dynamic power management can be disabled if needed by adding the line
How to turn off the terminal bell
I've been startled one too many times by an earsplitting beep after hitting backspace in a terminal. I got fed up and looked up how to disable it altogether.
- Create /etc/modprobe.d/nobeep.conf
- Inside that file, put
blacklist pcspkr. Done.
- If you only need a short-term fix for the current session: run
Here are my .bashrc, .bash_aliases, and .vimrc files. Feel free to make use of them!
Arch install process
- Verify and burn ISO to USB. Shut down computer. Plug in USB.
- Turn on computer and boot into USB (try pressing F12, F2, and/or F10 while starting up).
- Set keyboard layout. If US, skip this step.
- Check boot mode (BIOS or UEFI). Run
ls /sys/firmware/efi/efivars; if output is shown, boot mode is UEFI. This procedure assumes UEFI.
- Connect to network:
device listand find your wifi/ethernet device.
station [device] scan
station [device] get-networks
station [device] connect [network name](if there's a password, it'll prompt you)
ping archlinux.orgto confirm connection.
- If unsuccessful:
rfkill unblock wifiand try again.
timedatectl set-ntp true
lsblkand find your drive's name.
cgdisk /dev/[your disk]
- Delete existing partitions (could probably overwrite them instead, but I find it easier to delete and remake).
- Personal preference: 512MB ef00 boot; 8g 8200 swap; remaining space 8300 arch. Keep it simple.
- Write changes, quit cgdisk. If everything works okay, continue.
- Format partitions:
mkfs.fat -F32 /dev/[disk]1;
- Mount partitions:
mount /dev/[disk]3 /mnt;
mkdir -p /mnt/boot && mount /dev/[disk]1 /mnt/boot;
pacscrap /mnt base linux linux-firmware base-devel man-db man-pages texinfo [networking; networkmanager and/or iwd] [CLI text editor; vim, emacs, nano, etc.]
genstab -U /mnt /mnt/etc/fstab; check for errors and continue if okay.
ln -sf /usr/share/zoneinfo/[location] /etc/localtime
LANG=en_US.UTF-8(if you're an English speaker)
[tab character][your hostname]
lspci -K; if output is shown, all is well.
ip link set [device] up
dmesg | grep firmware; if output is shown, all is well.
- Install GRUB:
pacman -S grub efibootmgr
- Tell GRUB how and where to set itself up:
grub-install --target=x86-64-efi --efi-directory=/boot --bootloader-id=GRUB
- Make GRUB config file:
grub-mkconfig -o /boot/grub/grub.cfg