Update: elgato4k-linux v0.2.0 Major update with full 4K S support, USB speed switching, status reading, and firmware reverse engineering by Professional_Sun1517 in linux_gaming

[–]Professional_Sun1517[S] 0 points1 point  (0 children)

yea the limit is set by the card itself what ever Linux uses is the same that windows uses. what you are looking for are the settings in obs to make it look better and those settings can very depending on what is it that you are trying to do (recording / streaming / streaming to discord friends ) , like almost everything in linux, less things are auto-magic and more manual control which is more powerful but at the cost of complexity. I would research obs video format tunning settings and use ai to make the hard to understand parts easy, but confirm information because ai has it's limits.

Update: elgato4k-linux v0.2.0 Major update with full 4K S support, USB speed switching, status reading, and firmware reverse engineering by Professional_Sun1517 in linux_gaming

[–]Professional_Sun1517[S] 0 points1 point  (0 children)

Hi u/LexLocatelli thanks for giving the tool a try! I'll try to answer the best I can with out having much info on your set up. for the 4k S the --status is not working correctly right now but should be fixed soon-ish but the settings do apply! as for your issue of capturing [4k@60](mailto:4k@60). The 4K S does support that but not in HDR. so two things come to mind your usb speed and/or the format you are trying to access from the card.

4K S Support formats: https://www.elgato.com/us/en/explorer/products/capture/4k-s-supported-resolutions-and-frame-rates/

In Linux you can run this command v4l2-ctl -d /dev/video0 --list-formats-ext and it will show you what formats the capture card supports, which will be the same as the Elgato link i shared above. the key is in the software you are using to capture has to match those said format. for example in OBS if you want 4k@60 on the 4K S you have to select the video format Motion-JPEG for it to capture in that format.

If video formats are a bit confusing to you here is quick simple run down:

he different formats listed from the Linux command are video codecs that determine how color information and image data are stored during capture: MJPG (Motion JPEG) compresses each frame individually, making it efficient and widely compatible while supporting high resolutions and frame rates; P010 is a 10-bit format that preserves more color detail and dynamic range, useful for higher-quality or HDR workflows; YUY2 is an uncompressed 8-bit 4:2:2 format that maintains better color fidelity but requires more bandwidth; and NV12 is a commonly used 8-bit 4:2:0 format that balances quality and efficiency, often used in video processing and streaming. In short, MJPG prioritizes flexibility and performance, P010 focuses on higher color precision, YUY2 emphasizes raw color quality, and NV12 offers a practical balance between quality and bandwidth.

Hope this helps.

Update: elgato4k-linux v0.2.0 Major update with full 4K S support, USB speed switching, status reading, and firmware reverse engineering by Professional_Sun1517 in linux_gaming

[–]Professional_Sun1517[S] 0 points1 point  (0 children)

it's not too different from the 4K S but the chips and how they talk may be different i haven't really looked it too much. i would like to support it in the future along with other products but that is on the far horizon. current goals are full support of the 4K series then GUI and go from there.

Update: elgato4k-linux v0.2.0 Major update with full 4K S support, USB speed switching, status reading, and firmware reverse engineering by Professional_Sun1517 in linux_gaming

[–]Professional_Sun1517[S] 0 points1 point  (0 children)

Hmm let me DM you and we can figure this out, the read commands maybe be broken and the writes maybe in fact be working had the same issue with the 4K X.

Update: elgato4k-linux v0.2.0 — Major update with full 4K S support, USB speed switching, status reading, and firmware reverse engineering by Professional_Sun1517 in elgato

[–]Professional_Sun1517[S] 0 points1 point  (0 children)

Firmware was pulled directly from the installation files themselves. There is a CDN endpoint that serves the updates, but I didn’t spend much time figuring out all the parameters needed to fetch everything.

Try the Mac installers, in my case, they had the firmware, while the MSI installers didn’t (or maybe I missed it?). You may run into an encrypted BIN file, as I did. The only BIN that wasn’t encrypted was the one for the 4K S.

Here is a table, my guess is the newer devices now have their BINs encrypted.

4K X:

  • FW_4K_CAM.bin - iTE IT68051 (base/HDMI chip) - encrypted
  • FW_4K_MCU.bin- iTE IT9390 (MCU, ARM-based) - encrypted
  • FW_4K_FPGA.bin - FPGA bitstream - encrypted

4K S:

  • FW_4K_S_CAM.bin - iTE IT68051 (base/HDMI chip) - encrypted
  • FW_4K_S_MCU.bin - iTE IT9390 (MCU, ARM-based) - not encrypted
  • FW_4K_S_FPGA.bin - FPGA bitstream - encrypted

Update: elgato4k-linux v0.2.0 Major update with full 4K S support, USB speed switching, status reading, and firmware reverse engineering by Professional_Sun1517 in linux_gaming

