7Ji / amlogic-s9xxx-archlinuxarm

ArchLinux ARM for Amlogic s9xxx tv box.
GNU General Public License v3.0
63 stars 9 forks source link

how to enable openvfd #21

Closed SajjadSabzkar closed 2 months ago

SajjadSabzkar commented 5 months ago

Hi , thanks for your amazing project , but how i can enable openvfd ? need to install extra package? or YAopenvfd installed by default?

7Ji commented 5 months ago

YAopenvfd installed by default?

Yes: https://github.com/7Ji/amlogic-s9xxx-archlinuxarm/blob/620c8c2993e4ea006bbec020fd11c25c7e92efb2/cross_nobuild.sh#L631

But that's only the userspace part. The kernel driver part only exists in the flippy kernel (default), but not 7ji kernel. Make sure you've not switched the kernel.

how i can enable openvfd?

For hk1 box that's very simple, just sudo systemctl enable --now YAopenvfD.service. The default config is for hk1 box, and sets up a very simple loop (10 seconds 24-hour clock, 10 seconds 12-hour clock, 3 seconds CPU load percent, 3 seconds temperature)

But if you want to either:

  1. Use it on other box, with different openvfd options, or
  2. Use it with a custom different loop

You'll need to modify /etc/conf.d/YAopenvfD

SajjadSabzkar commented 5 months ago

My device is X96Air .

But that's only the userspace part. The kernel driver part only exists in the flippy kernel (default), but not 7ji kernel. Make sure you've not switched the kernel.

How i can sure which kernel is installed? i run sudo YAopenvfD 0:temp:0 output is openvfd_prepare:98: Failed to open '/dev/openvfd' for I/O operation, errno: 2, error: No such file or directory

it's seems openvfd not installed yet, right?

7Ji commented 5 months ago

How i can sure which kernel is installed

uname -a

pacman -Qs linux-

7Ji commented 5 months ago

i run sudo YAopenvfD 0:temp:0 output is openvfd_prepare:98: Failed to open '/dev/openvfd' for I/O operation, errno: 2, error: No such file or directory

You can't just do that. YAopenvfD is a daemon that's meant to run in background forever. And the openvfd kernel module being loaded is one of the assumptions it expects to be already met. Therefore before it could run the module should be loaded with appropriate arguments. The YAopenvfD.service systemd unit does all these for you. Run systemctl start/stop/restart YAopenvfD and the module would be loaded/unloaded before/after YAopenvfD

7Ji commented 5 months ago

Strange, I just noticed that openvfd could not be properly loaded on both of the kernels (technically, it's loaded, but there's no kmsg spam like when I used it last time) and /dev/openvfd is therefore missing on them both. I'm feeling some upstream changes have broken the openvfd functionality. But I don't have time to bisect the problem for now. Maybe you could try older images from this repo, before I switched to the nightly release model? The old images should still contain old kernels, which I don't preserve locally.

SajjadSabzkar commented 5 months ago

Strange, I just noticed that openvfd could not be properly loaded on both of the kernels (technically, it's loaded, but there's no kmsg spam like when I used it last time) and /dev/openvfd is therefore missing on them both. I'm feeling some upstream changes have broken the openvfd functionality. But I don't have time to bisect the problem for now. Maybe you could try older images from this repo, before I switched to the nightly release model? The old images should still contain old kernels, which I don't preserve locally.

Ok thanks for your response , i'll trying to install old images and find what is problem!

7Ji commented 1 month ago

Sorry I just found I removed openvfd nodes from device trees from my kernels, I've updated YAopenvfD project description and yaopenvfd AUR package installation method.

Now, after YAopenvfD v1.1, ensure openvfd module is available, then ensure /openvfd node exists in your device tree, basically follow https://github.com/7Ji/YAopenvfD?tab=readme-ov-file#kernel-dependency , then start YAopenvfD-updater.service and optionally enable autostart following https://github.com/7Ji/YAopenvfD?tab=readme-ov-file#systemd-integration