From 36ffe1d41dce3ab35d8fe392b668a480138c7566 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 3 Nov 2020 22:11:07 +0300 Subject: [PATCH 01/26] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dc7655a..1342d11 100644 --- a/README.md +++ b/README.md @@ -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,6 +318,8 @@ 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). From c1d8c3b49a5593e6a95ab966b296aa304507e34a Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 3 Nov 2020 22:14:49 +0300 Subject: [PATCH 02/26] Update troubleshooting.md --- pages/troubleshooting.md | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/troubleshooting.md b/pages/troubleshooting.md index 70f87e7..f8afce2 100644 --- a/pages/troubleshooting.md +++ b/pages/troubleshooting.md @@ -24,6 +24,7 @@ Details [here](https://github.com/pikvm/pikvm/issues/6). The reason is that the pacman -Syu reboot ``` + :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`. ### 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: From fbc78014726c35afedd297c9db613c498fb8f8db Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 3 Nov 2020 22:15:40 +0300 Subject: [PATCH 03/26] Update troubleshooting.md --- pages/troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/troubleshooting.md b/pages/troubleshooting.md index f8afce2..1076f81 100644 --- a/pages/troubleshooting.md +++ b/pages/troubleshooting.md @@ -18,7 +18,7 @@ Details [here](https://github.com/pikvm/pikvm/issues/6). The reason is that the # 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 From eccaa47bfdc17e006b7aa3123fea099e8d0025c5 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 3 Nov 2020 22:18:36 +0300 Subject: [PATCH 04/26] Update flashing_os.md --- pages/flashing_os.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pages/flashing_os.md b/pages/flashing_os.md index 3210c5a..f1c77b1 100644 --- a/pages/flashing_os.md +++ b/pages/flashing_os.md @@ -53,7 +53,13 @@ Decompress and flash image and follow to the [final steps](#the-final-steps). Be # 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 From 26d4493f3adeb03067ba070fc686ce54d33c4347 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 3 Nov 2020 22:19:06 +0300 Subject: [PATCH 05/26] Update flashing_os.md --- pages/flashing_os.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/flashing_os.md b/pages/flashing_os.md index f1c77b1..31f0405 100644 --- a/pages/flashing_os.md +++ b/pages/flashing_os.md @@ -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,7 +48,7 @@ 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 From 3fd344a1391bfddf27d4be2fa66c03372a03b1f8 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 3 Nov 2020 22:38:19 +0300 Subject: [PATCH 06/26] Update troubleshooting.md --- pages/troubleshooting.md | 44 +++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/pages/troubleshooting.md b/pages/troubleshooting.md index 1076f81..d56659e 100644 --- a/pages/troubleshooting.md +++ b/pages/troubleshooting.md @@ -4,16 +4,36 @@ 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: + + ASUS BIOS glitch + + 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 @@ -26,28 +46,14 @@ Details [here](https://github.com/pikvm/pikvm/issues/6). The reason is that the ``` :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`. -### 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: - - ASUS BIOS glitch - - 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. - ### 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. From 1236e763b0cb9df8e53460bd9fa4ffcfc3e58e47 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 3 Nov 2020 22:59:35 +0300 Subject: [PATCH 07/26] Create edid.md --- pages/edid.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/edid.md diff --git a/pages/edid.md b/pages/edid.md new file mode 100644 index 0000000..262de30 --- /dev/null +++ b/pages/edid.md @@ -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 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` From 26fbda063dc93b36a60a8198ccc4577602eb0ad6 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 3 Nov 2020 23:02:06 +0300 Subject: [PATCH 08/26] Update edid.md --- pages/edid.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/edid.md b/pages/edid.md index 262de30..11b2710 100644 --- a/pages/edid.md +++ b/pages/edid.md @@ -2,7 +2,7 @@ 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. +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. From ef2c23c9dfaaa143c1d380946b264c9c2bc0a991 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 3 Nov 2020 23:23:23 +0300 Subject: [PATCH 09/26] Create mouse.md --- pages/mouse.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pages/mouse.md diff --git a/pages/mouse.md b/pages/mouse.md new file mode 100644 index 0000000..f92096f --- /dev/null +++ b/pages/mouse.md @@ -0,0 +1,41 @@ +# Mouse modes + +There are two modes of mouse operation: absolute and relative. + +In absolute mode, the input device transmits the exact coordinates (X,Y) where the cursor should be moved. + +In relative mode, only the relative offset (dX,dY) to the current position is transmitted, which is unknown to the input device itself. + +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. + +:exclamation: Currently, relative mouse mode is not supported by [Pi-KVM VNC server](vnc.md). +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). + +# Enabling relative mouse on 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`. + +If the mouse is still not detected by the BIOS/UEFI, try disabling horizontal scrolling to ensure maximum compatibility: +```yaml +kvmd: + hid: + mouse: + absolute: false + horizontal_wheel: false +``` + +# Enabling relative mouse on v0 platform (serial HID) +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. From c90e959adfc4307052781ae42c27d04b89cc11b3 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 3 Nov 2020 23:24:23 +0300 Subject: [PATCH 10/26] Update mouse.md --- pages/mouse.md | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/mouse.md b/pages/mouse.md index f92096f..c67d1cc 100644 --- a/pages/mouse.md +++ b/pages/mouse.md @@ -36,6 +36,7 @@ kvmd: absolute: false horizontal_wheel: false ``` +Don't forget to perform `reboot`. # Enabling relative mouse on v0 platform (serial HID) 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. From 552840c963ff1a5d35df1b3ddd8fe9dbe7d3e63e Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 3 Nov 2020 23:24:56 +0300 Subject: [PATCH 11/26] Update mouse.md --- pages/mouse.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pages/mouse.md b/pages/mouse.md index c67d1cc..37c34f8 100644 --- a/pages/mouse.md +++ b/pages/mouse.md @@ -27,16 +27,15 @@ We expect to implement this in [TigerVNC](https://github.com/TigerVNC/tigervnc/i absolute: false ``` * Perform `reboot`. - -If the mouse is still not detected by the BIOS/UEFI, try disabling horizontal scrolling to ensure maximum compatibility: -```yaml -kvmd: - hid: - mouse: - absolute: false - horizontal_wheel: false -``` -Don't forget to perform `reboot`. +* If the mouse is still not detected by the BIOS/UEFI, try disabling horizontal scrolling to ensure maximum compatibility: + ```yaml + kvmd: + hid: + mouse: + absolute: false + horizontal_wheel: false + ``` +* Don't forget to perform `reboot`. # Enabling relative mouse on v0 platform (serial HID) 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. From 5b9a6adb3dcef4f6b5de3d3c1a26af0b3b3e9763 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 3 Nov 2020 23:25:21 +0300 Subject: [PATCH 12/26] Update mouse.md --- pages/mouse.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/mouse.md b/pages/mouse.md index 37c34f8..9b0f0ae 100644 --- a/pages/mouse.md +++ b/pages/mouse.md @@ -26,7 +26,7 @@ We expect to implement this in [TigerVNC](https://github.com/TigerVNC/tigervnc/i mouse: absolute: false ``` -* Perform `reboot`. +* Perform `reboot`. After that reboot your PC. * If the mouse is still not detected by the BIOS/UEFI, try disabling horizontal scrolling to ensure maximum compatibility: ```yaml kvmd: From bd2d89737afd79008a81fddd0c3b2f4fca8d985a Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Wed, 4 Nov 2020 00:38:04 +0300 Subject: [PATCH 13/26] Update mouse.md --- pages/mouse.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pages/mouse.md b/pages/mouse.md index 9b0f0ae..d4f1695 100644 --- a/pages/mouse.md +++ b/pages/mouse.md @@ -1,10 +1,10 @@ # Mouse modes -There are two modes of mouse operation: absolute and relative. +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. +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. +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. @@ -17,6 +17,8 @@ When you press `Esc`, the browser releases the mouse. 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). +:exclamation: This mode is also not supported by mobile browsers. + # Enabling relative mouse on v2 platform (OTG HID) * Switch filesystem to RW-mode using command `rw`. * Edit `/etc/kvmd/override.yaml` and add these lines: @@ -38,4 +40,4 @@ We expect to implement this in [TigerVNC](https://github.com/TigerVNC/tigervnc/i * Don't forget to perform `reboot`. # Enabling relative mouse on v0 platform (serial HID) -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. +: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. From 67b6c25d7884a5c426285384ad7ab8d84951e08f Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Wed, 4 Nov 2020 00:38:23 +0300 Subject: [PATCH 14/26] Update mouse.md --- pages/mouse.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/mouse.md b/pages/mouse.md index d4f1695..350ed30 100644 --- a/pages/mouse.md +++ b/pages/mouse.md @@ -2,7 +2,7 @@ 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 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. From 5124ddae73039d3ef469044370117ef17c890624 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Wed, 4 Nov 2020 00:40:30 +0300 Subject: [PATCH 15/26] Update mouse.md --- pages/mouse.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/mouse.md b/pages/mouse.md index 350ed30..c619072 100644 --- a/pages/mouse.md +++ b/pages/mouse.md @@ -13,11 +13,11 @@ For such cases, support is provided for the relative mode of operation, which ca 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. -:exclamation: Currently, relative mouse mode is not supported by [Pi-KVM VNC server](vnc.md). +:exclamation: 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). -:exclamation: This mode is also not supported by mobile browsers. +:exclamation: The relative mode is also not supported by mobile browsers. # Enabling relative mouse on v2 platform (OTG HID) * Switch filesystem to RW-mode using command `rw`. From 22f5c28204771f6bc493f488f54e8736731076c7 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Wed, 4 Nov 2020 00:41:14 +0300 Subject: [PATCH 16/26] Update mouse.md --- pages/mouse.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/mouse.md b/pages/mouse.md index c619072..71e717e 100644 --- a/pages/mouse.md +++ b/pages/mouse.md @@ -19,7 +19,7 @@ We expect to implement this in [TigerVNC](https://github.com/TigerVNC/tigervnc/i :exclamation: The relative mode is also not supported by mobile browsers. -# Enabling relative mouse on v2 platform (OTG HID) +# 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 @@ -39,5 +39,5 @@ We expect to implement this in [TigerVNC](https://github.com/TigerVNC/tigervnc/i ``` * Don't forget to perform `reboot`. -# Enabling relative mouse on v0 platform (serial HID) +# 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. From a4940d96632a223700f89e7dec650ae71ea1cbb1 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Wed, 4 Nov 2020 00:46:00 +0300 Subject: [PATCH 17/26] Update mouse.md --- pages/mouse.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/mouse.md b/pages/mouse.md index 71e717e..cd8a517 100644 --- a/pages/mouse.md +++ b/pages/mouse.md @@ -29,7 +29,7 @@ We expect to implement this in [TigerVNC](https://github.com/TigerVNC/tigervnc/i 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 ensure maximum compatibility: +* If the mouse is still not detected by the BIOS/UEFI, try disabling horizontal scrolling to achieve the maximum compatibility: ```yaml kvmd: hid: From b84703a81dda94c0de3509b1556cc2b863388b29 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sun, 8 Nov 2020 01:19:03 +0300 Subject: [PATCH 18/26] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1342d11..334d07a 100644 --- a/README.md +++ b/README.md @@ -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; @@ -326,7 +326,9 @@ Our future [v3 platform](#the-future-v3-platform-work-in-progress) will contain * [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). From 7f2ca4445c651e717a8e57ccbc368d9488ff5949 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sun, 8 Nov 2020 01:56:23 +0300 Subject: [PATCH 19/26] Create bluetooth_hid.md --- pages/bluetooth_hid.md | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pages/bluetooth_hid.md diff --git a/pages/bluetooth_hid.md b/pages/bluetooth_hid.md new file mode 100644 index 0000000..2906c92 --- /dev/null +++ b/pages/bluetooth_hid.md @@ -0,0 +1,46 @@ +# 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. + +### Configuring +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/bluetooth.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 + ``` From 70758f367872cd93b74adab79b047b714f98d23f Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sun, 8 Nov 2020 01:57:24 +0300 Subject: [PATCH 20/26] Update bluetooth_hid.md --- pages/bluetooth_hid.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/bluetooth_hid.md b/pages/bluetooth_hid.md index 2906c92..8be0e6f 100644 --- a/pages/bluetooth_hid.md +++ b/pages/bluetooth_hid.md @@ -38,7 +38,7 @@ since it will be used by Bluetooth. Also, Bluetooth operation was tested only on 5. Override `kvmd` service: ``` # mkdir /etc/systemd/system/kvmd.service.d - # cat << EOF > /etc/systemd/system/bluetooth.service.d/override.conf + # 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 From 659b46a95afe02616830e7f93c103e3ab805c7cf Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sun, 8 Nov 2020 02:02:00 +0300 Subject: [PATCH 21/26] Update bluetooth_hid.md --- pages/bluetooth_hid.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pages/bluetooth_hid.md b/pages/bluetooth_hid.md index 8be0e6f..7fd1bda 100644 --- a/pages/bluetooth_hid.md +++ b/pages/bluetooth_hid.md @@ -7,7 +7,7 @@ since it will be used by Bluetooth. Also, Bluetooth operation was tested only on :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. -### Configuring +### Configuring OS 1. Switch filesystem to RW-mode, perform update and install some packages: ``` # rw @@ -44,3 +44,15 @@ since it will be used by Bluetooth. Also, Bluetooth operation was tested only on 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 peering. You will see the `Pi-KVM HID` device. +* Once the server is connected, Pi-KVM will no longer be discoverable and available 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. From 8bf6f58b34c01a4f1a580c73a7e90bfcff3d0bd0 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sun, 8 Nov 2020 02:03:21 +0300 Subject: [PATCH 22/26] Update bluetooth_hid.md --- pages/bluetooth_hid.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/bluetooth_hid.md b/pages/bluetooth_hid.md index 7fd1bda..b757b49 100644 --- a/pages/bluetooth_hid.md +++ b/pages/bluetooth_hid.md @@ -5,7 +5,7 @@ This is not the main case of using Pi-KVM since you still need it to pair with a :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. +: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 OS 1. Switch filesystem to RW-mode, perform update and install some packages: From ac4a77392706bf772dc5ad8605a7dc404cb03f9d Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sun, 8 Nov 2020 02:10:46 +0300 Subject: [PATCH 23/26] Update bluetooth_hid.md --- pages/bluetooth_hid.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/bluetooth_hid.md b/pages/bluetooth_hid.md index b757b49..91e5f2f 100644 --- a/pages/bluetooth_hid.md +++ b/pages/bluetooth_hid.md @@ -53,6 +53,6 @@ since it will be used by Bluetooth. Also, Bluetooth operation was tested only on 7. Perform reboot: `reboot`. ### Using Bluetooth HID -* After a reboot, the Pi-KVM will be ready for detection and peering. You will see the `Pi-KVM HID` device. -* Once the server is connected, Pi-KVM will no longer be discoverable and available to other clients until you unpair the server. +* 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. From f2d56d923f744e7247b0c8e1b79663daf7921034 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Wed, 11 Nov 2020 12:21:18 +0300 Subject: [PATCH 24/26] Update mouse.md --- pages/mouse.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/mouse.md b/pages/mouse.md index cd8a517..31c3739 100644 --- a/pages/mouse.md +++ b/pages/mouse.md @@ -13,11 +13,11 @@ For such cases, support is provided for the relative mode of operation, which ca 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. -:exclamation: 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). +# 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. -:exclamation: The relative mode is also not supported by mobile browsers. +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`. From e67cc4d6bb71df87f9aa6eed7772369d26b6fe3f Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Wed, 11 Nov 2020 12:25:23 +0300 Subject: [PATCH 25/26] Update bluetooth_hid.md --- pages/bluetooth_hid.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/bluetooth_hid.md b/pages/bluetooth_hid.md index 91e5f2f..ce1825c 100644 --- a/pages/bluetooth_hid.md +++ b/pages/bluetooth_hid.md @@ -7,7 +7,7 @@ since it will be used by Bluetooth. Also, Bluetooth operation was tested only on :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 OS +# Configuring the OS 1. Switch filesystem to RW-mode, perform update and install some packages: ``` # rw @@ -52,7 +52,7 @@ since it will be used by Bluetooth. Also, Bluetooth operation was tested only on ``` 7. Perform reboot: `reboot`. -### Using Bluetooth HID +# 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.