JetKVM - Control any computer remotely
kvm
Go to file
Alex P 236291a454 Fix: eliminate audio warping by auto-adapting to actual device sample rate
Root cause: ALSA was silently using a different sample rate than configured,
causing severe pitch/speed distortion (the "cassette player" warping effect).

The bug occurred when:
- User configured 48 kHz in UI
- HDMI source output 44.1 kHz audio
- set_rate() failed, set_rate_near() chose 44.1 kHz
- Code never checked what rate was actually set
- Opus encoder created for 48 kHz but received 44.1 kHz audio
- Result: ~9% pitch shift and timing mismatch

Fix:
- Always use set_rate_near() and check the actual rate returned
- Pass detected rate and frame size to Opus encoder/decoder creation
- Avoid modifying global state to prevent capture/playback interference
- Recalculate frame_size for 20ms at the actual rate
- Verify rate after hw_params application
- Add detailed logging for rate adaptation

This ensures Opus encoder/decoder use the correct rate matching the hardware,
regardless of what the HDMI source outputs.
2025-11-18 00:53:15 +02:00
.devcontainer Merge branch 'dev' into feat/audio-support 2025-10-30 22:27:30 +02:00
.github build(deps): bump actions/setup-node from 5 to 6 (#921) 2025-11-02 14:25:20 +01:00
.vscode feat: add remote IP address to connection stats sidebar (#944) 2025-11-11 12:00:37 +01:00
bin Release 202412292127 2024-12-29 21:27:42 +01:00
cmd feat: failsafe mode (#952) 2025-11-11 13:13:42 +01:00
internal Fix: eliminate audio warping by auto-adapting to actual device sample rate 2025-11-18 00:53:15 +02:00
pkg feat: add remote IP address to connection stats sidebar (#944) 2025-11-11 12:00:37 +01:00
resource Refactor: Simplify / rewrite Audio 2025-10-06 21:59:44 +03:00
scripts feat: add audio dependencies to Docker build context 2025-11-03 13:54:11 +01:00
ui Fix: improve EDID compatibility and add audio configuration options 2025-11-18 00:53:15 +02:00
.gitignore Merge dev into feat/audio-support 2025-10-23 23:11:17 +03:00
.golangci.yml chore: revert golangci-lint config and remove audio stub 2025-10-24 01:31:06 +03:00
CODE_OF_CONDUCT.md Release 202412292127 2024-12-29 21:27:42 +01:00
DEVELOPMENT.md Localize the client/browser UI with inlang paraglide-js (#864) 2025-10-23 14:27:29 +02:00
Dockerfile.build [WIP] Updates: update build flows to work with the CGO jetkvm_native 2025-10-01 10:04:42 +03:00
LICENSE Release 202412292127 2024-12-29 21:27:42 +01:00
Makefile Updates: add logging on error, revert Makefile lint targets 2025-11-11 11:25:49 +02:00
README.md Refactor: Simplify / rewrite Audio 2025-10-06 21:59:44 +03:00
audio.go Fix: improve EDID compatibility and add audio configuration options 2025-11-18 00:53:15 +02:00
block_device.go chore/Deprecate browser mount (#752) 2025-08-28 23:46:55 +02:00
block_device_linux.go network enhanecment / refactor (#361) 2025-04-16 01:39:23 +02:00
block_device_notlinux.go network enhanecment / refactor (#361) 2025-04-16 01:39:23 +02:00
cloud.go feat: refactoring network stack (#878) 2025-10-15 18:32:58 +02:00
config.go Fix: improve EDID compatibility and add audio configuration options 2025-11-18 00:53:15 +02:00
dc_metrics.go feat(metrics): adding prometheus metrics for dc power extension (#556) 2025-07-11 17:04:41 +02:00
dev_deploy.sh feat: jetkvm native in cGo 2025-09-29 14:09:30 +02:00
display.go bug: fix null pointer in wakeDisplay (#907) 2025-10-28 18:48:30 +01:00
failsafe.go feat: failsafe mode (#952) 2025-11-11 13:13:42 +01:00
go.mod build(deps): bump github.com/prometheus/common from 0.66.1 to 0.67.2 (#932) 2025-11-02 14:29:20 +01:00
go.sum build(deps): bump github.com/prometheus/common from 0.66.1 to 0.67.2 (#932) 2025-11-02 14:29:20 +01:00
hidrpc.go feat: release keyPress automatically (#796) 2025-09-18 13:35:47 +02:00
hw.go Localize the client/browser UI with inlang paraglide-js (#864) 2025-10-23 14:27:29 +02:00
jiggler.go fix/Jiggler settings not saving (#786) 2025-09-09 14:48:49 +02:00
jsonrpc.go Fix: improve EDID compatibility and add audio configuration options 2025-11-18 00:53:15 +02:00
log.go feat: failsafe mode (#952) 2025-11-11 13:13:42 +01:00
main.go Merge branch 'dev' into feat/audio-support 2025-11-11 21:40:29 +02:00
mdns.go feat: refactoring network stack (#878) 2025-10-15 18:32:58 +02:00
native.go feat: failsafe mode (#952) 2025-11-11 13:13:42 +01:00
network.go feat: add remote IP address to connection stats sidebar (#944) 2025-11-11 12:00:37 +01:00
ota.go Improves OTA update reporting and process (#838) 2025-10-29 23:10:23 +01:00
prometheus.go Refactor: Simplify / rewrite Audio 2025-10-06 21:59:44 +03:00
publish_source.sh fix: Shell linting (#328) 2025-04-11 00:43:45 +02:00
serial.go [WIP] Cleanup: PR Cleanup 2025-09-20 01:38:16 +03:00
terminal.go [WIP] Updates: reduce PR complexity 2025-10-01 21:20:30 +03:00
timesync.go feat: refactoring network stack (#878) 2025-10-15 18:32:58 +02:00
usb.go Fix: reopen HID files on USB state transitions to prevent stale handles 2025-11-17 23:18:58 +02:00
usb_mass_storage.go chore/Deprecate browser mount (#752) 2025-08-28 23:46:55 +02:00
version.go feat: jetkvm native in cGo 2025-09-29 14:09:30 +02:00
video.go feat: failsafe mode (#952) 2025-11-11 13:13:42 +01:00
web.go chore: clean up logger messaging 2025-11-07 13:21:38 +01:00
web_tls.go fix: ensure certStore is initialised when adding custom cert (#639) 2025-06-30 18:58:39 +02:00
webrtc.go Merge branch 'dev' into feat/audio-support 2025-11-17 22:19:44 +02:00
wol.go Add ability to track modifier state on the device (#725) 2025-08-26 17:09:35 +02:00

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.