Back  
 Next

This is an old revision of the document!


Back  
 Next

PiKVM

I purchased a PiKVM kit in 2021, and got it operational at that time. I did not need to use it until recently, 2024-09. Basically a special 'hat' is mounted on a standard Raspberry Pi 4, the smallest memory unit type being sufficient (2 GB). The kit was complete with all the required parts, such as the hat, Raspberry PI, a case, small OLED display and various cables. The PiKVM is V3 HAT with RPi V4 2GB.

After about 3 years of being shelved the OS would not update. It was easier to simply re-image with the latest version of the software. I followed the Flashing PiKVM OS image instructions, using the Linux CLI image flash option. I tried again after about a year and the update was large, took a long time and failed the first try. I suggest that updating needs to be completed more frequently than yearly, perhaps every 1 - 3 months.

The PiKVM builtin display shows the KVM IP address, but I just used Linux commands to find from my LAN, e.g. sudo nmap -sn 192.168.1.1/24. Once I got satisfactorily operation I followed the instructions to change the passwords on the PiKVM and placed the related information into my password manager.

My router computers built in BMC/IMPI had failed and was difficult to use, particularly any time it was reset. Hence I disabled the BMC VGA system and used the main CPU builtin GPU to the PiKVM with a USB C to USB A cable for the keyboard and mouse access. I used a jumper on the motherboard to disable the BMC VGA to ensure it would not interfere with operation. Basically I was no longer using the built in KVM.

Browser Video mode options

In Firefox make sure that OpenH264 is installed and activated to use the default WebRTC H.264 option in PiKVM. Otherwise try Legacy MJPEG if this does not function for whatever reason. See PiKVM Handbook Video modes for more information on these options.

PiKVM V3 supports maximum resolution 1920×1080@50Hz, 60Hz will not work. You can use any other resolution less than the specified one, for example: 1600×1200@60Hz, 1280×720@60Hz, etc. If you have problems with the video, follow this guide. The PiKVM V3 standard default resolution is 1280×720@60Hz, as a basic terminal KVM this is adequate.

Terminal versus Graphical

The final output mode of the computer the PiKVM is attached to is determined by the attached computer. Normally servers boot into terminal mode (CLI = command line interface) and desktops boot into graphical mode. I often load a graphical mode on to my servers to allow VNC access, however I usually leave the default boot mode to terminal as my servers are headless. As the primary purpose of a KVM is full remote access during boot, a graphical user interface is not really necessary.

If graphical mode is really wanted used sudo systemctl isolate graphical.target and to switch back to CLI mode sudo systemctl isolate multi-user.target. On the PiKVM V3 I noticed the return to multi-user target does not function, however the shortcut Ctrl+Alt+F1 does work. Note this does not change the default boot mode, which can be done by changing the isolate directive with default, e.g. sudo systemctl default graphical.target. The current default directive can be checked with systemctl get-default

The PiKVM virtual keyboard can be used to give the following commands:

  • Ctrl+Alt+F1 switch to tty 1 (main boot CLI)
  • Ctrl+Alt+F7 switch to graphical user interface.

The ctrl and Alt keys can be held on by right clicking on the virtual keyboard. Also the ctrl and Alt keys can be depressed on the main keyboard and then the function key on the virtual keyboard depressed. This ensures the local computer does not capture and action the control key input.

A reasonably description of Linux boot targets is given here and here

Update OS

  • PiKVM OS (and the underlying Arch Linux ARM upstream) often receives software updates. After installation, it makes sense to update the OS.
  • The question of how often to update needs to primarily consider access to the OS and software latest features and latest security updates. Arch Linux is a rolling release frequently updated and sometimes has difficulties successfully updating from older versions. In these cases it maybe easier to simply re-flash the latest pikvm os on to the memory card.
  • Arguably if the pi-kvm is working it does not need to be updated
  • Security should not be an significant issue unless directly accessible from internet. Although I can not think of any reason why direct internet access should ever be required. It should always be possibly to access via a secured VPN if internet access is required.

To update pikvm os:

  1. Login into the shell as root
  2. pikvm-update will run the update command that updates both the pikvm and underlying Arch OSs.
    1. This script does the full update including placing the OS into rw mode before update and ro mode upon completion.
    2. The commands will inform if a reboot is necessary. If reboot required, reboot command will reboot in root.
    3. If message pikvm-update: command not found received then perform following
      1. rw command to place into read/write mode
      2. pacman -Syy command to update arch repository database
      3. pacman -S pikvm-os-updater to install the pikvm-update package
      4. pikvm-update should then run the update command
    4. if the pikvm-update command still fails to function correctly it maybe necessary to re-flash the operating system on to the memory card, use the latest available version online.

PiKVM address and name

I assigned the PiKVM a specific IP address in the LAN Kea DHCP server and a local name in the LAN Bind9 DNS server and then performed internal secure routing on the LAN using Traefik. The PiKVM software defaults to using a self signed certificate (Snake oil) for HTTPS. I wanted to use simple http behind a local router that would terminate the host https on a reverse proxy to a http. The instructions are to edit /etc/kvmd/override.yaml on the PiKVM adding the following:

nginx:
    https:
        enabled: false

This function as anticipated.

See KVMD 3.301: Generated Nginx configs

Back  
 Next
/app/www/public/data/attic/tech_notes/pikvm.1754828347.txt.gz · Last modified: 2025-08-10 Sun wk32 20:19
CC Attribution-Share Alike 4.0 International Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International