This commit addresses three critical issues discovered during testing: Issue 1 - Intermittent mouse control loss requiring page refresh: When a session was promoted to primary, the HID queue handlers were fetching a fresh session copy from the session manager instead of using the original session pointer. This meant the queue handler had a stale Mode field (observer) while the manager had the updated Mode (primary). The permission check would fail, silently dropping all mouse input until the page was refreshed. Issue 2 - Missing permission failure diagnostics: When keyboard/mouse input was blocked due to insufficient permissions, there was no debug logging to help diagnose why input wasn't working. This made troubleshooting observer mode issues extremely difficult. Issue 3 - Session timeout despite active jiggler: The server-side jiggler moves the mouse every 30s after inactivity to prevent screen savers, but wasn't updating the session's LastActive timestamp. This caused sessions to timeout after 60s even with the jiggler active. Issue 4 - Session flapping after emergency promotion: When a session timed out and another was promoted, the newly promoted session had a stale LastActive timestamp (60+ seconds old), causing immediate re-timeout. This created an infinite loop where both sessions rapidly alternated between primary and observer every second. Issue 5 - Unnecessary WebSocket reconnections: The WebSocket fallback was unconditionally closing and reconnecting during emergency promotions, even when the connection was healthy. This caused spurious "Connection Issue Detected" overlays during normal promotions. Changes: - webrtc.go: Use original session pointer in handleQueues() (line 197) - hidrpc.go: Add debug logging when permission checks block input (lines 31-34, 61-64, 75-78) - jiggler.go: Update primary session LastActive after mouse movement (lines 146-152) - session_manager.go: Reset LastActive to time.Now() on promotion (line 1090) - devices.$id.tsx: Only reconnect if connection is unhealthy (lines 413-425) This ensures: 1. Queue handlers always have up-to-date session state 2. Permission failures are visible in logs for debugging 3. Jiggler prevents both screen savers AND session timeout 4. Newly promoted sessions get full timeout period (no immediate re-timeout) 5. Emergency promotions only reconnect when connection is actually stale 6. No spurious "Connection Issue" overlays during normal promotions |
||
|---|---|---|
| .devcontainer | ||
| .github | ||
| .vscode | ||
| bin | ||
| cmd | ||
| internal | ||
| resource | ||
| scripts | ||
| ui | ||
| .gitignore | ||
| .golangci.yml | ||
| CODE_OF_CONDUCT.md | ||
| DEVELOPMENT.md | ||
| Dockerfile.build | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| block_device.go | ||
| block_device_linux.go | ||
| block_device_notlinux.go | ||
| cloud.go | ||
| config.go | ||
| datachannel_helpers.go | ||
| dc_metrics.go | ||
| dev_deploy.sh | ||
| display.go | ||
| errors.go | ||
| go.mod | ||
| go.sum | ||
| hidrpc.go | ||
| hw.go | ||
| jiggler.go | ||
| jsonrpc.go | ||
| log.go | ||
| main.go | ||
| mdns.go | ||
| native.go | ||
| network.go | ||
| ota.go | ||
| prometheus.go | ||
| publish_source.sh | ||
| serial.go | ||
| session_manager.go | ||
| session_permissions.go | ||
| terminal.go | ||
| timesync.go | ||
| usb.go | ||
| usb_mass_storage.go | ||
| version.go | ||
| video.go | ||
| web.go | ||
| web_tls.go | ||
| webrtc.go | ||
| wol.go | ||
README.md
JetKVM is a high-performance, open-source KVM over IP (Keyboard, Video, Mouse) solution designed for efficient remote management of computers, servers, and workstations. Whether you're dealing with boot failures, installing a new operating system, adjusting BIOS settings, or simply taking control of a machine from afar, JetKVM provides the tools to get it done effectively.
Features
- Ultra-low Latency - 1080p@60FPS video with 30-60ms latency using H.264 encoding. Smooth mouse and keyboard interaction for responsive remote control.
- Free & Optional Remote Access - Remote management via JetKVM Cloud using WebRTC.
- Open-source software - Written in Golang on Linux. Easily customizable through SSH access to the JetKVM device.
Contributing
We welcome contributions from the community! Whether it's improving the firmware, adding new features, or enhancing documentation, your input is valuable. We also have some rules and taboos here, so please read this page and our Code of Conduct carefully.
I need help
The best place to search for answers is our Documentation. If you can't find the answer there, check our Discord Server.
I want to report an issue
If you've found an issue and want to report it, please check our Issues page. Make sure the description contains information about the firmware version you're using, your platform, and a clear explanation of the steps to reproduce the issue.
Development
JetKVM is written in Go & TypeScript. with some bits and pieces written in C. An intermediate level of Go & TypeScript knowledge is recommended for comfortable programming.
The project contains two main parts, the backend software that runs on the KVM device and the frontend software that is served by the KVM device, and also the cloud.
For comprehensive development information, including setup, testing, debugging, and contribution guidelines, see DEVELOPMENT.md.
For quick device development, use the ./dev_deploy.sh script. It will build the frontend and backend and deploy them to the local KVM device. Run ./dev_deploy.sh --help for more information.
Backend
The backend is written in Go and is responsible for the KVM device management, the cloud API and the cloud web.
Frontend
The frontend is written in React and TypeScript and is served by the KVM device. It has three build targets: device, development and production. Development is used for development of the cloud version on your local machine, device is used for building the frontend for the KVM device and production is used for building the frontend for the cloud.