diff --git a/frontend/apps/filemanager/filemanagermenu.lua b/frontend/apps/filemanager/filemanagermenu.lua index 93366dfde..de5db89ab 100644 --- a/frontend/apps/filemanager/filemanagermenu.lua +++ b/frontend/apps/filemanager/filemanagermenu.lua @@ -217,8 +217,52 @@ function FileManagerMenu:setUpdateItemTable() }) end, }, + { + text = _("Enable debug logging"), + checked_func = function() + return G_reader_settings:isTrue("debug") + end, + callback = function() + G_reader_settings:flipNilOrFalse("debug") + if G_reader_settings:isTrue("debug") then + dbg:turnOn() + else + dbg:setVerbose(false) + dbg:turnOff() + G_reader_settings:flipTrue("debug_verbose") + end + end, + }, + { + text = _("Enable verbose debug logging"), + enabled_func = function() + return G_reader_settings:isTrue("debug") + end, + checked_func = function() + return G_reader_settings:isTrue("debug_verbose") + end, + callback = function() + G_reader_settings:flipNilOrFalse("debug_verbose") + if G_reader_settings:isTrue("debug_verbose") then + dbg:setVerbose(true) + else + dbg:setVerbose(false) + end + end, + }, } } + if Device:isKobo() then + table.insert(self.menu_items.developer_options.sub_item_table, { + text = _("Disable forced 8-bit color space"), + checked_func = function() + return G_reader_settings:isTrue("dev_startup_no_fbdepth") + end, + callback = function() + G_reader_settings:flipNilOrFalse("dev_startup_no_fbdepth") + end, + }) + end self.menu_items.cloud_storage = { text = _("Cloud storage"), callback = function() diff --git a/frontend/device/kobo/device.lua b/frontend/device/kobo/device.lua index 40b86bf25..eae8a7f56 100644 --- a/frontend/device/kobo/device.lua +++ b/frontend/device/kobo/device.lua @@ -23,7 +23,6 @@ local Kobo = Generic:new{ model = "Kobo", isKobo = yes, isTouchDevice = yes, -- all of them are - hasBGRFrameBuffer = yes, -- True when >16bpp (i.e., on current FW) hasOTAUpdates = yes, hasWifiManager = yes, @@ -260,7 +259,9 @@ function Kobo:init() if self.screen.fb_bpp == 16 then logger.info("Enabling Kobo @ 16bpp tweaks") jit.opt.start("loopunroll=45") - self.hasBGRFrameBuffer = no + elseif self.screen.fb_bpp == 32 then + -- Ensure we decode images properly, as our framebuffer is BGRA... + self.hasBGRFrameBuffer = yes end self.powerd = require("device/kobo/powerd"):new{device = self} -- NOTE: For the Forma, with the buttons on the right, 193 is Top, 194 Bottom. diff --git a/platform/kobo/koreader.sh b/platform/kobo/koreader.sh index ab0e0191d..939cb156e 100755 --- a/platform/kobo/koreader.sh +++ b/platform/kobo/koreader.sh @@ -151,6 +151,41 @@ if [ "${PRODUCT}" = "frost" ]; then fi # NOTE: We don't have to restore anything on exit, nickel's startup process will take care of everything (pickel -> nickel). +# In the same vein, swap to 8bpp, +# because 16bpp is the worst idea in the history of time, as RGB565 is generally a PITA without hardware blitting, +# and 32bpp usually gains us nothing except a performance hit (we're not Qt5 with its QPainter constraints). +# The reduced size & complexity should hopefully make things snappier, +# (and hopefully prevent the JIT for going crazy on high-density screens...). +# NOTE: Even though pickel/Nickel appear to restore their preferred fb setup, we'll have to do it ourselves, +# because things are a bit wonky otherwise. Plus, we get to play nice with every launch method that way. +# So, remember the current bitdepth, so we can restore it on exit. +ORIG_FB_BPP="$(./fbdepth -g)" +# Sanity check... +case "${ORIG_FB_BPP}" in + 16) ;; + 32) ;; + *) + # Hu oh? Don't do anything... + unset ORIG_FB_BPP + ;; +esac + +# The actual swap is done in a function, because we can disable it in the Developer settings, and we want to honor it on restart. +ko_do_fbdepth() { + # Check if the swap has been disabled... + if grep -q '\["dev_startup_no_fbdepth"\] = true' 'settings.reader.lua' 2>/dev/null; then + # Swap back to the original bitdepth (in case this was a restart) + if [ -n "${ORIG_FB_BPP}" ]; then + ./fbdepth -d "${ORIG_FB_BPP}" >>crash.log 2>&1 + fi + else + # Swap to 8bpp if things looke sane + if [ -n "${ORIG_FB_BPP}" ]; then + ./fbdepth -d 8 >>crash.log 2>&1 + fi + fi +} + # Remount the SD card RW if it's inserted and currently RO if awk '$4~/(^|,)ro($|,)/' /proc/mounts | grep ' /mnt/sd '; then mount -o remount,rw /mnt/sd @@ -166,11 +201,18 @@ RETURN_VALUE=85 while [ $RETURN_VALUE -eq 85 ]; do # Do an update check now, so we can actually update KOReader via the "Restart KOReader" menu entry ;). ko_update_check + # Do the fb depth switch, unless it's been disabled + ko_do_fbdepth ./reader.lua "${args}" >>crash.log 2>&1 RETURN_VALUE=$? done +# Restore original fb bitdepth if need be... +if [ -n "${ORIG_FB_BPP}" ]; then + ./fbdepth -d "${ORIG_FB_BPP}" >>crash.log 2>&1 +fi + # Restore original CPUFreq governor if need be... if [ -n "${ORIG_CPUFREQ_GOV}" ]; then echo "${ORIG_CPUFREQ_GOV}" >"/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" diff --git a/plugins/kobolight.koplugin/demo.png b/plugins/kobolight.koplugin/demo.png index 61b76f38f..0fee3e861 100644 Binary files a/plugins/kobolight.koplugin/demo.png and b/plugins/kobolight.koplugin/demo.png differ diff --git a/plugins/kobolight.koplugin/demo_ka1.png b/plugins/kobolight.koplugin/demo_ka1.png index 30c9d9ec8..142d6854f 100644 Binary files a/plugins/kobolight.koplugin/demo_ka1.png and b/plugins/kobolight.koplugin/demo_ka1.png differ diff --git a/reader.lua b/reader.lua index 934e8ac18..b6e29e91f 100755 --- a/reader.lua +++ b/reader.lua @@ -62,7 +62,8 @@ end -- should check DEBUG option in arg and turn on DEBUG before loading other -- modules, otherwise DEBUG in some modules may not be printed. local dbg = require("dbg") -if G_reader_settings:readSetting("debug") then dbg:turnOn() end +if G_reader_settings:isTrue("debug") then dbg:turnOn() end +if G_reader_settings:isTrue("debug") and G_reader_settings:isTrue("debug_verbose") then dbg:setVerbose(true) end local Profiler = nil local ARGV = arg diff --git a/resources/goodreadsnophoto.png b/resources/goodreadsnophoto.png index 4db7258b6..31da114e5 100644 Binary files a/resources/goodreadsnophoto.png and b/resources/goodreadsnophoto.png differ diff --git a/resources/icons/README.md b/resources/icons/README.md index 80eb683b3..98992e9f6 100644 --- a/resources/icons/README.md +++ b/resources/icons/README.md @@ -1,5 +1,11 @@ menu-icon.png is post-processed with: ```bash -convert menu-icon.png -set colorspace Gray -separate -average menu-icon-grayscale.png +convert menu-icon.png -grayscale Rec709Luma -dither Riemersma -remap eink_cmap.gif -quality 75 png:menu-icon-grayscale.png ``` + +The intent being to grayscale, dither down to the 16c eInk palette, and save as a 16c paletted grayscale PNG. +Start from an RGB copy of the image if you end up with a 256c or sRGB PNG (check via IM's identify tool). + +See https://www.mobileread.com/forums/showpost.php?p=3728291&postcount=17 for more details ;). + diff --git a/resources/icons/appbar.align.auto.png b/resources/icons/appbar.align.auto.png index c59255e8b..3386c8413 100644 Binary files a/resources/icons/appbar.align.auto.png and b/resources/icons/appbar.align.auto.png differ diff --git a/resources/icons/appbar.align.center.png b/resources/icons/appbar.align.center.png index 884ec28fa..ded8f0722 100644 Binary files a/resources/icons/appbar.align.center.png and b/resources/icons/appbar.align.center.png differ diff --git a/resources/icons/appbar.align.justify.png b/resources/icons/appbar.align.justify.png index fda3c0e5b..3b864e68a 100644 Binary files a/resources/icons/appbar.align.justify.png and b/resources/icons/appbar.align.justify.png differ diff --git a/resources/icons/appbar.align.left.png b/resources/icons/appbar.align.left.png index 8a65b0192..c4c1527a8 100644 Binary files a/resources/icons/appbar.align.left.png and b/resources/icons/appbar.align.left.png differ diff --git a/resources/icons/appbar.align.right.png b/resources/icons/appbar.align.right.png index 0bb646644..e477c624c 100644 Binary files a/resources/icons/appbar.align.right.png and b/resources/icons/appbar.align.right.png differ diff --git a/resources/icons/appbar.arrow.enter.png b/resources/icons/appbar.arrow.enter.png index ffc278e7f..cde63eb9b 100644 Binary files a/resources/icons/appbar.arrow.enter.png and b/resources/icons/appbar.arrow.enter.png differ diff --git a/resources/icons/appbar.arrow.left.up.png b/resources/icons/appbar.arrow.left.up.png index b655a4701..e42008a3c 100644 Binary files a/resources/icons/appbar.arrow.left.up.png and b/resources/icons/appbar.arrow.left.up.png differ diff --git a/resources/icons/appbar.arrow.shift.png b/resources/icons/appbar.arrow.shift.png index 9b7355f33..6608dafe1 100644 Binary files a/resources/icons/appbar.arrow.shift.png and b/resources/icons/appbar.arrow.shift.png differ diff --git a/resources/icons/appbar.book.open.png b/resources/icons/appbar.book.open.png index 3bfb7a491..8fcb93047 100644 Binary files a/resources/icons/appbar.book.open.png and b/resources/icons/appbar.book.open.png differ diff --git a/resources/icons/appbar.cabinet.files.png b/resources/icons/appbar.cabinet.files.png index a6976ecff..a70f8ae2f 100644 Binary files a/resources/icons/appbar.cabinet.files.png and b/resources/icons/appbar.cabinet.files.png differ diff --git a/resources/icons/appbar.chevron.first.png b/resources/icons/appbar.chevron.first.png index 85089a018..c449f93a6 100644 Binary files a/resources/icons/appbar.chevron.first.png and b/resources/icons/appbar.chevron.first.png differ diff --git a/resources/icons/appbar.chevron.last.png b/resources/icons/appbar.chevron.last.png index 3e080e7f9..82407a865 100644 Binary files a/resources/icons/appbar.chevron.last.png and b/resources/icons/appbar.chevron.last.png differ diff --git a/resources/icons/appbar.chevron.left.png b/resources/icons/appbar.chevron.left.png index c954d0d23..b77f06389 100644 Binary files a/resources/icons/appbar.chevron.left.png and b/resources/icons/appbar.chevron.left.png differ diff --git a/resources/icons/appbar.chevron.right.png b/resources/icons/appbar.chevron.right.png index b1163adec..671942875 100644 Binary files a/resources/icons/appbar.chevron.right.png and b/resources/icons/appbar.chevron.right.png differ diff --git a/resources/icons/appbar.chevron.up.png b/resources/icons/appbar.chevron.up.png index b363d1717..17de58b1f 100644 Binary files a/resources/icons/appbar.chevron.up.png and b/resources/icons/appbar.chevron.up.png differ diff --git a/resources/icons/appbar.clear.reflect.horizontal.png b/resources/icons/appbar.clear.reflect.horizontal.png index 043d87d48..6185c7c57 100644 Binary files a/resources/icons/appbar.clear.reflect.horizontal.png and b/resources/icons/appbar.clear.reflect.horizontal.png differ diff --git a/resources/icons/appbar.column.one.png b/resources/icons/appbar.column.one.png index 595df03db..219ababd2 100644 Binary files a/resources/icons/appbar.column.one.png and b/resources/icons/appbar.column.one.png differ diff --git a/resources/icons/appbar.column.three.png b/resources/icons/appbar.column.three.png index b86d08989..60571c3e3 100644 Binary files a/resources/icons/appbar.column.three.png and b/resources/icons/appbar.column.three.png differ diff --git a/resources/icons/appbar.column.two.large.png b/resources/icons/appbar.column.two.large.png index 17ed943ba..852a703e9 100644 Binary files a/resources/icons/appbar.column.two.large.png and b/resources/icons/appbar.column.two.large.png differ diff --git a/resources/icons/appbar.column.two.png b/resources/icons/appbar.column.two.png index 765821a83..af329a488 100644 Binary files a/resources/icons/appbar.column.two.png and b/resources/icons/appbar.column.two.png differ diff --git a/resources/icons/appbar.control.collapse.png b/resources/icons/appbar.control.collapse.png index 81576c24a..2ce0730a0 100644 Binary files a/resources/icons/appbar.control.collapse.png and b/resources/icons/appbar.control.collapse.png differ diff --git a/resources/icons/appbar.control.expand.png b/resources/icons/appbar.control.expand.png index e77a3160b..bc81e433b 100644 Binary files a/resources/icons/appbar.control.expand.png and b/resources/icons/appbar.control.expand.png differ diff --git a/resources/icons/appbar.crop.large.png b/resources/icons/appbar.crop.large.png index 9f88663ea..e8585f7be 100644 Binary files a/resources/icons/appbar.crop.large.png and b/resources/icons/appbar.crop.large.png differ diff --git a/resources/icons/appbar.globe.wire.png b/resources/icons/appbar.globe.wire.png index 7e3243552..e74ccefb4 100644 Binary files a/resources/icons/appbar.globe.wire.png and b/resources/icons/appbar.globe.wire.png differ diff --git a/resources/icons/appbar.grade.b.large.png b/resources/icons/appbar.grade.b.large.png index a358334bd..43b3db214 100644 Binary files a/resources/icons/appbar.grade.b.large.png and b/resources/icons/appbar.grade.b.large.png differ diff --git a/resources/icons/appbar.home.png b/resources/icons/appbar.home.png index 571ef2ef7..b11092845 100644 Binary files a/resources/icons/appbar.home.png and b/resources/icons/appbar.home.png differ diff --git a/resources/icons/appbar.magnify.browse.png b/resources/icons/appbar.magnify.browse.png index b69a59126..92c7bcd8b 100644 Binary files a/resources/icons/appbar.magnify.browse.png and b/resources/icons/appbar.magnify.browse.png differ diff --git a/resources/icons/appbar.page.corner.bookmark.png b/resources/icons/appbar.page.corner.bookmark.png index 42f4a9544..e9b91c6a3 100644 Binary files a/resources/icons/appbar.page.corner.bookmark.png and b/resources/icons/appbar.page.corner.bookmark.png differ diff --git a/resources/icons/appbar.page.text.png b/resources/icons/appbar.page.text.png index 02715efcb..7fe3b0a52 100644 Binary files a/resources/icons/appbar.page.text.png and b/resources/icons/appbar.page.text.png differ diff --git a/resources/icons/appbar.plus.png b/resources/icons/appbar.plus.png index 61dcfcb37..dde1ccc9e 100644 Binary files a/resources/icons/appbar.plus.png and b/resources/icons/appbar.plus.png differ diff --git a/resources/icons/appbar.pokeball.png b/resources/icons/appbar.pokeball.png index ac69269cc..eb53063a3 100644 Binary files a/resources/icons/appbar.pokeball.png and b/resources/icons/appbar.pokeball.png differ diff --git a/resources/icons/appbar.settings.large.png b/resources/icons/appbar.settings.large.png index 15c7eb414..294e69178 100644 Binary files a/resources/icons/appbar.settings.large.png and b/resources/icons/appbar.settings.large.png differ diff --git a/resources/icons/appbar.settings.png b/resources/icons/appbar.settings.png index d9e85b450..ed5267e4f 100644 Binary files a/resources/icons/appbar.settings.png and b/resources/icons/appbar.settings.png differ diff --git a/resources/icons/appbar.spacer.png b/resources/icons/appbar.spacer.png index 2321692b9..f1a83efdb 100644 Binary files a/resources/icons/appbar.spacer.png and b/resources/icons/appbar.spacer.png differ diff --git a/resources/icons/appbar.text.size.large.png b/resources/icons/appbar.text.size.large.png index 66aec86fa..5818b2bee 100644 Binary files a/resources/icons/appbar.text.size.large.png and b/resources/icons/appbar.text.size.large.png differ diff --git a/resources/icons/appbar.tools.png b/resources/icons/appbar.tools.png index cf4c30953..f3d3ae27e 100644 Binary files a/resources/icons/appbar.tools.png and b/resources/icons/appbar.tools.png differ diff --git a/resources/icons/appbar.transform.rotate.right.large.png b/resources/icons/appbar.transform.rotate.right.large.png index b7106b631..357a0b377 100644 Binary files a/resources/icons/appbar.transform.rotate.right.large.png and b/resources/icons/appbar.transform.rotate.right.large.png differ diff --git a/resources/icons/appbar.wifi.png b/resources/icons/appbar.wifi.png index ce702a9bd..bbdd8a071 100644 Binary files a/resources/icons/appbar.wifi.png and b/resources/icons/appbar.wifi.png differ diff --git a/resources/icons/dogear.png b/resources/icons/dogear.png index d5e253ddf..33f4ac021 100644 Binary files a/resources/icons/dogear.png and b/resources/icons/dogear.png differ diff --git a/resources/icons/eink_cmap.gif b/resources/icons/eink_cmap.gif new file mode 100644 index 000000000..4f51ee237 Binary files /dev/null and b/resources/icons/eink_cmap.gif differ diff --git a/resources/icons/menu-icon.png b/resources/icons/menu-icon.png index 6ed170c32..e1d5ccb75 100644 Binary files a/resources/icons/menu-icon.png and b/resources/icons/menu-icon.png differ diff --git a/resources/icons/stats.star.empty.png b/resources/icons/stats.star.empty.png index 75ba56ed5..dd3338c28 100644 Binary files a/resources/icons/stats.star.empty.png and b/resources/icons/stats.star.empty.png differ diff --git a/resources/icons/stats.star.full.png b/resources/icons/stats.star.full.png index 131baddfd..0dafca112 100644 Binary files a/resources/icons/stats.star.full.png and b/resources/icons/stats.star.full.png differ diff --git a/resources/info-aux.png b/resources/info-aux.png index afee09ee5..ff1f96c91 100644 Binary files a/resources/info-aux.png and b/resources/info-aux.png differ diff --git a/resources/info-bug.png b/resources/info-bug.png index 990e0466f..5a2e3b485 100644 Binary files a/resources/info-bug.png and b/resources/info-bug.png differ diff --git a/resources/info-confirm.png b/resources/info-confirm.png index 85a6585ed..7a6176019 100644 Binary files a/resources/info-confirm.png and b/resources/info-confirm.png differ diff --git a/resources/info-error.png b/resources/info-error.png index 97ecdfc37..3529915e5 100644 Binary files a/resources/info-error.png and b/resources/info-error.png differ diff --git a/resources/info-i.png b/resources/info-i.png index 0e76fa881..fc0e57da0 100644 Binary files a/resources/info-i.png and b/resources/info-i.png differ diff --git a/resources/info-warn.png b/resources/info-warn.png index f653634db..68d80a426 100644 Binary files a/resources/info-warn.png and b/resources/info-warn.png differ diff --git a/resources/jpeg.png b/resources/jpeg.png index f03838322..e74028348 100644 Binary files a/resources/jpeg.png and b/resources/jpeg.png differ diff --git a/resources/jpg.png b/resources/jpg.png index f03838322..9a4e91231 100644 Binary files a/resources/jpg.png and b/resources/jpg.png differ diff --git a/resources/kobo-touch-probe.png b/resources/kobo-touch-probe.png index 9d17da287..d34260f78 100644 Binary files a/resources/kobo-touch-probe.png and b/resources/kobo-touch-probe.png differ