Adding support for kernel version >= 6.5.0#22
Conversation
|
Hey, were you able to test it? Because it seems not to work for me. I can see the device in OBS but it seems that there is no output |
|
Hi! |
|
Hi, |
|
I haven't looked at a 6.x kernel, because most of my time is spent with
RHEL kernels..... So I can't say for certain what you'll find.
I haven't worked on the project for a long time, so I don't recall what the
story is with HDR metadata (needed) and obtaining that from the underlying
hardware (of possible). I'd expect it to be available in the HDMI chip
register map by default.
Don't break back compat with earlier kernels please, otherwise you're
patches are welcome.
- Steve
…On Wed, Sep 17, 2025 at 12:53 PM Bassam ***@***.***> wrote:
*lightspeed3m* left a comment (stoth68000/sc0710#22)
<#22 (comment)>
Hi,
I am looking to spend time into this, is there anything I should be aware
of other than HDR10 and V4L2?
—
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEEERBC6RFG345MWGOPKM633TGG2HAVCNFSM6AAAAACGY5RYPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMBTHAZTEMRZGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Steven Toth - Kernel Labs
http://www.kernellabs.com
|
Thank you for your reply. I will keep in mind to account for the existing kernel calls. |
|
I'm unable to get this to build, at least on 6.16. |
|
@dusda On 6.17 I had to rename a few functions that had their names changed to get this compiled. Maybe if you do the same thing, it might work for you too? diff --git a/sc0710-video.c b/sc0710-video.c
index 3f79cae..ff6768a 100644
--- a/sc0710-video.c
+++ b/sc0710-video.c
@@ -495,7 +495,7 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i)
tm6200_capture_disconnect(chip->capture_pcm_substream);
#endif
- del_timer(&ch->timeout);
+ timer_delete(&ch->timeout);
sc0710_dma_channels_stop(dev);
@@ -823,7 +823,7 @@ static void sc0710_vid_timeout(unsigned long data)
#else
static void sc0710_vid_timeout(struct timer_list *t)
{
- struct sc0710_dma_channel *ch = from_timer(ch, t, timeout);
+ struct sc0710_dma_channel *ch = timer_container_of(ch, t, timeout);
#endif
struct sc0710_dev *dev = ch->dev;
struct sc0710_buffer *buf; |
Is it fully working with this? |
|
@VixiKitsune Honestly, I'm not sure? I was able to compile and load the module fine! (Since those two functions in my diff were just renames) But I had to manually specify what my card was in my And even after doing that, I haven't managed to get it to work! But according to my box, my 4k pro was made in 2024, which was after the last commit in this repo, so I'm not sure if there's something broken in the code, or if there was another hardware revision and I just got unlucky (I notice the "mk.2" in the output above, but I don't see any indication of a revision on either the card or my box; tl;dr - this all could be a "me" problem That all said, it you wanted to try it out yourself, the Makefile has the steps to load the module! (And some example ffmpeg commands to test with; which you can do while watching |
|
Hi @Archenoth |
|
The driver is for the Mk2. The Mk1 is a different chip. |
|
I've got it compiled, but haven't figured out how to view video from it. |
Have you make any progress? I would be interested in collaborating. |
using encoder0.mp4 |
Did you use hardware encoding? I'm finding the image randomly gets chopped up and rearranged sometimes though. didn't happen once on windows. output2.mp4 |
|
I’ve seen the card and driver vertically slice the frame, get slightly
confused so you see the bottom of the image at the top, and top starts part
way down. I think this is what you are referring to.
Technically a bug, it’s not detecting start of frame properly and
realigning the video frame before handing off to the application.
Importantly, I believe you and I listen/read all of the user comments.
…On Thu, Dec 11, 2025 at 00:35 VixiKitsune ***@***.***> wrote:
*VixiKitsune* left a comment (stoth68000/sc0710#22)
<#22 (comment)>
Hi! Yes, I was able to get it running. But as far as I know you're only
able to get it work with software like ffmpeg. In the Makefile are some
example commands to get an output. I think the driver is not including all
needed api's of v4l2. So that's why software like OBS cannot work with it.
Sadly I was only getting a very low framerate with ffmpeg. The driver
doesn't work for me as expected. Even after setting up a linux machine with
the official supported kernel version, I had the same results.
https://github.com/user-attachments/assets/069a6817-1379-4cc1-81c8-8b941425c435
Did you use hardware encoding?
I found with libx264 i get low framerates, but with hevc_vaapi I get 60fps
at 4k
I'm finding the image randomly gets chopped up and rearranged sometimes
though. didn't happen once on windows.
https://github.com/user-attachments/assets/7192c523-4c51-4577-8ef7-91e574fb0229
—
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEEERBA6Z7U6JEIOUC7FEMD4BD7DNAVCNFSM6AAAAACGY5RYPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMNBQGIZDOMJXGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
That's what I was experiencing.
I'm hopefully free next week to take a look at fixing it |
|
After tinkering I've managed to make 2 2min videos without the the video frame misalignment bug appearing. Might have also fixed the crashing along with it. I will need to test more to see if these issues are truly gone. I added a little bit of code for HDR support, but it still isn't working. I'll come back to HDR after I get it working with OBS. |
|
Wow! you all made a lot of progress while I am still struggling to get it working. What boards are you all using? Is it the same Mk.2? |
This driver is for the 4k60pro mk2 (and other cards with the same chip, presumably) |
Happy new year!! |
|
That would be great
ATM Ive been dealing with family issues and haven't made any more progress, but hopefully I'll get back to the 4K60 Mk2 next week
…-------- Original Message --------
On Saturday, 01/03/26 at 10:09 Bassam ***@***.***> wrote:
lightspeed3m left a comment [(stoth68000/sc0710#22)](#22 (comment))
>> Wow! you all made a lot of progress while I am still struggling to get it working. What boards are you all using? Is it the same Mk.2? Also, I have the 4k pro which I am trying to figure out how to include.
>
> This driver is for the 4k60pro mk2 (and other cards with the same chip, presumably) 4kpro is a newer card with a different chip, so it isn't compatible with this driver. I might get one in 2026 to have a go at releasing a driver for it.
Happy new year!!
I’d be glad to host mine remotely for driver development purposes before you buy one. Let me know if you prefer this approach and potentially work together on it.
—
Reply to this email directly, [view it on GitHub](#22 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AXNFN3QWF7ID3O6I4VEBMAD4E3NCHAVCNFSM6AAAAACGY5RYPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTOMBWGIZTANJSGM).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
I've made this in the last few days, and some of you guys might like it. I've rigorously tested it on Arch, Debian, and Fedora using their latest kernels (up to 6.18+). What I’ve done and why:
Moving Forward:I intend to maintain this hard fork for the foreseeable future to keep up with upcoming kernel changes. If you encounter any bugs or compatibility issues, please open an issue on my repository so I can address them directly: |
Thank you for your work!! It would also be great to include other cards such as the 4K Pro. While it is an entirely different chip than sc0710, I’d like to know if there are similarities between them as knowing this could potentially lead to less code changes required. What do you think? |
|
Nice work.
Push to have it merged into the mainline kernel and don't keep it out of
tree, otherwise you'll be maintaining it for life. Speaking from
experience; while out of tree sounds attractive today, it won't be tomorrow.
Dozens of my other drivers have been mainline in the kernel for 15+ years.
- Steve
…On Wed, Jan 7, 2026 at 3:25 PM Bassam ***@***.***> wrote:
*lightspeed3m* left a comment (stoth68000/sc0710#22)
<#22 (comment)>
I've made this in the last few days, and some of you guys might like it.
I've rigorously tested it on *Arch, Debian, and Fedora* using their
latest kernels (up to *6.18+*).
What I’ve done and why:
- *Full Modern Kernel Support:* Instead of just patching individual
errors, I've re-engineered the codebase to ensure seamless compilation on
bleeding-edge kernels, far beyond the 6.5.0/6.8.0 attempts here.
- *DKMS Integration:* I've added a fully automated DKMS lifecycle, so
the driver will automatically recompile and link against new kernel headers
during system updates. You won't have to manually patch it every time your
distro updates.
- *Multi-Client Architecture:* I've unlocked concurrent access,
meaning you can now have multiple applications (like OBS and Discord)
accessing the capture card simultaneously.
- *Signal Stability:* I implemented *Atomic Signal Restoration* and *Fail-Safe
Signal Generation (color bars)*. This prevents image tearing and keeps
the V4L2 buffer alive during signal loss, which stops applications like OBS
from crashing or desyncing.
- *Simplified Installation:* I've included a one-line install script
that handles all dependencies and compilation for you.
Moving Forward:
I intend to maintain this hard fork for the foreseeable future to keep up
with upcoming kernel changes. If you encounter any bugs or compatibility
issues, please *open an issue on my repository* so I can address them
directly:
*Repo:* https://github.com/Nakildias/sc0710
Thank you for your work!! It would also be great to include other cards
such as the 4K Pro. While it is an entirely different chip than sc0710, I’d
like to know if there are similarities between them as knowing this could
potentially lead us less code changes required. What do you think?
—
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEEERBA6EHJTCOJU4R3GIML4FVTTLAVCNFSM6AAAAACGY5RYPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTOMRQGY2DGMBWGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Steven Toth - Kernel Labs
http://www.kernellabs.com
|
Should be possible by making the driver check which card it is and read the corresponding hardware addresses. I think it would be cool to also include the HD60 pro (my brother has one I could see if he'll let me test) and 4K60 Pro mk1, for people with those cards. Some if functions would need to be added to the video format list for those two. Perhaps we should move discussion about hardware/feature support to Nakildias' repo where development is progressing. |
|
For anyone who’s stumbled upon this pull request and would like to continue the different cards discussion, I’ve opened a separate issue in @Nakildias' repo to keep the discussion going: Nakildias/sc0710#3 |


So I'm completely new to driver development and working with C. I added the old videobuf-api to this project. I was able to compile on kernel v6.5.0 and v6.8.0. I also had to make some adjustments to the timestamp conversion. Fortunately, there are some helper functions.
Compiling and adding the driver to the kernel works fine. When my Elgato card arrives, I can test whether it works.