Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to enable openvfd #21

Closed
SajjadSabzkar opened this issue Jan 26, 2024 · 7 comments
Closed

how to enable openvfd #21

SajjadSabzkar opened this issue Jan 26, 2024 · 7 comments

Comments

@SajjadSabzkar
Copy link

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

@7Ji
Copy link
Owner

7Ji commented Jan 26, 2024

YAopenvfd installed by default?

Yes:

install_pkgs_normal=(vim nano sudo openssh linux-aarch64-flippy-dtb-amlogic linux-firmware-amlogic-ophub-git uboot-amlogic-ophub ampart yaopenvfd uboot-legacy-initrd-hooks)

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
Copy link
Author

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
Copy link
Owner

7Ji commented Jan 26, 2024

How i can sure which kernel is installed

uname -a

pacman -Qs linux-

@7Ji
Copy link
Owner

7Ji commented Jan 26, 2024

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
Copy link
Owner

7Ji commented Jan 26, 2024

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
Copy link
Author

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 7Ji closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2024
@7Ji
Copy link
Owner

7Ji commented Jun 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants