In a perfect world, our Enigma 2 boxes wiith OpenViX would never completely lock up (requiring a physical power cycle - no ping/ssh/web available), but sadly my ZGemma H7 has been quite susceptible to this. It typically requires a complete power cycle to get out of a lock up every 1-2 weeks regardless of the OpenViX stable version I'm on (yes, it just locked up on me with the latest 6.9.001 release).
It occurred to me that a hardware watchdog could at least auto-reboot the box if the machine hung for a specified number of seconds, allowing recordings to resume after the reboot, only losing a few minutes of recordings rather than days of them (I leave my box unattended for at least 5 days because I only set and view recordings at the weekend, which isn't an uncommon usage pattern IMHO). After poking at my H7, it sadly looks like hardware watchdog support hasn't been compiled into the OpenViX kernel and isn't available as a kernel module either.
So the first part of this feature request is to enable hardware watchdog timer support in the OpenViX kernel - I believe this would be CONFIG_WATCHDOG=y in the kernel config. However, for each SoC family supported by OpenViX, you will need to also enable the appropriate watchdog driver if it isn't already enabled. For example, my ZGemma H7 has a Broadcom 7251s CPU and I believe the watchdog driver is bcm7038_wdt (please double check this!), so you'd need CONFIG_BCM7038_WDT=y as well. You may need to tweak tne device tree too w.r.t. the compatible setting (it may need bcm7038_wdt adding).
I think the final component would be a thankfully generic userspace background daemon that's started on boot and resets the hardware watchdog countdown timer periodically (e.g. every 60 seconds), so if you get a machine hang, you will get an auto-reboot within 60 seconds. For the H7, I''ll point you to the bcm7038_wdt source file at https://codebrowser.dev/linux/linux/drivers/watchdog/bcm7038_wdt.c.html which has useful #defines for dealing with /dev/watchdog access.
It should be noted that I used to get lockups on another much older Zgemma device too (I forget the model, but it had a slow MIPS chip on it), so I think hardware watchdog timer support could benefit other Enigma 2 models as well. I know it might sound like a sticking plaster, but I've had a hardware watchdog timer save my bacon with Dell PowerEdge servers with OMSA configured to reboot on a kernel crash/hardware freeze, so if it's good enough for enterprise servers, it should be good enough for OpenViX surely?
In a perfect world, our Enigma 2 boxes wiith OpenViX would never completely lock up (requiring a physical power cycle - no ping/ssh/web available), but sadly my ZGemma H7 has been quite susceptible to this. It typically requires a complete power cycle to get out of a lock up every 1-2 weeks regardless of the OpenViX stable version I'm on (yes, it just locked up on me with the latest 6.9.001 release).
It occurred to me that a hardware watchdog could at least auto-reboot the box if the machine hung for a specified number of seconds, allowing recordings to resume after the reboot, only losing a few minutes of recordings rather than days of them (I leave my box unattended for at least 5 days because I only set and view recordings at the weekend, which isn't an uncommon usage pattern IMHO). After poking at my H7, it sadly looks like hardware watchdog support hasn't been compiled into the OpenViX kernel and isn't available as a kernel module either.
So the first part of this feature request is to enable hardware watchdog timer support in the OpenViX kernel - I believe this would be CONFIG_WATCHDOG=y in the kernel config. However, for each SoC family supported by OpenViX, you will need to also enable the appropriate watchdog driver if it isn't already enabled. For example, my ZGemma H7 has a Broadcom 7251s CPU and I believe the watchdog driver is bcm7038_wdt (please double check this!), so you'd need CONFIG_BCM7038_WDT=y as well. You may need to tweak tne device tree too w.r.t. the compatible setting (it may need bcm7038_wdt adding).
I think the final component would be a thankfully generic userspace background daemon that's started on boot and resets the hardware watchdog countdown timer periodically (e.g. every 60 seconds), so if you get a machine hang, you will get an auto-reboot within 60 seconds. For the H7, I''ll point you to the bcm7038_wdt source file at https://codebrowser.dev/linux/linux/drivers/watchdog/bcm7038_wdt.c.html which has useful #defines for dealing with /dev/watchdog access.
It should be noted that I used to get lockups on another much older Zgemma device too (I forget the model, but it had a slow MIPS chip on it), so I think hardware watchdog timer support could benefit other Enigma 2 models as well. I know it might sound like a sticking plaster, but I've had a hardware watchdog timer save my bacon with Dell PowerEdge servers with OMSA configured to reboot on a kernel crash/hardware freeze, so if it's good enough for enterprise servers, it should be good enough for OpenViX surely?