You are not logged in.
Pages: 1
Hello
So my question is,
I have an Avermedia GC573 capture card
The only driver that works for it on Linux is a modified version for the cl511hn. It was however tested on Ubuntu 20.04 lts and fedora 32
(I did previously figure out how to get it to build on a newer version of arch, but can not longer remember what I did)
So, would it be possible to make a distrobox based on one of those distros and install the driver, then have it work with my Flatpak OBS studio on my current Arch install?
It's the only thing I can think about at this point to make it work
Original links of the project
Original
https://forum.level1techs.com/t/avermed … nux/160635
https://github.com/derrod/lg4k-linux
Updated by someone else
https://github.com/derrod/lg4k-linux/pull/12
Last edited by Nulliferbones (2023-07-18 15:51:16)
Offline
No, docker does not replace the kernel and you're still on the host kernel and need to configure and compile an adjusted version of the module for the Arch kernel regardless.
Install an older kernel/an older LTS if need be on Arch and use that. e.g. https://aur.archlinux.org/packages/linux-lts515
Offline
Do you have a PKGBUILD or some other recipe for how you currently build the module? Also what are the current build failures?
Offline
So one of my viewers helped me get that driver functioning for the GC573 again.
Only issue is the audio, it's a loud garbled mess, something to do with Alsa, unsure what is causing it.
Offline
diff --git a/driver/utils/v4l2/framegrabber.c b/driver/utils/v4l2/framegrabber.c
index 653dff9..eb382a5 100644
--- a/driver/utils/v4l2/framegrabber.c
+++ b/driver/utils/v4l2/framegrabber.c
@@ -13,7 +13,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " "%s, %d: " fmt, __func__, __LINE__
#include "typedef.h"
-#include <stdarg.h>
+#include <linux/stdarg.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <media/v4l2-device.h>Then you can delete stdarg.h which is causing duplicate definitions. I suspect the related kernel change is https://github.com/torvalds/linux/commi … df3cb74ab6
Offline
diff --git a/driver/utils/v4l2/framegrabber.c b/driver/utils/v4l2/framegrabber.c index 653dff9..eb382a5 100644 --- a/driver/utils/v4l2/framegrabber.c +++ b/driver/utils/v4l2/framegrabber.c @@ -13,7 +13,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " "%s, %d: " fmt, __func__, __LINE__ #include "typedef.h" -#include <stdarg.h> +#include <linux/stdarg.h> #include <linux/kernel.h> #include <linux/slab.h> #include <media/v4l2-device.h>Then you can delete stdarg.h which is causing duplicate definitions. I suspect the related kernel change is https://github.com/torvalds/linux/commi … df3cb74ab6
Do you mean I should use the one you linked now?
stdarg.h was required to be added to the folder for make all to work
Offline
Apply the git diff I provided, check it still builds, drop the stdarg.h you added, check it still builds. If you want it to be backwards compatible you would want to replace the diff I provided with one using an ifdef block testing the kernel version.
Offline
Apply the git diff I provided, check it still builds, drop the stdarg.h you added, check it still builds. If you want it to be backwards compatible you would want to replace the diff I provided with one using an ifdef block testing the kernel version.
sorry can you tell me which file it is that i need to edit? the guy who helped me must be busy
Offline
I uploaded the patch to a pastebin so you can use the following
$curl -o linux-stdarg.patch http://ix.io/4Bcl # Download the patch
$ git apply -v linux-stdarg.patchCheck it builds here
$ git rm driver/include/stdarg.hCheck it still builds again.
The diff itself contains the file that is being modified
diff --git a/driver/utils/v4l2/framegrabber.c b/driver/utils/v4l2/framegrabber.cMeaning driver/utils/v4l2/framegrabber.c
Offline
I uploaded the patch to a pastebin so you can use the following
$curl -o linux-stdarg.patch http://ix.io/4Bcl # Download the patch $ git apply -v linux-stdarg.patchCheck it builds here
$ git rm driver/include/stdarg.hCheck it still builds again.
The diff itself contains the file that is being modified
diff --git a/driver/utils/v4l2/framegrabber.c b/driver/utils/v4l2/framegrabber.cMeaning driver/utils/v4l2/framegrabber.c
both steps worked correctly
Offline
I tried adding refresh rate 59.94 and 29.97 but can't seem to find out the format that it wants me to write it out in.
i tried [REFRESHRATE_59.94]=59.94,
[REFRESHRATE_59,94]=59.94,
both came back with an error like
/home/nullifer/lg4k-linux/driver/utils/v4l2/framegrabber.c:201:6: error: ‘REFRESHRATE_59’ undeclared here (not in a function); did you mean ‘REFRESHRATE_50’?
201 | [REFRESHRATE_59.94]=59.94,
| ^~~~~~~~~~~~~~
| REFRESHRATE_50
/home/nullifer/lg4k-linux/driver/utils/v4l2/framegrabber.c:201:20: error: expected ‘]’ before numeric constant
201 | [REFRESHRATE_59.94]=59.94,
| ^~~
| ]i've also been having this crash since installing the OBS flatpak, i removed it completely but the crash continues. this is a crash on the whole system - i used journalctl "since 20 min ago" the crash only happens while actually stream, after about 20mins to an hour
Jul 22 15:59:51 archlinux kernel: BUG: scheduling while atomic: kworker/5:2/13126/0x00000002
Jul 22 15:59:51 archlinux kernel: Modules linked in: snd_seq_dummy snd_seq_midi snd_hrtimer snd_seq_midi_event snd_seq rfkill pkcs8_key_parser nvidia_drm(POE) nvidia_uvm(POE) nvidia_modeset(POE) nvidia(POE) i>
Jul 22 15:59:51 archlinux kernel: xhci_pci_renesas
Jul 22 15:59:51 archlinux kernel: CPU: 5 PID: 13126 Comm: kworker/5:2 Tainted: P W OE 6.4.4-arch1-1 #1 655744e6f70dbd2f57b072f7158d7c5b4468b4ff
Jul 22 15:59:51 archlinux kernel: Hardware name: Micro-Star International Co., Ltd. MS-7A34/B350 TOMAHAWK (MS-7A34), BIOS 1.Q8 05/17/2023
Jul 22 15:59:51 archlinux kernel: Workqueue: gc573 sys_work_func [gc573]
Jul 22 15:59:51 archlinux kernel: Call Trace:
Jul 22 15:59:51 archlinux kernel: <TASK>
Jul 22 15:59:51 archlinux kernel: dump_stack_lvl+0x47/0x60
Jul 22 15:59:51 archlinux kernel: __schedule_bug+0x56/0x70
Jul 22 15:59:51 archlinux kernel: __schedule+0x104a/0x1410
Jul 22 15:59:51 archlinux kernel: ? vscnprintf+0x12/0x30
Jul 22 15:59:51 archlinux kernel: ? desc_read_finalized_seq+0x37/0xa0
Jul 22 15:59:51 archlinux kernel: ? _prb_read_valid+0x27a/0x2f0
Jul 22 15:59:51 archlinux kernel: schedule+0x5e/0xd0
Jul 22 15:59:51 archlinux kernel: schedule_timeout+0x151/0x160
Jul 22 15:59:51 archlinux kernel: __down_common+0x11a/0x230
Jul 22 15:59:51 archlinux kernel: down+0x47/0x60
Jul 22 15:59:51 archlinux kernel: aver_xilinx_I2CRead+0x122/0x1e0 [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: i2c_model_read+0x65/0x90 [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: hdmirxrd+0x3f/0x59 [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: hdmirxset+0x2a/0x61 [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: ? __switch_to_asm+0x3e/0x80
Jul 22 15:59:51 archlinux kernel: chgbank+0x41/0x44 [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: iTE6805_hdmirx_common_irq_for_HPD+0x266/0x473 [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: ite68051_task+0xed/0x114 [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: sys_work_func+0x38/0xc0 [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: process_one_work+0x1c7/0x3d0
Jul 22 15:59:51 archlinux kernel: worker_thread+0x51/0x390
Jul 22 15:59:51 archlinux kernel: ? __pfx_worker_thread+0x10/0x10
Jul 22 15:59:51 archlinux kernel: kthread+0xe8/0x120
Jul 22 15:59:51 archlinux kernel: ? __pfx_kthread+0x10/0x10
Jul 22 15:59:51 archlinux kernel: ret_from_fork+0x2c/0x50
Jul 22 15:59:51 archlinux kernel: </TASK>
Jul 22 15:59:51 archlinux kernel: BUG: workqueue leaked lock or atomic: kworker/5:2/0x7fffffff/13126
last function: sys_work_func [gc573]
Jul 22 15:59:51 archlinux kernel: CPU: 5 PID: 13126 Comm: kworker/5:2 Tainted: P W OE 6.4.4-arch1-1 #1 655744e6f70dbd2f57b072f7158d7c5b4468b4ff
Jul 22 15:59:51 archlinux kernel: Hardware name: Micro-Star International Co., Ltd. MS-7A34/B350 TOMAHAWK (MS-7A34), BIOS 1.Q8 05/17/2023
Jul 22 15:59:51 archlinux kernel: Workqueue: gc573 sys_work_func [gc573]
Jul 22 15:59:51 archlinux kernel: Call Trace:
Jul 22 15:59:51 archlinux kernel: <TASK>
Jul 22 15:59:51 archlinux kernel: dump_stack_lvl+0x47/0x60
Jul 22 15:59:51 archlinux kernel: process_one_work+0x32a/0x3d0
Jul 22 15:59:51 archlinux kernel: worker_thread+0x51/0x390
Jul 22 15:59:51 archlinux kernel: ? __pfx_worker_thread+0x10/0x10
Jul 22 15:59:51 archlinux kernel: kthread+0xe8/0x120
Jul 22 15:59:51 archlinux kernel: ? __pfx_kthread+0x10/0x10
Jul 22 15:59:51 archlinux kernel: ret_from_fork+0x2c/0x50
Jul 22 15:59:51 archlinux kernel: </TASK>
Jul 22 15:59:51 archlinux kernel: BUG: scheduling while atomic: kworker/5:2/13126/0x00000000
Jul 22 15:59:51 archlinux kernel: Modules linked in: snd_seq_dummy snd_seq_midi snd_hrtimer snd_seq_midi_event snd_seq rfkill pkcs8_key_parser nvidia_drm(POE) nvidia_uvm(POE) nvidia_modeset(POE) nvidia(POE) i>
Jul 22 15:59:51 archlinux kernel: xhci_pci_renesas
Jul 22 15:59:51 archlinux kernel: CPU: 5 PID: 13126 Comm: kworker/5:2 Tainted: P W OE 6.4.4-arch1-1 #1 655744e6f70dbd2f57b072f7158d7c5b4468b4ff
Jul 22 15:59:51 archlinux kernel: Hardware name: Micro-Star International Co., Ltd. MS-7A34/B350 TOMAHAWK (MS-7A34), BIOS 1.Q8 05/17/2023
Jul 22 15:59:51 archlinux kernel: Workqueue: 0x0 (gc573)
Jul 22 15:59:51 archlinux kernel: Call Trace:
Jul 22 15:59:51 archlinux kernel: <TASK>
Jul 22 15:59:51 archlinux kernel: dump_stack_lvl+0x47/0x60
Jul 22 15:59:51 archlinux kernel: __schedule_bug+0x56/0x70
Jul 22 15:59:51 archlinux kernel: __schedule+0x104a/0x1410
Jul 22 15:59:51 archlinux kernel: ? ret_from_fork+0x2c/0x50
Jul 22 15:59:51 archlinux kernel: ? dump_stack_lvl+0x4c/0x60
Jul 22 15:59:51 archlinux kernel: schedule+0x5e/0xd0
Jul 22 15:59:51 archlinux kernel: worker_thread+0xb3/0x390
Jul 22 15:59:51 archlinux kernel: ? __pfx_worker_thread+0x10/0x10
Jul 22 15:59:51 archlinux kernel: kthread+0xe8/0x120
Jul 22 15:59:51 archlinux kernel: ? __pfx_kthread+0x10/0x10
Jul 22 15:59:51 archlinux kernel: ret_from_fork+0x2c/0x50
Jul 22 15:59:51 archlinux kernel: </TASK>
Jul 22 15:59:51 archlinux kernel: BUG: scheduling while atomic: kworker/5:2/13126/0x00000002
Jul 22 15:59:51 archlinux kernel: Modules linked in: snd_seq_dummy snd_seq_midi snd_hrtimer snd_seq_midi_event snd_seq rfkill pkcs8_key_parser nvidia_drm(POE) nvidia_uvm(POE) nvidia_modeset(POE) nvidia(POE) i>
Jul 22 15:59:51 archlinux kernel: xhci_pci_renesas
Jul 22 15:59:51 archlinux kernel: CPU: 5 PID: 13126 Comm: kworker/5:2 Tainted: P W OE 6.4.4-arch1-1 #1 655744e6f70dbd2f57b072f7158d7c5b4468b4ff
Jul 22 15:59:51 archlinux kernel: Hardware name: Micro-Star International Co., Ltd. MS-7A34/B350 TOMAHAWK (MS-7A34), BIOS 1.Q8 05/17/2023
Jul 22 15:59:51 archlinux kernel: Workqueue: gc573 sys_work_func [gc573]
Jul 22 15:59:51 archlinux kernel: Call Trace:
Jul 22 15:59:51 archlinux kernel: <TASK>
Jul 22 15:59:51 archlinux kernel: dump_stack_lvl+0x47/0x60
Jul 22 15:59:51 archlinux kernel: __schedule_bug+0x56/0x70
Jul 22 15:59:51 archlinux kernel: __schedule+0x104a/0x1410
Jul 22 15:59:51 archlinux kernel: ? _prb_read_valid+0x27a/0x2f0
Jul 22 15:59:51 archlinux kernel: schedule+0x5e/0xd0
Jul 22 15:59:51 archlinux kernel: schedule_timeout+0x151/0x160
Jul 22 15:59:51 archlinux kernel: __down_common+0x11a/0x230
Jul 22 15:59:51 archlinux kernel: down+0x47/0x60
Jul 22 15:59:51 archlinux kernel: aver_xilinx_I2CRead+0x122/0x1e0 [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: i2c_model_read+0x65/0x90 [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: i2c_read_byte+0x4e/0x55 [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: iTE_I2C_ReadByte+0x45/0x5f [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: hdmi2_irq+0x2a/0x9e [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: ite6664_task+0x9f/0xec [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: sys_work_func+0x38/0xc0 [gc573 2207adf0861ac2f6a3ea20ecab311001a0987c41]
Jul 22 15:59:51 archlinux kernel: process_one_work+0x1c7/0x3d0
Jul 22 15:59:51 archlinux kernel: worker_thread+0x51/0x390
Jul 22 15:59:51 archlinux kernel: ? __pfx_worker_thread+0x10/0x10
Jul 22 15:59:51 archlinux kernel: kthread+0xe8/0x120
Jul 22 15:59:51 archlinux kernel: ? __pfx_kthread+0x10/0x10
Jul 22 15:59:51 archlinux kernel: ret_from_fork+0x2c/0x50
Jul 22 15:59:51 archlinux kernel: </TASK>
Jul 22 15:59:51 archlinux kernel: BUG: workqueue leaked lock or atomic: kworker/5:2/0x7fffffff/13126
last function: sys_work_func [gc573]Last edited by Nulliferbones (2023-07-22 14:24:48)
Offline
update crashed while just running in background while not live
Jul 22 16:48:52 archlinux kernel: CPU: 7 PID: 351 Comm: kworker/7:2 Tainted: P W OE 6.4.4-arch1-1 #1 655744e6f70dbd2f57b072f7158d7c5b4468b4ff
Jul 22 16:48:52 archlinux kernel: Hardware name: Micro-Star International Co., Ltd. MS-7A34/B350 TOMAHAWK (MS-7A34), BIOS 1.Q8 05/17/2023
Jul 22 16:48:52 archlinux kernel: Workqueue: gc573 sys_work_func [gc573]
Jul 22 16:48:52 archlinux kernel: Call Trace:
Jul 22 16:48:52 archlinux kernel: <TASK>
Jul 22 16:48:52 archlinux kernel: dump_stack_lvl+0x47/0x60
Jul 22 16:48:52 archlinux kernel: process_one_work+0x32a/0x3d0
Jul 22 16:48:52 archlinux kernel: worker_thread+0x51/0x390
Jul 22 16:48:52 archlinux kernel: ? __pfx_worker_thread+0x10/0x10
Jul 22 16:48:52 archlinux kernel: kthread+0xe8/0x120
Jul 22 16:48:52 archlinux kernel: ? __pfx_kthread+0x10/0x10
Jul 22 16:48:52 archlinux kernel: ret_from_fork+0x2c/0x50
Jul 22 16:48:52 archlinux kernel: </TASK>
Jul 22 16:48:52 archlinux kernel: BUG: scheduling while atomic: kworker/7:2/351/0x00000000
Jul 22 16:48:52 archlinux kernel: Modules linked in: snd_seq_midi snd_seq_dummy snd_seq_midi_event snd_hrtimer snd_seq rfkill nvidia_drm(POE) pkcs8_key_parser joydev mousedev nvidia_modeset(POE) nvidia_uvm(PO>
Jul 22 16:48:52 archlinux kernel: sr_mod cdrom
Jul 22 16:48:52 archlinux kernel: CPU: 7 PID: 351 Comm: kworker/7:2 Tainted: P W OE 6.4.4-arch1-1 #1 655744e6f70dbd2f57b072f7158d7c5b4468b4ff
Jul 22 16:48:52 archlinux kernel: Hardware name: Micro-Star International Co., Ltd. MS-7A34/B350 TOMAHAWK (MS-7A34), BIOS 1.Q8 05/17/2023
Jul 22 16:48:52 archlinux kernel: Workqueue: 0x0 (gc573)
Jul 22 16:48:52 archlinux kernel: Call Trace:
Jul 22 16:48:52 archlinux kernel: <TASK>
Jul 22 16:48:52 archlinux kernel: dump_stack_lvl+0x47/0x60
Jul 22 16:48:52 archlinux kernel: __schedule_bug+0x56/0x70
Jul 22 16:48:52 archlinux kernel: __schedule+0x104a/0x1410
Jul 22 16:48:52 archlinux kernel: ? ret_from_fork+0x2c/0x50
Jul 22 16:48:52 archlinux kernel: ? dump_stack_lvl+0x4c/0x60
Jul 22 16:48:52 archlinux kernel: schedule+0x5e/0xd0
Jul 22 16:48:52 archlinux kernel: worker_thread+0xb3/0x390
Jul 22 16:48:52 archlinux kernel: ? __pfx_worker_thread+0x10/0x10
Jul 22 16:48:52 archlinux kernel: kthread+0xe8/0x120
Jul 22 16:48:52 archlinux kernel: ? __pfx_kthread+0x10/0x10
Jul 22 16:48:52 archlinux kernel: ret_from_fork+0x2c/0x50
Jul 22 16:48:52 archlinux kernel: </TASK>
Jul 22 16:48:52 archlinux kernel: BUG: scheduling while atomic: kworker/7:2/351/0x00000002
Jul 22 16:48:52 archlinux kernel: Modules linked in: snd_seq_midi snd_seq_dummy snd_seq_midi_event snd_hrtimer snd_seq rfkill nvidia_drm(POE) pkcs8_key_parser joydev mousedev nvidia_modeset(POE) nvidia_uvm(PO>
Jul 22 16:48:52 archlinux kernel: sr_mod cdrom
Jul 22 16:48:52 archlinux kernel: CPU: 7 PID: 351 Comm: kworker/7:2 Tainted: P W OE 6.4.4-arch1-1 #1 655744e6f70dbd2f57b072f7158d7c5b4468b4ff
Jul 22 16:48:52 archlinux kernel: Hardware name: Micro-Star International Co., Ltd. MS-7A34/B350 TOMAHAWK (MS-7A34), BIOS 1.Q8 05/17/2023
Jul 22 16:48:52 archlinux kernel: Workqueue: gc573 sys_work_func [gc573]
Jul 22 16:48:52 archlinux kernel: Call Trace:
Jul 22 16:48:52 archlinux kernel: <TASK>Offline
static const int framegrabber_support_refreshrate[]= {
[REFRESHRATE_15]=15,
[REFRESHRATE_24]=24,
[REFRESHRATE_25]=25,
[REFRESHRATE_30]=30,
[REFRESHRATE_50]=50,
[REFRESHRATE_60]=60,
[REFRESHRATE_100]=100,
[REFRESHRATE_120]=120,
[REFRESHRATE_144]=144,
[REFRESHRATE_240]=240,
};You are trying to add a float into an array of integers even if the constant was defined in framegrabber_refreshrate_e and framegrabber_frameinterval_mask_e in framegrabber.h you would need to change all the code that expects integers to handle floats and then convert it back to integers when passing nominator and denominator to v4l.
No idea on the OBS crash.
Last edited by loqs (2023-07-22 15:42:35)
Offline
Ok i'm guessing it's not even related to OBS being open at all. I just hardlocked during normal usage
Offline
Found a patch for hyprland on Nvidia. Will see if it fixes the issue
Offline
Pushed this to GitHub
https://github.com/NulliferBones/lg4k-linux
Thank you again for your help btw.
Now I need to figure out why my system is crashing.
Last edited by Nulliferbones (2023-07-22 17:46:21)
Offline
Pages: 1