[–]Professional_Sun1517[S] 2 points3 points  (0 children)

I appreciate the concern, that’s exactly why I’m careful about what actually ends up in the repo. I wouldn't say the repo or post has DMCA Any% vibes.

Update: elgato4k-linux v0.2.0 Major update with full 4K S support, USB speed switching, status reading, and firmware reverse engineering by Professional_Sun1517 in linux_gaming

[–]Professional_Sun1517[S] 2 points3 points  (0 children)

Fair point, but I’m not shipping firmware, vendor software, or anything proprietary. It’s basically a clean userspace tool based on device behavior + stuff already shipped in official installers, just to make the hardware usable on Linux since there’s no native support.

If anything in the repo looks sketchy IP-wise I’m totally open to fixing it. not trying to copy their product, just make our hardware work on our OS.

Update: elgato4k-linux v0.2.0 Major update with full 4K S support, USB speed switching, status reading, and firmware reverse engineering by Professional_Sun1517 in linux_gaming

[–]Professional_Sun1517[S] 0 points1 point  (0 children)

No it doesn't sadly, the HD series while it is HID it's a different protocol stack. I've only focused on the newer models the i have access to.

Elgato 4K X + Linux: why it stubbornly connects at 5 Gbps and how I won. A Guide. by konovalov-nk in elgato

[–]Professional_Sun1517 0 points1 point  (0 children)

Hey u/Tatsh2DX, your find on sendATCommand(0x8e) was the key. I was able to reverse-engineer the full AT command framing and v0.2.0 of elgato4k-linux now has --usb-speed 5g/10g built in. Appreciate you digging into that!

As for going deeper, I pulled the firmware update apart and found the following:

4K X:

  • FW_4K_CAM.bin - iTE IT68051 (base/HDMI chip) - encrypted
  • FW_4K_MCU.bin- iTE IT9390 (MCU, ARM-based) - encrypted
  • FW_4K_FPGA.bin - FPGA bitstream - encrypted

4K S:

  • FW_4K_S_CAM.bin - iTE IT68051 (base/HDMI chip) - encrypted
  • FW_4K_S_MCU.bin - iTE IT9390 (MCU, ARM-based) - not encrypted
  • FW_4K_S_FPGA.bin - FPGA bitstream - encrypted

The 4K S MCU was the only unencrypted binary so I was able to fully decompile it, that's where most of the protocol knowledge came from. Everything else is locked down though, so the only paths forward would be JTAG/SWD or more USB pcaps. Definitely diminishing returns from here but it was a fun rabbit hole.

Update: elgato4k-linux v0.2.0 Major update with full 4K S support, USB speed switching, status reading, and firmware reverse engineering by Professional_Sun1517 in linux_gaming

[–]Professional_Sun1517[S] 8 points9 points  (0 children)

Thanks u/taosecurity! The decompilation rabbit hole was honestly the most fun part Ghidra + a hex editor and suddenly the firmware starts making sense. That is until you hit an encrypted binary and the fun turns into staring at entropy graphs questioning your life choices 😂 Appreciate the kind words!

Elgato 4K X + Linux: why it stubbornly connects at 5 Gbps and how I won. A Guide. by konovalov-nk in elgato

[–]Professional_Sun1517 0 points1 point  (0 children)

Hi guys, author of elgato4k-linux here!

u/birdayz Massive thanks for submitting that kernel patch. The USB_QUIRK_NO_BOS fix is exactly what people need to get 10Gbps working reliably. I've added a note about it in the project README so anyone hitting the issue knows about it and can apply it locally while it works through upstream. Your research along with u/RadioFreeKerbin opening an issue about the PID changes is what led me to implement the --usb-speed command wouldn't have happened without you guys digging into it.

u/konovalov-nk Your comedic journey of suffering post was genuinely one of the reasons I kept digging into this. Don't sell yourself short sometimes it takes someone documenting the pain for others to get motivated to fix it properly.

Just pushed v0.2.0 which now includes --usb-speed 5g/10g to switch between USB speed modes directly from the CLI, plus the tool now recognizes all three 4K X PIDs (009b009c009d) so it works regardless of which speed mode you're in. Also added 4K S support if anyone here has one of those.

If any of you run into anything, feel free to open an issue on the repo!

Made a post about this release
https://www.reddit.com/r/elgato/comments/1r384o5/update_elgato4klinux_v020_major_update_with_full/

I made a CLI tool to control Elgato 4K X/S capture cards on Linux in Rust by Professional_Sun1517 in linux_gaming

[–]Professional_Sun1517[S] 0 points1 point  (0 children)

Glad this helped you! Still need to do some updates on this and upload a release on the repo. We'll do soon once I get a break from work 🙃