how-to-build-a-kvm-over-ip-with-raspberry-pi

How to Build a KVM Over IP with Raspberry Pi

If you’ve ever needed remote access to a PC, you’ve probably tried VPN or other apps such as TeamViewer. However, this kind of software only works within the remote computer’s OS, which means that it can’t access the BIOS, reboot, install an operating system or power on the computer. There are several solutions that allow you to remote control a PC independently of its operating system, but using a KVM over IP is one of the most convenient and affordable.

While a store-bought KVM over IP device can cost hundreds of dollars, it’s easy to use a Raspberry Pi to create your own. A developer named Maxim Devaev designed his own system called Pi-KVM, which he is planning to sell as a $130 kit. However, if you have the right parts, you can use the software he’s developed and your Pi, to put it together for far less. 

Below, we’ll show you how to build your own Raspberry Pi-powered KVM over IP that can output full HD video, control GPIO ports and USB relays, configure server power using ATX functions and more. You’ll be able to control the whole setup via a web browser from another device over the internet via TailScale VPN or on your local network. 

Pi-KVM prototype v3 without case  (Image credit: Tom’s Hardware)

What You Need to Build a KVM Over IP with Raspberry Pi 

  • Raspberry Pi 4 or Raspberry Pi Zero 
  • 16 GB or larger microSD Card. (See best microSD cards for Raspberry Pi
  • HDMI-to-CSI bridge like this one or or USB HDMI capture dongle. (https://amzn.to/2ZO9tjo 
  • USB female to dual male Type-A splitter  like this one
  • USB C to Type-A cable
  • 5V, 3 amp power supply with USB Type-A output. You’ll be plugging a type-A cable into it so the official Raspberry Pi power supply won’t do.

Setting Up the SD Card for Raspberry Pi KVM Over IP 

The software you need for the Raspberry Pi is all contained on a custom disk image that you must download and burn to a microSD card. Here’s how to do that with Raspberry Pi Imager, but you can also use other burning software such as balenaEtcher. 

1. Download the Pi-KVM disk image. The first thing we will need is to download the ready made image from pikvm.org. Note that there are different versions, depending on which Pi you use and whether you use the HDMI-to-CSI bridge or an HDMI-to-USB capture dongle. The image file is in BZ2 format so you’ll need to uncompress it.   

(Image credit: Tom’s Hardware)

2. Extract the IMG file from the BZ2 file you downloaded. If you have Windows, BZ2 support isn’t built-in, but you can use 7Zip to do it.

3. Launch Raspberry Pi Imager. If you don’t have it installed already, you can download it from the Raspberry Pi Foundation’s website.

4. Select “Choose OS” -> “Use Custom” and locate the Pi-KVM image.Pick your microSD card by clicking Choose SD Card. We will now “Choose SD Card”, make sure it’s the correct one you are choosing.

5. Click Write.  

(Image credit: Tom’s Hardware)

Setting Up the Raspberry Pi for KVM Over IP 

Now that we have finished burning the microSD Card, we can move on to installing the HDMI-to-CSI-2 bridge or USB-to-HDMI dongle and prepping the OTG USB-c cable

1. Connect the CSI ribbon cable from the HDMI-to-CSI-2 bridge to the Raspberry Pi’s CSI camera port. Make sure that the blue marking faces the black clamp. If you are using an HDMI-to-USB dongle instead, connect it to a USB port on your Pi. If you are using a Pi Zero, you will need microUSB to USB Type-A hub. 

(Image credit: Tom’s Hardware)

2. Disable the 5V pin on one of the USB Type-A male connectors from your splitter. The easiest way to do this is to place a small piece of Kapton tape over the right-most pin on the connector. You could also try cutting that leads to that pin, but that’s more complicated.

This will be the connector that attaches to a USB port on the PC you wish to control. If you don’t disable that 5V pin, it will back feed the power from your wall power to the PC, possibly causing damage to its USB port. 

(Image credit: Tom’s Hardware)

3. Connect the USB C-to-A cable to the Type-A female connector on the splitter. This will provide power to the Pi. Your cables should look like the picture below. 

(Image credit: Tom’s Hardware)

4. Connect the USB-C cable to the Raspberry Pi 4’s USB-C port.

5. Connect the unmodified Type-A male to your power supply.

(Image credit: Tom’s Hardware)

6. Attach the USB Type-A connector and HDMI to the PC you wish to remote control.  

(Image credit: Tom’s Hardware)

7.  Insert the microSD card we created and power on the Raspberry Pi.  

Setting Up the Pi-KVM Software 

At this point we are ready to start using the Pi-KVM. On first boot it will take longer then expected due to the initial process for enlarging the microSD card so be patient and it will boot. 

1. Locate your Raspberry Pi’s IP address.  You can do this  looking through your router’s control panel to see what devices are logged on, or by using a little method I like to do called ARP.

To find the Pi’s IP using this method, launch Windows PowerShell, run the command “arp -a” and you’ll see a list of devices on your local network. Anything that begins with b8:27:eb: or dc:a6:32: is a Raspberry Pi. 

(Image credit: Tom’s Hardware)

2. Navigate to the Pi’s IP address in a browser on your client computer (the one you are using to control the other PC). You will be redirected you to your login page.

3. Log in. The default username is admin and the password is admin also.

(Image credit: Tom’s Hardware)

4. Click the KVM icon.  

(Image credit: Tom’s Hardware)

You should now be presented with a screen like the one shown below, providing you with access to the remote PC and a number of other menus. . I have more options then others and you can unlock them by going to the pikvm github for more instructions.  

(Image credit: Tom’s Hardware)

Keep in mind that the more storage you have on your sd card the more ISO images you can store and use for future PC setups.

(Image credit: Tom’s Hardware)

With the proper GPIO hook ups you can also enable the use of ATX controls 

(Image credit: Tom’s Hardware)

To expand the functionally of the PI-KVM to allow for more display inputs, you can connect it to an HDMI 4 port switch with USB control.

Pi-KVM Prototype V3 without case and KVM 4 port switch  (Image credit: Tom’s Hardware)

(Image credit: Tom’s Hardware)

Updating Pi-KVM to the Latest Version 

Pi-KVM is always getting new features so it’s important to keep the software up to date. Fortunately, you don’t need to reflash the microSD card. To update:

1. Click the Terminal icon on Pi-KVM’s main menu. A CLI shell will appear. 

(Image credit: Tom’s Hardware)

2. Become a super user by typing “su” and then entering “root” as the password. 

3. Type “rw” to make the file system read/write.  

(Image credit: Tom’s Hardware)

4.  Enter “pacman -Syu” and “Y” to get updates.

(Image credit: Tom’s Hardware)

(Image credit: Tom’s Hardware)

Reminder: set the file system back to ReadOnly with “ro” in the command line when done. 

Access Pi-KVM Over the Internet 

You can use Tailscale to access Pi-KVM over the internet. This is a convenient and free (for private use) tool for organizing a small VPN network.

1. Create a Tailscale account choosing the Solo Plan will be free for personal use only

2. Click the Terminal icon on Pi-KVM’s main menu. 

(Image credit: Tom’s Hardware)

3. Become a super user by typing “su” and then entering “root” as the password. 

4. Type “rw” to make the file system read/write.  

(Image credit: Tom’s Hardware)

5.  Type “pacman -S tailscale-pikvm” to install tailscale VPN service on PI-KVM.

(Image credit: Tom’s Hardware)

6. Type “reboot” to perform a soft reboot on the Pi-KVM

7. After the reboot has been performed we will need to gain access to the terminal again so follow steps 1-4

8. Type “systemctl enable –now tailscaled” to enable to service

9. Type “tailscale up” to start the initiation process 

(Image credit: Tom’s Hardware)

10. Follow the Link to authorize this installation 

(Image credit: Tom’s Hardware)

11. Once connected successfully you will see “Success” appear on the terminal.

(Image credit: Tom’s Hardware)

12. Navigate to this URL https://login.tailscale.com/admin/machines to view the IP address assigned by tailscale VPN. 

On the Client Side 

This will show you how to install tailscale on the workstation side. Tailscale supports most operating systems including windows, mac, and linux.

1. Download tailscale for your OS from https://tailscale.com/download

2. Navigate to this URL https://login.tailscale.com/admin/machines to view the IP address assigned by tailscale VPN. 

(Image credit: Tom’s Hardware)

3. Navigating to the IP address given by tailscale on your browser. It will connect you to your PI-KVM  

(Image credit: Tom’s Hardware)

This is a very affordable way to build a very modern, very fast KVM over IP without the high cost. This software is also provided to you for free. There are more features that I have not covered in this tutorial such as VPN, Sharing network from your PI to PC, VNC and many more and if you wish to learn about it, visit the Pi-KVM github page or join the Discord.  

next-gen-thunderbolt-could-double-speed-of-tb4,-intel-says

Next-Gen Thunderbolt Could Double Speed of TB4, Intel Says

(Image credit: Shutterstock)

Thunderbolt 4 is just starting to make noise in the consumer space, but, of course, the folks behind the technology are already looking toward the next generation. This week, executives from Intel stopped by The Tom’s Hardware Show to discuss Thunderbolt and what its next form could look like. 

While celebrating Thunderbolt’s 10th birthday, Ben Hacker, Intel’s director of I/O strategy in the Client Connectivity Division, explained that the development of Thunderbolt 4’s successor is already in place with sights set on higher speed.

“What I think we’re pretty confident of is for at least another speed bump somewhere, and who knows exactly what that is, but call it roughly a doubling,” Hacker said on The Tom’s Hardware Show. 

Thunderbolt 4’s max bandwidth is 40 Gbps, allowing it to support up to two 4K resolution displays at 60 Hz refresh rates or even an 8K one at 60 Hz. Increasing the bandwidth would bring support for even higher resolutions and refresh rates. 

Hacker also pointed toward the need for more bandwidth for concurrent workflows, like editing data on a high-resolution screen, and SSDs as drivers for more bandwidth. 

“Today our data path bandwidth within Thunderbolt 4 is kind of aligned to like a PCIe Gen 3×4 performance, and for some of our storage applications, you’re seeing storage in that kind of form factor already doubling in speed,” Hacker said. 

“There’s already a need for kind of high-performance storage for, maybe, NVMe SSDs or desktop raid arrays that are going to be able to consume more than the 40 gigabits of bandwidth or just under 40 that we can provide today.” 

Backward compatibility is also important for the next generation of Thunderbolt. Intel notably shared the Thunderbolt protocol for what is now known as USB4

“We started first with that connector and cable convergence, and then we have the architectural convergence [with USB4],” Jason Ziller, Intel’s general manager of the Client Connectivity Division, said. “As we move forward, as USB4 evolves, we’ll continue to be converged on those elements of it. But we’ll continue to provide features and capabilities above that or just the optional features in the USB spec that we make required because we know computer users want them.”

The next version of Thunderbolt will presumably be called Thunderbolt 5, but Ziller said they don’t know what the branding moving forward will be yet. Whatever it’s called, Intel expects next-gen Thunderbolt to continue working over USB-C. 

“I think we can definitely stay within the electrical kind of communication path and on the same connector so it’s truly a familiar, backward compatible … solution,” Hacker said.  “ … At least kind of for the next step, whenever that comes, I think we’re pretty confident that we can keep that on a kind of same mechanical interface, same connector, roughly the same topology.”

Of course, we’re still years away from Thunderbolt 5 (or whatever it ends up being called) striking. In the more immediate future, development is in the works for more Thunderbolt 4 accessories, including docks in different sizes and shapes and docks that don’t require their own power adapter and instead uses a laptop’s USB-C charger. 

And for those with the need, Thunderbolt 4 cables up to 50m (164 feet) long should be available around next year.

“We had in [the] previous generation optical cables up to 50m, and so we’re working on delivering that as well now,” Ziller said. 

The Tom’s Hardware Show is live every Thursday at 3 p.m. ET. You can enjoy this week’s episode via the video above, on YouTube, Facebook, Twitch or wherever you get your podcasts.