I recommend KOReader, but it has some problems on DPT-RP1 ... #48

Closed
opened 2018-12-29 22:12:05 -08:00 by qz-lab · 13 comments
qz-lab commented 2018-12-29 22:12:05 -08:00 (Migrated from github.com)

Just to see if there is someone can solve the problem.

Since most people hack their dpt-rp1 to read books, I recommend the app KOReader, which works like Kindle (the device, not the app). Here are a snapshot from my dpt-rp1.

This is the setting pane to adjust the DPI (ignore the error dialog box):
dp_20181230_1353

However, the bad news is that the android version KOReader seems doesn't refresh the e-ink screen correctly. When you touch the screen, it does responds (you can see it through logcat), but it often dose not refresh the content. You have to push the menu button to force it to refresh.
In fact, this is so annoying that I can barely use it.

I list it here so that someone capable can fix the little bug. Please info me if I bothered anyone.

**Just to see if there is someone can solve the problem.** Since most people hack their dpt-rp1 to read books, I recommend the app KOReader, which works like Kindle (the device, not the app). Here are a snapshot from my dpt-rp1. This is the setting pane to adjust the DPI (ignore the error dialog box): ![dp_20181230_1353](https://user-images.githubusercontent.com/45836108/50544739-5890d000-0c3b-11e9-913d-8b21eb36bc9d.png) However, the bad news is that the android version KOReader seems doesn't refresh the e-ink screen correctly. When you touch the screen, it does responds (you can see it through logcat), but it often dose not refresh the content. You have to push the menu button to force it to refresh. In fact, this is so annoying that I can barely use it. I list it here so that someone capable can fix the little bug. Please info me if I bothered anyone.
qppq commented 2018-12-30 04:17:43 -08:00 (Migrated from github.com)

EDIT: See https://github.com/HappyZ/dpt-tools/issues/48#issuecomment-450567411, it is a better method. Old comment:


Here is the "solution" I am currently using: Install Wake Lock and set it to SCREEN_DIM_WAKE_LOCK and autostart on boot. This should make KOReader usable but probably has an impact on battery life.

Acquiring a wakelock keeps /sys/power/asleep to on instead of snooze while using the device. If you press the power button so that the screen with "DIGITAL PAPER" is visible, the state will be standby as without the wakelock so I think the battery impact should only be there while using the device.

Another option might be to play around with the snooze_timeout_millis in /etc/dp_configurations/StandbySettingsConf.xml. I haven't tried anything like that, just found the file later on. I guess that a real solution should be part of KOReader though as other apps seem to refresh the screen normally.

EDIT: See https://github.com/HappyZ/dpt-tools/issues/48#issuecomment-450567411, it is a better method. Old comment: --- Here is the "solution" I am currently using: Install [Wake Lock](https://play.google.com/store/apps/details?id=eu.thedarken.wl) and set it to `SCREEN_DIM_WAKE_LOCK` and autostart on boot. This should make KOReader usable but probably has an impact on battery life. Acquiring a wakelock keeps `/sys/power/asleep` to `on` instead of `snooze` while using the device. If you press the power button so that the screen with "DIGITAL PAPER" is visible, the state will be `standby` as without the wakelock so I think the battery impact should only be there while using the device. Another option might be to play around with the `snooze_timeout_millis` in `/etc/dp_configurations/StandbySettingsConf.xml`. I haven't tried anything like that, just found the file later on. I guess that a real solution should be part of KOReader though as other apps seem to refresh the screen normally.
qz-lab commented 2018-12-30 05:32:08 -08:00 (Migrated from github.com)

Thanks a lot! @qppq

I have contacted the maintainers of KOReader. It seems the refresh problem always happens on the Android devices with an e-ink screen. Since they don't have many brands of e-ink Android devices available, there is no general way to fix it.

I'm not familiar with Android, so I searched about Wake Lock on the Internet. And according to your description, I guess this is how dpt-rp1 works: Every time 1000ms after you stop operating, dpt-rp1 switches the e-ink screen off, with the content unchanged, to save power. Since KOReader doesn't "reactivate" the screen before refreshing, most of the refresh operations are enqueued and eventually lost.

The KOReader refresh function locates in the file /data/data/org.koreader.launcher/files/ffi/framebuffer_android.lua, I guess I might fix the problem by modifying it. At least I hope so.

I don't know Android, and I don't know lua either. What a pain !!!

Thanks a lot! @qppq I have contacted the maintainers of KOReader. It seems the refresh problem always happens on the Android devices with an e-ink screen. Since they don't have many brands of e-ink Android devices available, there is no general way to fix it. I'm not familiar with Android, so I searched about `Wake Lock` on the Internet. And according to your description, I guess this is how dpt-rp1 works: Every time 1000ms after you stop operating, dpt-rp1 switches the e-ink screen off, with the content unchanged, to save power. Since KOReader doesn't "reactivate" the screen before refreshing, most of the refresh operations are enqueued and eventually lost. The KOReader refresh function locates in the file `/data/data/org.koreader.launcher/files/ffi/framebuffer_android.lua`, I guess I might fix the problem by modifying it. At least I hope so. I don't know Android, and I don't know lua either. What a pain !!!
qz-lab commented 2018-12-30 06:54:05 -08:00 (Migrated from github.com)

I have to say, at lest, the WakeLock method works.

I have to say, at lest, the WakeLock method works.
qppq commented 2018-12-30 07:20:34 -08:00 (Migrated from github.com)

I just tried the method with /etc/dp_configurations/StandbySettingsConf.xml and it also worked. Executing the following in adb shell has essentially the same effect as the wakelock method:

su
mount -o rw,remount /system
busybox vi /etc/dp_configurations/StandbySettingsConf.xml
# set default="86400000" for key="snooze_timeout_millis"
cd /data/system
mv ConfMgr.db ConfMgr.db_bak
mv ConfMgr.db-journal ConfMgr.db-journal_bak
reboot

I will be using this method now instead.

I just tried the method with `/etc/dp_configurations/StandbySettingsConf.xml` and it also worked. Executing the following in `adb shell` has essentially the same effect as the wakelock method: ``` su mount -o rw,remount /system busybox vi /etc/dp_configurations/StandbySettingsConf.xml # set default="86400000" for key="snooze_timeout_millis" cd /data/system mv ConfMgr.db ConfMgr.db_bak mv ConfMgr.db-journal ConfMgr.db-journal_bak reboot ``` I will be using this method now instead.
qppq commented 2018-12-30 07:56:07 -08:00 (Migrated from github.com)

Setting snooze_timeout_millis to 10000 instead of 86400000 also works for pretty much all relevant operations and might be better for the battery. If you want to fix this in KOReader, keeping a wakelock until all operations are finished is probably a good idea.

Setting `snooze_timeout_millis` to `10000` instead of `86400000` also works for pretty much all relevant operations and might be better for the battery. If you want to fix this in KOReader, keeping a wakelock until all operations are finished is probably a good idea.
qz-lab commented 2018-12-30 15:54:57 -08:00 (Migrated from github.com)

I tried the /etc/dp_configurations/StandbySettingsConf.xml at first, but I didn't delete the files ConfMgr.db and ConfMgr.db-journal, so it didn't work.

Thanks. Now it works without the WakeLock app.

I tried the ` /etc/dp_configurations/StandbySettingsConf.xml` at first, but I didn't delete the files `ConfMgr.db` and `ConfMgr.db-journal`, so it didn't work. Thanks. Now it works without the `WakeLock` app.
qz-lab commented 2018-12-30 17:26:39 -08:00 (Migrated from github.com)

Just for curiosity, how did you find that it makes refresh work well just by disabling screen dim ? @qppq

Just for curiosity, how did you find that it makes refresh work well just by disabling screen dim ? @qppq
qppq commented 2018-12-31 03:30:46 -08:00 (Migrated from github.com)

I also tried KOReader on my android smartphone and compared the two adb logcat. The DPT has a lot of messages like W/PowerManagerService( 2149): Going to sleep due to screen timeout (uid 1000)..., W/PowerManagerService( 2149): [PhoneWindowManager] Screen turned off...TRANSITION_WAKEUP_TO_SNOOZE and D/PowerManagerService( 2149): ReleaseSuspendBlocker: PowerManagerService.WakeLocks so I thought that maybe this would be the reason.

I also tried KOReader on my android smartphone and compared the two `adb logcat`. The DPT has a lot of messages like `W/PowerManagerService( 2149): Going to sleep due to screen timeout (uid 1000)...`, `W/PowerManagerService( 2149): [PhoneWindowManager] Screen turned off...TRANSITION_WAKEUP_TO_SNOOZE` and `D/PowerManagerService( 2149): ReleaseSuspendBlocker: PowerManagerService.WakeLocks` so I thought that maybe this would be the reason.
qz-lab commented 2018-12-31 23:28:23 -08:00 (Migrated from github.com)

How smart you are!

By the way, the KOReader maintainers seem to be trying to fix the problem in their next version.
And happy new year!

How smart you are! By the way, the KOReader maintainers seem to be trying to fix the problem in their next version. And happy new year!
qz-lab commented 2019-01-20 16:11:32 -08:00 (Migrated from github.com)

They have a new version to solve the problem. With the option "Keep screen on" selected by default, koreader works well without any third-party apps or special modifications to the configuration files. @qppq

They have [a new version](http://build.koreader.rocks/download/nightly/v2019.01.1-3-gab09ded_2019-01-11/) to solve the problem. With the option "**Keep screen on**" selected by default, koreader works well without any third-party apps or special modifications to the configuration files. @qppq
HappyZ commented 2019-01-30 10:04:04 -08:00 (Migrated from github.com)

@Zack-Q if you don't mind, can you write a small paragraph on how you install KOReader? I'll put that into Wiki. Or you can directly edit wiki.

@Zack-Q if you don't mind, can you write a small paragraph on how you install KOReader? I'll put that into Wiki. Or you can directly edit wiki.
qz-lab commented 2019-01-30 19:56:56 -08:00 (Migrated from github.com)

Thanks for invitation! I'll write a new wiki page about it sooner. @HappyZ

Thanks for invitation! I'll write a new wiki page about it sooner. @HappyZ
HappyZ commented 2019-02-03 13:50:35 -08:00 (Migrated from github.com)

@Zack-Q thanks! looks great!

@Zack-Q thanks! looks great!
Sign in to join this conversation.
No description provided.