Skip to content

Add support for Libra Colour and Elipsa 2E devices#11

Closed
systematiccaos wants to merge 5 commits intoAshex:mainfrom
systematiccaos:additional_devices
Closed

Add support for Libra Colour and Elipsa 2E devices#11
systematiccaos wants to merge 5 commits intoAshex:mainfrom
systematiccaos:additional_devices

Conversation

@systematiccaos
Copy link
Copy Markdown
Contributor

Summary

This PR adds touch input quirks for two additional Kobo e-reader devices and fixes an issue in the input diagnostics where framebuffer dimensions were hardcoded.

Changes

Device quirks (run.sh)

  • Libra Colour (monza/390): Added APP_TOUCH_MIRROR_Y=1 quirk for proper touch coordinate handling
  • Elipsa 2E (condor/389): Added APP_TOUCH_MIRROR_Y=1 quirk for proper touch coordinate handling
  • Explicitly set APP_TOUCH_MIRROR_X=0 as default when not otherwise specified

Diagnostic fix (diag_main.cpp)

  • Fixed run_input_diag() to query actual framebuffer dimensions at runtime instead of hardcoding 1072x1448
  • Falls back to Clara Colour defaults if framebuffer probe fails
  • Logs detected dimensions for debugging

Testing

These quirks follow the same pattern as the existing Clara Colour (spaColour/393) handling and match the touch input behavior observed on the Libra Colour and Elipsa 2E devices.

Related

Pattern mirrors KOReader's device-specific touch handling approach.

I built and tested on a tolino branded Libra Colour

Marius Scheffel added 5 commits March 14, 2026 10:44
When login succeeds but config.ini is not written, the errors were
silently ignored. This adds comprehensive logging to:

- config_save(): log file open failures with errno and strerror
- save_session() in bootstrap.cpp: log config path and save result
- persist_session() in main.cpp: log config path and save result
- skeets_ensure_data_dirs(): log directory paths being created

This will help diagnose issues like:
- Permission problems on /mnt/onboard/.adds/sKeets/
- Read-only filesystem mounts
- Directory creation failures
The config.ini was not persisting across reboots because:
1. fclose() doesn't guarantee data reaches persistent storage on embedded devices
2. Forced reboot (run.sh reboots after app exit) could truncate unwritten data

Changes:
- config_save: Add fflush() + fsync() before fclose() to ensure durability
- config_save: Log all error cases including fsync failures
- load_saved_session: Add logging for config path and loaded session details
- skeets_run_bootstrap: Add step-by-step logging for session restore flow

This will also help diagnose the issue where second run shows 'No fonts'
and exits immediately without attempting session restore.
Root cause found: config.ini was being overwritten with empty session
values, causing the app to lose authentication on restart.

The log reveals the sequence:
1. Login succeeds, config.ini saved with valid session (6 entries)
2. clear_saved_session() runs (user action or accidental touch),
   overwrites all 6 session keys with empty strings
3. On next boot, config.ini loads 6 entries — all empty
4. No saved session found, no login.txt → app shows 'waiting for login'

Fixes:
- persist_session(): Skip saving if the session is entirely empty
  to prevent overwriting a valid config with blank values
- save_session() in bootstrap: Same empty-session guard
- clear_saved_session(): Add logging so the call is visible in logs
- persist_session(): Log session details (handle, did, token sizes)
  to make it obvious when an empty session would have been written
@systematiccaos
Copy link
Copy Markdown
Contributor Author

Closing for now - have discovered more issues that need fix on the kobo libra colour

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.

1 participant