Skip to content

Saddytech/elgato4k60sp-linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elgato4k60sp-linux

Unofficial Linux kernel driver for the Elgato Game Capture 4K60 S+

A V4L2 kernel module that enables the Elgato 4K60 S+ (USB 0fd9:0068) on Linux. This device has no official Linux support — this driver was built from scratch by reverse-engineering the proprietary USB protocol.

⚠️ Disclaimer: This is an unofficial, community-developed driver. It is not affiliated with, endorsed by, or supported by Elgato/Corsair. Use at your own risk.

Features

  • Kernel V4L2 driver — registers /dev/videoX, works with any V4L2 application
  • H.264 capture — 1920×1080 @ 60fps, hardware-encoded H.264 High profile
  • Works with ffplay/ffmpeg/mpv — direct H.264 V4L2 capture
  • Works with OBS, Cheese, Discord, Zoom — via v4l2loopback bridge
  • Userspace fallbacklive_preview.py for quick testing without the kernel module

Supported Device

Device USB ID Status
Elgato Game Capture 4K60 S+ 0fd9:0068 ✅ Working

Requirements

  • Linux kernel 5.15+ (tested on 6.18)
  • Kernel headers for your running kernel
  • ffmpeg (for the v4l2loopback bridge and direct capture)
  • v4l2loopback-dkms (for app compatibility — OBS, Cheese, Discord, etc.)
  • python3 + pyusb (only for the userspace fallback script)

Installation

1. Install dependencies

# Arch / EndeavourOS / Manjaro
sudo pacman -S linux-headers v4l2loopback-dkms ffmpeg v4l-utils

# Ubuntu / Debian
sudo apt install linux-headers-$(uname -r) v4l2loopback-dkms ffmpeg v4l-utils

# Fedora
sudo dnf install kernel-devel v4l2loopback ffmpeg v4l-utils

2. Build the kernel module

git clone https://github.com/Saddytech/elgato4k60sp-linux.git
cd elgato4k60sp-linux
make -C kernel

3. Load the driver

sudo insmod kernel/elgato_4k60sp.ko

You should see /dev/video0 appear (or the next available number). Check with:

v4l2-ctl --list-devices

4. Test the capture

# Record 5 seconds to a file
sudo v4l2-ctl -d /dev/video0 --stream-mmap --stream-count=300 --stream-to=test.h264

# Verify the file
ffprobe test.h264

# Live playback (from a graphical terminal)
sudo ffplay -fflags nobuffer -flags low_delay -framedrop -f v4l2 -input_format h264 -i /dev/video0

Using with OBS, Cheese, Discord, etc.

Most applications expect raw video (YUYV/NV12), not H.264. The v4l2loopback bridge decodes H.264 into raw video for universal app compatibility.

Start the bridge

sudo ./elgato_bridge.sh start

This creates /dev/video1 named "Elgato 4K60 S+" that any app can use:

  • OBS: Add "Video Capture Device (V4L2)" → select "Elgato 4K60 S+"
  • Cheese: Opens automatically
  • Discord/Zoom: Select "Elgato 4K60 S+" as camera

Stop the bridge

sudo ./elgato_bridge.sh stop

Architecture

┌─────────────────┐
│  HDMI Source     │
│  (Console/PC)   │
└───────┬─────────┘
        │ HDMI
┌───────▼─────────┐
│  Elgato 4K60 S+ │  Hardware H.264 encoder
│  (USB 0fd9:0068)│
└───────┬─────────┘
        │ USB 3.0 Bulk (proprietary block protocol)
┌───────▼─────────┐
│  elgato_4k60sp  │  Kernel driver
│  /dev/video0    │  V4L2_PIX_FMT_H264
└───────┬─────────┘
        │
   ┌────┴──────────────────┐
   │                       │
   ▼                       ▼
┌────────┐   ┌──────────────────────┐
│ ffplay │   │ elgato_bridge.sh     │
│ ffmpeg │   │ (ffmpeg → v4l2loopback)│
│ (direct)│  └──────────┬───────────┘
└────────┘              │ raw yuv420p
               ┌────────▼───────────┐
               │ /dev/video1        │
               │ "Elgato 4K60 S+"   │
               └────────┬───────────┘
                        │
              ┌─────────┼──────────┐
              ▼         ▼          ▼
            OBS     Cheese    Discord/Zoom

Persistence (Survive Reboots)

Auto-load the kernel module

# Copy to kernel module directory
sudo mkdir -p /lib/modules/$(uname -r)/extra
sudo cp kernel/elgato_4k60sp.ko /lib/modules/$(uname -r)/extra/
sudo depmod -a

# Load at boot
echo "elgato_4k60sp" | sudo tee /etc/modules-load.d/elgato_4k60sp.conf

# Load v4l2loopback at boot
echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf
echo 'options v4l2loopback video_nr=1 card_label="Elgato 4K60 S+" exclusive_caps=1' | \
    sudo tee /etc/modprobe.d/v4l2loopback.conf

Auto-start the bridge (systemd)

sudo cp elgato-bridge.service /etc/systemd/system/
sudo systemctl enable --now elgato-bridge

Userspace Fallback

If you don't want to use the kernel module, live_preview.py streams directly using pyusb:

pip install pyusb
sudo python3 live_preview.py

This opens an ffplay window with live video. Useful for testing without building the kernel module.

Troubleshooting

Device not found after loading module

Check if the device is connected and recognized:

lsusb -d 0fd9:0068

URBs fail with -71 (EPROTO)

The xHCI endpoint state may be corrupted. Reset the USB device:

# Find device path
ls /sys/bus/usb/devices/ | grep -E "^[0-9]+-[0-9]+"
# Reset (adjust path for your system)
echo 0 | sudo tee /sys/bus/usb/devices/6-1/authorized
sleep 1
echo 1 | sudo tee /sys/bus/usb/devices/6-1/authorized

Black screen in OBS (direct H.264 source)

Use the v4l2loopback bridge instead — see "Using with OBS" above.

Module needs rebuilding after kernel update

Rebuild the module against the new kernel headers:

make -C kernel clean
make -C kernel
sudo insmod kernel/elgato_4k60sp.ko

Consider using DKMS for automatic rebuilds on kernel updates.

Files

File Description
kernel/elgato_4k60sp.c V4L2 kernel driver (~870 lines)
kernel/Makefile Kernel module build system
elgato_bridge.sh v4l2loopback bridge script (H.264 → raw YUV)
elgato-bridge.service systemd service for auto-starting the bridge
live_preview.py Userspace streaming fallback (pyusb + ffplay)
docs/DEVELOPMENT_LOG.md Detailed development report with all problems and fixes

License

GPL-2.0 — see LICENSE

Acknowledgments

  • Protocol reverse-engineered from USB packet captures of the Windows driver
  • Built with the Linux V4L2 and USB subsystem APIs
  • v4l2loopback by @umlaeute

About

Unofficial Linux kernel driver for the Elgato Game Capture 4K60 S+

Resources

License

Stars

Watchers

Forks

Contributors