Owl's Nest

Computer Journal

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.

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".

  1. Install spice-guest-tools on the Windows guest. Then, shut it down.
  2. Go to the View menu and select Details.
  3. 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.
  4. Click Video. Set guest video to QXL.
  5. Click Display. Set display to SPICE.
  6. 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?").

Sharing folders

  1. Set up SPICE as above. Start up your guest.
  2. 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.
  3. 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.
  4. 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.

Improving performance

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.

  1. Open your guest (don't start it, just open it). Go to the View menu and click Details.
  2. Click CPUs.
  3. Click Topology and check "Manually set CPU topology".
  4. 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.

  1. Hold down the Alt key.
  2. While still holding down the Alt key, hold down the Print Screen key. Continue holding these two keys.
  3. 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

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)[1][2]. Turning DPM off resolves the issue with no apparent hit to performance.

  1. Open up /etc/default/grub and go to the line GRUB_CMDLINE_LINUX_DEFAULT.
  2. Add the following to the end of the line: radeon.dpm=0
  3. Run grub-mkconfig -o /boot/grub/grub.cfg as root.
  4. 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 amdgpu.dpm=0.

How to Turn Off That Godawful 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.

  1. Create /etc/modprobe.d/nobeep.conf
  2. Inside that file, put blacklist pcspkr. Done.
  3. If you only need a short-term fix for the current session: run rmmod pcspkr


Here are my .bashrc, .bash_aliases, and .vimrc files. Feel free to make use of them!

Arch Install

  1. Verify and burn ISO to USB. Shut down computer. Plug in USB.
  2. Turn on computer and boot into USB (try pressing F12, F2, and/or F10 while starting up).
  3. Set keyboard layout. If US, skip this step.
  4. Check boot mode (BIOS or UEFI). Run ls /sys/firmware/efi/efivars; if output is shown, boot mode is UEFI. This procedure assumes UEFI.
  5. Connect to network:
    • ip link
    • iwctl
    • device list and 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)
    • exit
    • ping archlinux.org to confirm connection.
    • If unsuccessful: rfkill unblock wifi and try again.
  6. timedatectl set-ntp true
  7. timedatectl status
  8. If all looks good, then it's partitioning time.
    • lsblk and 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; mkswap /dev/[disk]2; mkfs.ext4 /dev/[disk]3.
    • Mount partitions: mount /dev/[disk]3 /mnt; mkdir -p /mnt/boot && mount /dev/[disk]1 /mnt/boot; swapon /dev/[disk]2
  9. Pacstrap in the essentials: 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.]
  10. Fstab: genstab -U /mnt /mnt/etc/fstab; check for errors and continue if okay.
  11. Chroot in: arch-chroot /mnt
  12. Set timezone: ln -sf /usr/share/zoneinfo/[location] /etc/localtime
  13. Set system time: hwclock --systohc
  14. locale-gen
  15. Edit /etc/locale.gen and uncomment your locale.
  16. Edit /etc/locale.conf and add LANG=en_US.UTF-8 (if you're an English speaker)
  17. Edit /etc/hostname and add your choice of hostname. Have fun naming your computer baby.
  18. Edit /etc/hosts. Add:
    • ::1
    • [tab character][your hostname]
  19. Check: lspci -K; if output is shown, all is well.
  20. Set up wifi: ip link set [device] up
  21. Check: dmesg | grep firmware; if output is shown, all is well.
  22. mkinitcpio -P
  23. Set your passwd
  24. Set up GRUB.
    • 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
  25. Install any relevant microcode (see microcode wiki page).
  26. If all is well, reboot.
  27. Start systemd-networkd and systemd-resolved. Go to the systemd-networkd wiki page to configure it if needed.
  28. Add a non-root user and install any needed software (GUI, audio, etc.).

Last updated

Back to top