Fix Refresh Issue on Some Onyx Devices#435
Conversation
I'm considering using these changes for ULTRAC. If it doesn't work for other devices, perhaps a condition could be used to distinguish. Added comments in the code explaining the problem.
|
Hi, I'm not thrilled about this. The main issue with this PR is that it seems to use |
|
The modes are, For A2 Mode devices: For HD Mode/Regal devices: I'm not sure if it will work for A2 Mode devices. However, with the ultrac and this PR, I haven't noticed the browsing menu refresh problem. Here, I use the Onyx configuration Fast Mode for text-only PDFs/EPUBs since I'm okay with seeing the white screen for only a couple of pages. But for comics, since I need to refresh each page, it's really annoying. I created a GIF to demonstrate the refresh modes: HD/Regal Refresh Style: Fast Mode Refresh Style: The issue with the refreshScreen method is that when I switch to Balanced/Fast Mode/Ultra Fast it enters in Fast mode refresh style. However, when I switch back to HD/Regal it continues using the Fast mode refresh style indefinitely. The only way to revert to the HD/Regal refresh style is to reboot the device. |
|
Could you try building with |
|
The Methods:
It seems to be the same behavior for Ultrac but I keep getting this if I change back to High Mode or Regal: But I want this: ;-) |
|
In that case it seems it's better to create separate epd controller for UltraC model, so we don't break the other ones ;) |
|
I have two more questions:
Because I see that currently, the other modes If it doesn't raise any problems we can refresh with We can also set modes with: Class.forName("android.view.View").getMethod("applyAppScopeUpdate", String::class.java, Boolean::class.javaPrimitiveType, Boolean::class.javaPrimitiveType,
Integer.TYPE, Integer.TYPE).invoke(null, TAG, true, true, 8, Integer.MAX_VALUE)But I think it's not worth the pain. Regarding the method It was used for Nook as mentioned here. Are you sure that Because if needed I think it should be increased or dealt with directly in the controller. If I create another qualcomm driver file, then I wouldn't need to override the behavior like I do with |
No, it's because It seems there may be a bug Should return If it was indeed a bug, then we should be using |
|
Now things make sense for me. There are two bugs then. I think it could be a regression that breaks things. f2d946b...b3b3c3c#diff-820e361a75897cc66e8cd9904645b9e6f4a2647f169ed31193cf56c341b79735 Analyzing your commit at that time I see that you implemented the modes in assets/android.lua. However now the modes are implemented in the Kotlin class files. I didn't check further, but I believe the file QualcommOnyxEPDController.kt was replaced with OnyxEPDController.kt in other commits, and it didn't incorporate the required partial refresh |
I've tried but the mess with submodules makes impossible to figure out things without spending a lot of time triaging pairs of commits. Please double check yourself, better if on device, what happens if you make it to request an update on each partial refresh.
I didn't intend to change the behaviour of any driver. AFAICT I copied the previous behaviour in #322, but maybe I missunderstand something. It should be easily testable. Pick a release from late 2020 and compare partial refreshes with a 2023 release and tell me. You can grab the logcat and figure out if these partial refreshes are requested. Also, any device with support for partial refreshes can be used as full update only. That's the behaviour on Nooks, for instance. AFAIK the only device where we do each update ourselves is in Tolinos. Here's your original PR: koreader/koreader-base#1221 Based on the conversation there it seems that we're talking about partial refreshes and how to implement them in Onyx. So probably you're right and I mess some stuff. Oh, boy, this is hard to maintain :p Anyhow, please keep in mind the onyx devices added during the last couple of years inherited the new behaviour. I cannot link right now but I do remember to see a lot of logs where the schim to prevent the screen refresh was triggering a catched exception. So, if you check the behaviour isn't the intended one instead of moving all onyx devices to the full behaviour just create a new class with that slightly modification and move the devices where you can test that behaviour. |
The
|
|
Great, so it seems it was unintended. Sadly I don't have device on hand so I cannot test it myself. I borrowed it to my friend. I'll test it next time I see her. @hugleo Do let me know when you have results of your tests. Partial refreshes should offer a better experience ;) |
|
I've configured this driver for 'all' and tested it. This causes a full refresh with any menu action. As a result it will cause serious problems for any Onyx device that does not support this modes. |
|
Closing this one because onyx fixed the black/white overlay in the currently firmware. Both refresh functions seems to work similar for ultrac now. Will not change self:_updatePartial(full, 500) for now since 500 ms seems not too noticeable, maybe in some future. |




Fix Black/White refresh problem for Regal and HD Mode
I'm considering using these changes for ULTRAC.
If it doesn't work for other devices, perhaps a condition could be used to distinguish. Added comments in the code explaining the problem.
This change is