Merge pull request #110 from pikvm/2.4

2.4
pull/112/head
Maxim Devaev 4 years ago committed by GitHub
commit c5847147c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,7 +18,7 @@ The website: [pikvm.org](https://pikvm.org). Also join to the [Discord Community
* **FullHD video** using advanced **HDMI-to-CSI bridge** or **USB dongle**;
* Extra low **100ms video latency** (for CSI bridge);
* Bootable **Virtual CD-ROM** and **Flash Drive**;
* USB **Keyboard** and **mouse** (with leds and the wheel), PS/2 keyboard;
* USB **Keyboard** and **mouse** (with leds and the wheel), PS/2 keyboard, Bluetooth HID;
* **Control the server power** using ATX functions;
* Access via **Web UI** or **VNC**;
* Ability to use **IPMI BMC**, **IPMI SoL**, **Redfish** and **Wake-on-LAN** to control the server;
@ -266,7 +266,7 @@ Happy using of Pi-KVM :)
# Limitations
* In very rare cases, some motherboards contain a buggy BIOS that does not understand the keyboard of the **v2** platform (bellow). The reason for this is that the BIOS doesn't fully implement the USB HID stack for composite devices correctly. Meanwhile, Mass Storage Drive can be detected. For this case, we suggest using the Arduino HID from the **v0** platform with **v2**. Thus the Pi-KVM will be connected by two USB cables to the motherboard: one of them will be responsible for the keyboard and mouse, the other for everything else. See [here](pages/arduino_hid.md).
* A similar problem can be observed on devices with UEFI: the keyboard works fine, but the mouse does not work. This problem is much less significant, since all UEFI can be configured using the keyboard and hotkeys, without the mouse. If you want to get a mouse, the solution can be the same: using an Arduino HID, as in the advice above.
* A similar problem can be observed on devices with UEFI: the keyboard works fine, but the mouse does not work. This situation occurs when UEFI does not support absolute mouse mode, which prefers to use Pi-KVM. To solve this problem, [you can enable relative mouse mode](pages/mouse.md).
Our future [v3 platform](#the-future-v3-platform-work-in-progress) will contain an optional HID module for such cases, so you won't have to build anything yourself.
@ -318,13 +318,17 @@ Our future [v3 platform](#the-future-v3-platform-work-in-progress) will contain
# port: 9 # By default
```
* [Mouse modes (if the mouse doesn't work in UEFI)](pages/mouse.md).
* [Multiport KVM over IP](pages/multiport.md).
* [Using IPMI and Redfish](pages/ipmi.md).
* [Using VNC](pages/vnc.md).
* [Using Arduino HID (for USB or PS/2) with v2 platform](pages/arduino_hid.md).
* [Using Arduino HID (for USB or PS/2) on v2 platform](pages/arduino_hid.md).
* [Using Bluetooth HID](pages/bluetooth_hid.md).
* [Wi-Fi configuration after install](pages/wifi_config.md).

@ -0,0 +1,58 @@
# Bluetooth HID
Pi-KVM is able to emulate a Bluetooth keyboard & mouse.
This is not the main case of using Pi-KVM since you still need it to pair with a remote host, but can be used for something like mobile KVM.
:exclamation: Using Bluetooth HID requires additional configuration of the operating system. For v2, this means losing the UART port,
since it will be used by Bluetooth. Also, Bluetooth operation was tested only on RPi4 and v2 platform. Other boards may require different system service settings.
:exclamation: Bluetooth mouse can work only in [relative mode](mouse.md). The reason is that many Bluetooth host drivers do not correctly implement HID descriptors. Horizontal scrolling is not supported for the same reason.
# Configuring the OS
1. Switch filesystem to RW-mode, perform update and install some packages:
```
# rw
# pacman -Syu
# pacman -S bluez bluez-utils raspberrypi-bluetooth
```
2. Edit `/boot/config.txt` and comment these lines:
```
#enable_uart=1
#dtoverlay=disable-bt
```
3. Create an empty directory `/var/lib/bluetooth` and add mountpoint to `/etc/fstab`:
```
# mkdir /var/lib/bluetooth
# echo 'tmpfs /var/lib/bluetooth tmpfs nodev,nosuid,mode=0755 0 0' >> /etc/fstab
```
4. Override and enable the services:
```
# mkdir /etc/systemd/system/bluetooth.service.d
# cat << EOF > /etc/systemd/system/bluetooth.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=*
EOF
# systemctl enable bluetooth
# systemctl enable raspberrypi-btuart
```
5. Override `kvmd` service:
```
# mkdir /etc/systemd/system/kvmd.service.d
# cat << EOF > /etc/systemd/system/kvmd.service.d/override.conf
[Service]
AmbientCapabilities=CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_ADMIN CAP_SETUID CAP_SETGID CAP_CHOWN
CapabilityBoundingSet=CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_ADMIN CAP_SETUID CAP_SETGID CAP_CHOWN
EOF
```
6. Add following lines to `/etc/kvmd/override.yaml`:
```yaml
kvmd:
hid:
type: bt
```
7. Perform reboot: `reboot`.
# Using Bluetooth HID
* After a reboot, the Pi-KVM will be ready for detection and pairing with no auth. You will see the `Pi-KVM HID` device.
* Once the server is connected, Pi-KVM will no longer be discoverable and pairable to other clients until you unpair the server.
* If something went wrong, use the web menu `System -> Reset keyboard & mouse`. This will cause unpair the device and switch the Pi-KVM to public mode before the first client is connected.

@ -0,0 +1,24 @@
# EDID
EDID is information about the video modes supported by the video capture device.
In the case of Pi-KVM, this is an HDMI CSI bridge. Usually, you don't need to change this, since the default configuration is quite flexible,
but sometimes, for example for strange UEFIs/BIOSes, this may be necessary (the [story](https://github.com/pikvm/pikvm/issues/78)).
The EDID is stored on the Pi-KVM in the file `/etc/kvmd/tc358743-edid.hex`. If you write new data there, it will be applied on the Pi-KVM reboot.
You can also apply the new EDID without rebooting to make sure it works:
* Create file with EDID `/root/edid.hex` (examples of file contents are shown below).
* Apply EDID using the command `v4l2-ctl --device=/dev/kvmd-video --set-edid=file=/root/edid.hex --fix-edid-checksums`.
* DO NOT REBOOT the Pi-KVM. Just your PC. Check the UEFI/BIOS.
* If everything works, you can write the same data to `/etc/kvmd/tc358743-edid.hex`.
The examples below are tested on these devices, but they are also suitable for others. To edit or create EDID you can use [AW EDID Editor](https://www.analogway.com/emea/products/software-tools/aw-edid-editor).
### 1280x1024 as preferred resolution, Gigabyte GA-H77-DS3H
`00 FF FF FF FF FF FF 00 52 62 88 88 00 88 88 88 1C 15 01 03 80 00 00 78 0A EE 91 A3 54 4C 99 26 0F 50 54 25 40 00 01 00 01 00 01 00 01 00 01 00 01 00 01 01 01 01 D5 1B 00 50 50 00 19 40 08 20 B8 00 80 00 10 00 00 1E EC 2C 80 A0 70 38 1A 40 30 20 35 00 40 44 21 00 00 1E 00 00 00 FC 00 50 49 2D 4B 56 4D 20 56 69 64 65 6F 0A 00 00 00 FD 00 32 3D 0F 2E 0F 00 00 00 00 00 00 00 00 01 4D 02 03 04 00 DE 0D 20 A0 30 58 12 20 30 20 34 00 F0 B4 00 00 00 18 E0 15 00 A0 40 00 16 30 30 20 34 00 00 00 00 00 00 18 B4 14 00 A0 50 D0 11 20 30 20 35 00 80 D8 10 00 00 18 AB 22 A0 A0 50 84 1A 30 30 20 36 00 B0 0E 11 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45`
### 1920x1080 as preferred resolution, Gigabyte GA-H77-DS3H
`00 FF FF FF FF FF FF 00 52 62 88 88 00 88 88 88 1C 15 01 03 80 00 00 78 0A EE 91 A3 54 4C 99 26 0F 50 54 25 40 00 01 00 01 00 01 00 01 00 01 00 01 00 01 01 01 01 D3 2C 80 A0 70 38 1A 40 30 20 35 00 40 44 21 00 00 1E 7E 1D 00 A0 50 00 19 40 30 20 37 00 80 00 10 00 00 1E 00 00 00 FC 00 50 49 2D 4B 56 4D 20 56 69 64 65 6F 0A 00 00 00 FD 00 32 3D 0F 2E 0F 00 00 00 00 00 00 00 00 01 C4 02 03 04 00 DE 0D 20 A0 30 58 12 20 30 20 34 00 F0 B4 00 00 00 18 E0 15 00 A0 40 00 16 30 30 20 34 00 00 00 00 00 00 18 B4 14 00 A0 50 D0 11 20 30 20 35 00 80 D8 10 00 00 18 AB 22 A0 A0 50 84 1A 30 30 20 36 00 B0 0E 11 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45`
### 1920x1080 as preferred resolution, Intel NUC
`00 FF FF FF FF FF FF 00 52 62 88 88 00 88 88 88 1C 15 01 03 80 00 00 78 0A EE 91 A3 54 4C 99 26 0F 50 54 25 40 00 01 00 01 00 01 00 01 00 01 00 01 00 01 01 01 01 D3 2C 80 A0 70 38 1A 40 30 20 35 00 40 44 21 00 00 1E 7E 1D 00 A0 50 00 19 40 30 20 37 00 80 00 10 00 00 1E 00 00 00 FC 00 50 49 2D 4B 56 4D 20 56 69 64 65 6F 0A 00 00 00 FD 00 32 3D 0F 2E 0F 00 00 00 00 00 00 00 00 01 C4 02 03 04 00 DE 0D 20 A0 30 58 12 20 30 20 34 00 F0 B4 00 00 00 18 E0 15 00 A0 40 00 16 30 30 20 34 00 00 00 00 00 00 18 B4 14 00 A0 50 D0 11 20 30 20 35 00 80 D8 10 00 00 18 AB 22 A0 A0 50 84 1A 30 30 20 36 00 B0 0E 11 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45`

@ -6,7 +6,7 @@ Note: right now, pre-compiled images are only available for the Raspberry Pi 4.
## Using Linux CLI
Decompress and flash image and follow to the [final steps](#the-final-steps). Be careful when choosing your device path:
```bash
```
# bzip2 -d v2-hdmi-rpi4.img.bz2
# dd if=v2-hdmi-rpi4.img of=/dev/mmcblkX
```
@ -48,12 +48,18 @@ Decompress and flash image and follow to the [final steps](#the-final-steps). Be
4. To change the root password use command `passwd` via SSH or webterm. To change Pi-KVM web password use `kvmd-htpasswd set admin`. As indicated on the login screen, you need to use `rw` to make the root filesystem writable before issuing these commands. After making changes, make sure to run the command `ro` to switch the filesystem back to read-only.
5. After installation, we recommend you to update your operating system:
```shell
```
# rw
# pacman -Syu
# reboot
```
6. Important **note for HDMI-USB dongle** users only. Because of this, many video capture devices tell the server's video card that the HDMI cable is supposedly disconnected. This may lead to the fact that if you boot the server without an active stream, the server will not detect your capture card. This is easy to fix:
6. Pacman saves all installed packages in a compressed format so that you can roll back to the old version if something goes wrong. After you've updated and made sure everything works, it makes sense to clear the package cache so that it doesn't take up space on the SD card:
```
# rw
# pacman -Sc
# ro
```
7. Important **note for HDMI-USB dongle** users only. Because of this, many video capture devices tell the server's video card that the HDMI cable is supposedly disconnected. This may lead to the fact that if you boot the server without an active stream, the server will not detect your capture card. This is easy to fix:
* Switch filesystem to RW-mode:
```
# rw
@ -71,7 +77,7 @@ Decompress and flash image and follow to the [final steps](#the-final-steps). Be
# systemctl restart kvmd
```
7. **27.08.2020 note about systemd**: the latest version of Arch Linux has a slightly broken systemd. The problem is that SSH to the Pi-KVM host may not work the first time, but the second or third. The Pi-KVM build environment contains a workaround for this problem: in the file `/etc/pam.d/system-login` line `-session optional pam_systemd.so` is commented. This does not have any negative impact on the PI-KVM functionality, but if you want to, after fixing the systemd (in a couple of months with the next update), you can uncomment this line.
8. **27.08.2020 note about systemd**: the latest version of Arch Linux has a slightly broken systemd. The problem is that SSH to the Pi-KVM host may not work the first time, but the second or third. The Pi-KVM build environment contains a workaround for this problem: in the file `/etc/pam.d/system-login` line `-session optional pam_systemd.so` is commented. This does not have any negative impact on the PI-KVM functionality, but if you want to, after fixing the systemd (in a couple of months with the next update), you can uncomment this line.
If you have any problems or questions, contact us using Discord: https://discord.gg/bpmXfz5

@ -0,0 +1,43 @@
# Mouse modes
There are two modes of pointer device: absolute and relative.
In absolute mode, the input device transmits the exact coordinates (X,Y) where the cursor should be moved. This is how touchscreens or drawing tablets work.
In relative mode, only the relative offset (dX,dY) to the current position is transmitted, which is unknown to the input device itself. This is a regular mouse.
By default, Pi-KVM uses absolute positioning mode as the most convenient for the user and software.
However, this is not always supported by the BIOS/UEFI.
For such cases, support is provided for the relative mode of operation, which can be enabled in the config.
When using relative mode, the browser will exclusively capture your mouse when you click on the stream window in Pi-KVM once.
When you press `Esc`, the browser releases the mouse.
# Important notes
The relative mouse generates a huge number of events that can be poorly transmitted over the network or very slowly perceived by the BIOS/UEFI driver. To solve this problem, mouse events are optimized using a vector sum. This mode is enabled by default and is available in the web menu `System -> Squash mouse moves`. You can try disabling this if you have problems with mouse acceleration. This is the best and most reasonable compromise right now.
Also currently the relative mouse mode is not supported by [Pi-KVM VNC server](vnc.md) yet. The reason is that none of the recommended clients support the [QEMU Pointer Motion Change](https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#qemu-pointer-motion-change-pseudo-encoding) extension.
We expect to implement this in [TigerVNC](https://github.com/TigerVNC/tigervnc/issues/619). The relative mode is also not supported by mobile browsers.
# Enabling the relative mouse on the v2 platform (OTG HID)
* Switch filesystem to RW-mode using command `rw`.
* Edit `/etc/kvmd/override.yaml` and add these lines:
```yaml
kvmd:
hid:
mouse:
absolute: false
```
* Perform `reboot`. After that reboot your PC.
* If the mouse is still not detected by the BIOS/UEFI, try disabling horizontal scrolling to achieve the maximum compatibility:
```yaml
kvmd:
hid:
mouse:
absolute: false
horizontal_wheel: false
```
* Don't forget to perform `reboot`.
# Enabling the relative mouse on the v0 platform (serial HID)
:exclamation: This is not currently supported but will be added in a future release. The reason is that we are working on improving the HID protocol.

@ -4,49 +4,56 @@ As a first step we recommend carefully reading our documentation on [GitHub](htt
-----
# Hardware
### LEDs / Switches do not work in ATX control.
### LEDs / Switches do not work in ATX control
- Double check your wiring as per [the documentation](/README.md#setting-up-the-v2). Make sure you placed the relays (G3VM-61A1) in the correct orientation. The relays for switches (Power, Reset) have a different orientation than the ones for LEDs.
### Pi-KVM does not show any image from the connected computer.
### Pi-KVM does not show any image from the connected computer
- Double check if you connected the HDMI-CSI-2 bridge cable correctly. [Check the documentation for details](/README.md#for-the-hdmi-csi-bridge) A red LED will light up on the bridge if it is connected properly.
- Some laptops do not output any signal until you switched the ouput (usually via the FN + and an F5 key on the keyboard).
### No mouse in UEFI/BIOS
- The BIOS does not support absolute mouse mode, which is preferred by Pi-KVM. In this case, [you can enable relative positioning mode](mouse.md).
### No image in UEFI/BIOS with CSI bridge
- The problem appears on Intel NUC, GA-H77-DS3H, and some other devices. All you need to do is [change the EDID data](edid.md). This is the information about supported resolutions that the CSI bridge reports to your computer.
### Glitchy/wrong UEFI/BIOS resolution
- On some motherboards, the BIOS may be displayed at a lower resolution, or with some rendering issues/glitches, specially on newer ASUS ones. Like this:
<img src="../img/bios_glitch.png" alt="ASUS BIOS glitch" width="400"/>
This can be solved by enabling the **Compatibility Support Module (CSM)** in your BIOS, usually under the **Boot** options.
If you can't or don't want to enable the CSM, you can try connecting a DisplayPort monitor, or a [dummy plug](http://amazon.com/s?k=displayport+dummy+plug). If you remove the DP cable/adapter the bug will reappear.
If none of this works, try connecting the DP cable first, boot into the BIOS, disable the CSM and shutdown (do not restart) your PC. Then, boot into the BIOS and enable the CSM before shutting down your PC. Then connect the HDMI and turn your PC on again.
### HDMI-CSI bridge not working with official RPi PoE HAT
Details [here](https://github.com/pikvm/pikvm/issues/6). The reason is that the [HAT](https://www.raspberrypi.org/products/poe-hat) has a built-in fan controller that conflicts with the TC358743 chip. The solution is to disable the fan control and connect it to the power line so that it works continuously. To turn off the controller you need to add the line `disable_poe_fan=1` to `/boot/config.txt`.
### Big mouse latency on RPi as managed server
- Unusual case: RPi4 is used as a Pi-KVM to control RPi3. In this case, the mouse delay may be several seconds. To fix it, just add line `usbhid.mousepoll=0` to `/boot/config.txt` to the server (i.e. RPI3 in our case) and reboot it.
-----
# Software
### How do I update Pi-KVM with the latest software?
- Connect to your Pi-KVM via ssh and run
- Connect to your Pi-KVM via ssh and run:
```
rw
pacman -Syu
reboot
```
### Glitchy/wrong BIOS resolution
- On some motherboards, the BIOS may be displayed at a lower resolution, or with some rendering issues/glitches, specially on newer ASUS ones. Like this:
<img src="../img/bios_glitch.png" alt="ASUS BIOS glitch" width="400"/>
This can be solved by enabling the **Compatibility Support Module (CSM)** in your BIOS, usually under the **Boot** options.
If you can't or don't want to enable the CSM, you can try connecting a DisplayPort monitor, or a [dummy plug](http://amazon.com/s?k=displayport+dummy+plug). If you remove the DP cable/adapter the bug will reappear.
If none of this works, try connecting the DP cable first, boot into the BIOS, disable the CSM and shutdown (do not restart) your PC. Then, boot into the BIOS and enable the CSM before shutting down your PC. Then connect the HDMI and turn your PC on again.
:exclamation: Pacman saves all installed packages in a compressed format so that you can roll back to the old version if something goes wrong. After you've updated and made sure everything works, it makes sense to clear the package cache so that it doesn't take up space on the SD card: `rw; pacman -Sc; ro`.
### Awesome WM video output
- Sometimes Awesome WM on Linux can't recognize a video output change on a cable. That is, if the cable was first inserted into the monitor, and then you reconnected it to Pi-KVM - it may happen that you will not see the image. It seems that the problem is Awesome WM, since for example with KDE it does not reproducing. If you turn on your workstation with Pi-KVM already connected, everything will work fine.
### Unexpected interruption while loading the image for Mass Storage Drive.
### Unexpected interruption while loading the image for Mass Storage Drive
- If problems occur when uploading even a small disk image it may be due to unstable network operation or antivirus software. It is well known that Kaspersky antivirus cuts off Pi-KVM connections during uploading, so you should add the Pi-KVM website to Kaspersky's list of exceptions or not filter web requests with the antivirus. Antivirus programs can also affect the performance of certain interface elements, for example the quality slider. For Kaspersky, the steps to add the network address of Pi-KVM's website to the exclusion list is: **Protection -> Private browsing -> Categories and exclusions -> Exclusions**
### The Pi-KVM web interface does not work correctly in Mozilla Firefox while it works fine in Google Chrome.
### The Pi-KVM web interface does not work correctly in Mozilla Firefox while it works fine in Google Chrome
- This might be related to your specific hardware combination or browser hardware acceleration. Try [disabling hardware acceleration in Firefox](https://support.mozilla.org/en-US/kb/hardware-acceleration-and-windowblinds-crash) or updating your GPU and chipset drivers.
### I can't copy clipboard contents from the server (the machine controlled via Pi-KVM) to the client.
### I can't copy clipboard contents from the server (the machine controlled via Pi-KVM) to the client
- The clipboard only works from the client to the server not vice versa. There is currently no way to do it.
### Big mouse latency on RPi as managed server
- Unusual case: RPi4 is used as a Pi-KVM to control RPi3. In this case, the mouse delay may be several seconds. To fix it, just add line `usbhid.mousepoll=0` to `/boot/config.txt` to the server (i.e. RPI3 in our case) and reboot it.

Loading…
Cancel
Save