Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compositor #348

Merged
merged 222 commits into from
Oct 12, 2024
Merged

Compositor #348

merged 222 commits into from
Oct 12, 2024

Conversation

Eeems
Copy link
Collaborator

@Eeems Eeems commented Feb 1, 2024

Supersedes #320

Overview of changes

  • Add new display server that handles compositing multiple framebuffers onto the screen, as well as sending input to only the currently focused application.
  • C++ library for applications to use to communicate with the display server
  • Preload library built on top of the previously mentioned library, that will automatically handle running existing apps against the display server. Similar to rm2fb-client.
  • QPA for Qt applications that handles communicating with the display server.
  • All Oxide applications have been updated to use the new QPA
  • Application Splashscreens have been removed, and instead there is now a notification indicating that the application is launching.
  • When an application crashes, a notification will be raised to alert the user.
  • New xclip application to expose the display server clipboards to scripts.
  • New fbinfo application to spit out information about the current framebuffer device.
  • drawFullscreenImage has been removed from the screen API.
  • chroot capabilities have been removed from tarnish

Todo:

  • Move test app to tests folder
  • Fix issues
    • Keyboard detection doesn't always work on resume of an app
    • Automated lock fires even though there is activity
    • Swipes aren't working
    • Screenshot keyboard shortcut doesn't work (Shift+End+S or Shift+Meta+S)
    • display-server can still crash
    • Force closing some applications (puzzles, harmony, etc) will cause them to crash as part of stopping
    • Tarnish will crash when stopping
    • Screenshots don't appear to work
    • Does not use language keymaps provided by epaper-qpa
    • Fix long press on buttons on rM1
    • Fix exiting exclusive mode on rM1
    • Task switcher crashes when closing app
    • Screenshots fail on rM1
    • Suspend screen does not work on rM1
    • Display server appears to have a memory leak
    • tarnish uses nearly 100% CPU usage on rM1 (Unless OXIDE_QPA_DEBUG_EVENTS=1)
    • Unable to open micro, nano, or htop in yaft or fingerterm
      • Nano and htop appears to be due to a mmap loop that uses all available memory
      • Sometimes the error will be that it can't open yaft-256color
    • vi fails to display anything in yaft
    • When applications crash, it sometimes freezes the display server
    • Desktop file validation doesn't know about exclusive flag
    • Exclusive mode is not exited automatically when starting tarnish, or if tarnish, or the app crashes
    • Add security for certain display server API calls that allow limiting what can use them
    • Lockscreen is sometimes skipped when resuming from suspend and in exclusive mode
    • Sort out event went missing during delivery! (nested sendEvent() is not allowed) warning from tarnish when resuming xochitl
    • When resuming from sleep you will see the running application before the lockscreen is shown
  • Documentation
    • Update liboxide documentation
    • Add libblight documentation
    • Add QPA documentation
    • Update website documentation
      • Application spec
        • Removed chroot flag
        • Removed directories
        • Removed splash
        • Added flags
          • nopreload
          • nopreload.compositor
          • nopreload.sysfs
          • exclusive
      • Application Documentation
        • Removed chroot
        • Removed directories
        • Removed splash
      • Rot usage
        • New compositor API
      • Screen API
        • drawFullscreenImage removed
      • System API
        • Remove leftAction, rightAction, homeAction, powerAction, topAction, bottomAction
      • Update Oxide-utils doc
        • Add xclip
        • Add fbinfo
      • Add compositor API
  • Add "raw" rm2fb mode for apps that don't work with the display server (i.e. xochitl)
  • Create oxide-client blight-client wrapper script
  • Add automated tests for the display server communiation protocol
  • Move all button handling to QML
  • Update package recipe
    • Add display-server
      • display-server
      • oxide-client blight-client
      • qpa
    • Add fbinfo
    • Update oxide-utils
      • xclip

Application Compatibility

Application Works with display server Works with tarnish
KOReader ✔️ ✔️ 7
DOOMarkable ✔️ ✔️
recrossable ✔️ ✔️
Plato ✔️ ✔️
Puzzles ✔️ ✔️
Sill ✔️4 ✔️4
TilEm ✔️ ✔️
Calculator ✔️ ✔️
ChessMarkable ✔️ ✔️
harmony ✔️ ✔️
keywriter ✔️ ✔️
nao ✔️ 1 ✔️ 1
rmFm ✔️ 1 ✔️ 1
xochitl 2 2
whiteboard-hypercard 3 3
wikipedia 9 9
yaft ✔️ ✔️
dumbskull ✔️ ✔️
mines ✔️ ✔️
wordlet ✔️ ✔️
rpncalc ✔️ ✔️
netsurf 5 5
reterm 6 6
folly ✔️4 ✔️4
sudoku ✔️ ✔️
fingerterm 8 8
  1. The surface closes between screens and shows the app behind it
  2. Some UI display issues, and drawing will not update the display
  3. Crashes entire display server with bad_alloc
  4. Drawing lags behind very noticeably
  5. Rendering issues, crashes easily, displays images even after pages are no longer open
  6. Application crashes
  7. Requires updating the application registration to the following:
{
  "displayName": "KOReader",
  "description": "An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats",
  "bin": "/opt/koreader/reader.lua",
  "icon": "/opt/etc/draft/icons/koreader.png",
  "type": "foreground",
  "workingDirectory": "/opt/koreader",
  "environment": {
    "KO_DONT_GRAB_INPUT": "1",
    "KO_DONT_SET_DEPTH": "1",
    "TESSDATA_PREFIX": "data",
    "STARDICT_DATA_DIR": "data/dict"
  }
}
  1. Many issues:
  • Will often freeze the display server and crash the application.
  • Unable to open side menu
  • OXIDE_PRELOAD_FORCE_QT=1
    • Side menu will now open
    • will have some of the UI rotate, but not the right direction.
    • The terminal itself will still display as if it's not rotated.
    • Will complain about an unknown special key 16777249 when pressing left ctrl
    • Will fail to start bash properly often will leave you unable to run any commands.
  1. Display renders incorrectly with areas left blank or not updating after you click the first link.

Future enhancements

  • Make task switcher see different surfaces instead of list of apps
  • Make tarnish aware of the surfaces, and just use apps as list of applications that can be launched
  • Add flag to allow an application to be launched more than once
  • Allow launching an application with arguments, useful for allowing one application to launch another one to handle a file path
  • System-level on-screen keyboard
  • System-level top bar from launcher

@Eeems Eeems linked an issue Jun 26, 2024 that may be closed by this pull request
Copy link

coderabbitai bot commented Oct 3, 2024

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

113 files out of 224 files are above the max files limit of 75. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Eeems Eeems marked this pull request as ready for review October 12, 2024 03:12
@Eeems
Copy link
Collaborator Author

Eeems commented Oct 12, 2024

I think it's time to merge and deal with the outstanding issues as they come up. I've been daily driving this for quite a while, and all the non-working apps can be worked around with exclusive mode, and other mechanisms.

@Eeems Eeems merged commit 1c9322c into master Oct 12, 2024
11 of 12 checks passed
@Eeems Eeems deleted the compositor branch October 12, 2024 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request 📱 reMarkable 1 📱 reMarkable 2
Projects
Status: Done
1 participant