Skip to content

Light control for Onyx Boox Note Air 3#587

Draft
Kamilll wants to merge 1 commit into
koreader:masterfrom
Kamilll:support-boox-air3
Draft

Light control for Onyx Boox Note Air 3#587
Kamilll wants to merge 1 commit into
koreader:masterfrom
Kamilll:support-boox-air3

Conversation

@Kamilll
Copy link
Copy Markdown

@Kamilll Kamilll commented Mar 28, 2026

This change is Reviewable

Copy link
Copy Markdown
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, pinging @hugleo

@hugleo
Copy link
Copy Markdown
Contributor

hugleo commented Mar 29, 2026

lgtm if it’s been tested at least on einktest.

@Kamilll
Copy link
Copy Markdown
Author

Kamilll commented Apr 4, 2026

I think I am unable to successfully produce APK to test the change on my device.

Execution failed for task ':app:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/home/kamil/Projects/luajit-kamil/app/.cxx/Debug/1r284r2h/arm64-v8a'
  [1/1] Linking C shared library /home/kamil/Projects/luajit-kamil/app/build/intermediates/cxx/Debug/1r284r2h/obj/arm64-v8a/libluajit-launcher.so
  FAILED: /home/kamil/Projects/luajit-kamil/app/build/intermediates/cxx/Debug/1r284r2h/obj/arm64-v8a/libluajit-launcher.so 
  : && /home/kamil/Android/Sdk/ndk/23.2.8568313/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android21 --gcc-toolchain=/home/kamil/Android/Sdk/ndk/23.2.8568313/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/kamil/Android/Sdk/ndk/23.2.8568313/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -fno-limit-debug-info  -static-libstdc++ -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,libluajit-launcher.so -o /home/kamil/Projects/luajit-kamil/app/build/intermediates/cxx/Debug/1r284r2h/obj/arm64-v8a/libluajit-launcher.so CMakeFiles/luajit-launcher.dir/android_native_app_glue/android_native_app_glue.c.o CMakeFiles/luajit-launcher.dir/jni_helper.c.o CMakeFiles/luajit-launcher.dir/main.c.o  -landroid  -llog  -lluajit-5.1  -pthread  -latomic -lm && :
  ld: error: unable to find library -lluajit-5.1
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.

The missing package seems to be installed:

kamil@fedora:~$ dnf repoquery --installed lua* luajit*
lua-0:5.4.8-4.fc42.x86_64
lua-devel-0:5.4.8-4.fc42.x86_64
lua-lgi-compat-0:0.9.2-22.fc42.x86_64
lua-libs-0:5.4.8-4.fc42.x86_64
lua-rpm-macros-0:1-15.fc42.noarch
lua-srpm-macros-0:1-15.fc42.noarch
luajit-0:2.1.1761727121-1.fc42.x86_64
luajit-devel-0:2.1.1761727121-1.fc42.x86_64
luajit2.1-luv-0:1.51.0.0-2.fc42.x86_64

kamil@fedora:~$ pkg-config --cflags --libs luajit
-I/usr/include/luajit-2.1 -lluajit-5.1

Do you see anything wrong here?
Is there any step by step instruction how to build the project?

@benoit-pierre
Copy link
Copy Markdown
Member

You need to build the main koreader project (after updating it's luajit-launcher submodule to this PR top commit) not this project directly.

@Kamilll Kamilll closed this Apr 6, 2026
@Kamilll
Copy link
Copy Markdown
Author

Kamilll commented Apr 6, 2026

I manage to setup koreader's module to point to my repo but building the project for android (or linux) target is still impossible.
For the reference I see following exception:

     | [koreader 100%] Linking CXX shared library libkoreader-cre.so
▸100% | Installing 'koreader'
make[1]: warning: -j4 forced in submake: resetting jobserver mode.
make[6715]: make: Resource temporarily unavailable
make[6715]: *** [make/gettext.mk:17: mo] Error 127
make[6714]: *** [make/gettext.mk:17: mo] Error 2
make[6713]: *** [make/gettext.mk:17: mo] Error 2
... 6712 times more of that

I try to play a bit with process limits on my machine but failed miserably. I will not be further working on this. Thank for your time.

@Frenzie Frenzie reopened this Apr 6, 2026
@Frenzie Frenzie marked this pull request as draft April 6, 2026 10:35
@Frenzie
Copy link
Copy Markdown
Member

Frenzie commented Apr 6, 2026

I'll just change it to draft. Closing it will make me forget. Which build do you need in order to test it, the regular ARM one?

@Kamilll
Copy link
Copy Markdown
Author

Kamilll commented Apr 6, 2026

To test it I would need android-arm64.

@Kamilll Kamilll force-pushed the support-boox-air3 branch from 3931e26 to 3f37a88 Compare April 6, 2026 20:42
@Kamilll
Copy link
Copy Markdown
Author

Kamilll commented Apr 6, 2026

Thanks! I was able to test my previous change (specifically setting light factory to be OnyxSdkLightsController) and it it work but the scale in the slider was incorrect. I poke around and I figured out that other Controller (OnyxAdbLightsController) works great on my device:

screen-debug

On the other hand, I noticed that the debug APK suffers from ghosting effects on the e-ink screen, the defect does not exist in the app from the official distribution. I am wondering, if the problem has something to do with the EDP Controller I changed in this pull request. (Not the best quality) Photo for reference:

photo

@hugleo
Copy link
Copy Markdown
Contributor

hugleo commented Apr 9, 2026

Onyx recently updated the firmware for many devices and I’ve noticed some small issues with the sdk driver. Please test these new changes: #586
They may solve your scale problem.

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

Successfully merging this pull request may close these issues.

4 participants