fix(ea): Steam copies of EA games get the CPUID of their own exe's bitness
Merges main, keeping the steam request key from #3021 in prepare_ea. prepare_steam_ea now puts the game exe in the sidecar it passes to prepare_ea, so ea_game_hardware sends the 64-bit CPUID for a 64-bit game.
No files matched your search
@@ -0,0 +1,118 @@
|
||||
# Bottom screen: guides tab
|
||||
|
||||
Part of the [bottom screen research](bottom-screen.md). Researched 2026-11-26 against `main` at `d788afc12`. Milestones 1 and 4 are built (Steam guides with tag and language filters, the Wikidata crosswalk with wiki, fixes and the ProtonDB tier, pinned maps with markers, and saved pages); see the status in the overview. Milestones 2 (achievement checklist with spoiler blur), 3 (native section reader and controller mode) and 5 (progress-aware help) are not started.
|
||||
|
||||
A dashboard tab that follows the running game and shows its guides, achievements, maps and fixes, reopens where the user left off, and saves pages for offline use.
|
||||
|
||||
## Use cases
|
||||
|
||||
- Stuck on a puzzle or boss: the walkthrough for this game is already open on the bottom screen at the last section read.
|
||||
- Achievement hunting: a checklist of locked achievements with missable ones flagged, spoilers blurred until tapped.
|
||||
- Collectibles: a map image pinned with pan and zoom, markers saved per map.
|
||||
- Fixes: PCGamingWiki and ProtonDB notes for the game when it misbehaves.
|
||||
- Offline play on a plane with guides saved earlier.
|
||||
|
||||
## Prior art
|
||||
|
||||
| Project | Matching | Offline | Reader and extras | Complaints and requests |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| [Game Twin](https://github.com/alpha-minus/game-twin) (GPL-3, 157★) | Bundled catalogs (GameFAQs, StrategyWiki, VGMaps, Steam guides) rebuilt offline; Jaccard title match at 0.6 with a sequel guard (numbers must match); hand-mapped series sites (Zelda Dungeon, Bulbapedia); site search URLs for the rest | `WebView.saveWebArchive` after forcing lazy images to load; MHT split into HTML and assets served via `shouldInterceptRequest`; scripts stripped; OkHttp with WebView cookies for side downloads. Also imports PDF, TXT, EPUB | Reading mode with per-host cleanup, auto table of contents, find, bookmarks. Resume by the text at the top of the viewport plus its occurrence, so it survives reflow. Maps with markers, checklists, RetroAchievements and Steam achievements, folder sync, optional Gemini with a screenshot | Battery and fan noise from live pages left running ([#12](https://github.com/alpha-minus/game-twin/issues/12), [#24](https://github.com/alpha-minus/game-twin/issues/24)); saved guides unreadable in dark mode ([#9](https://github.com/alpha-minus/game-twin/issues/9)); cookie banners ([#2](https://github.com/alpha-minus/game-twin/issues/2)); requests for notes ([#28](https://github.com/alpha-minus/game-twin/issues/28)) and a visible capture indicator for AI ([#22](https://github.com/alpha-minus/game-twin/issues/22)) |
|
||||
| [Pixel Guide](https://github.com/rexmont/Pixel-Guide-Android) (closed source) | Manual | TXT, single-file HTML, multi-page Neoseeker | ASCII reflow with auto table of contents, per-guide font, resume, find, controller scrolling, 14 themes, manuals, translation, AI | Ads in saved pages ([#46](https://github.com/rexmont/Pixel-Guide-Android/issues/46)), very large guides fail ([#58](https://github.com/rexmont/Pixel-Guide-Android/issues/58)); requests for stick scrolling ([#35](https://github.com/rexmont/Pixel-Guide-Android/issues/35)), prev/next ([#27](https://github.com/rexmont/Pixel-Guide-Android/issues/27)), checklists ([#44](https://github.com/rexmont/Pixel-Guide-Android/issues/44)), remembering the game association ([#20](https://github.com/rexmont/Pixel-Guide-Android/issues/20)) |
|
||||
| [WalkThor](https://github.com/nerf-herder-29/WalkThor) (MIT) | Fuzzy match of ROM name to local files | Local PDF and TXT only | Position stored as a character offset; 80-column pages for ASCII tables; L1/R1 page turns. Bottom window is non-focusable while a game runs because taking focus "can halve its frame rate" | n/a |
|
||||
| Steam Deck overlay Guides (SteamOS 3.3) | Exact app id | No | Favourites and popular guides; later fixes for oversized images and spoiler tags. Gone from the desktop overlay, where the 2023 overlay instead added pinned windows and Game Notes ([PC Gamer](https://pcgamer.com/new-steam-feature-lets-you-pin-windows-over-games-including-guides-notes-and-web-pages)) | n/a |
|
||||
|
||||
DroidDeck's advantage: we know the exact Steam app id of the focused game, so we need no title matching for Steam games.
|
||||
|
||||
## Sources
|
||||
|
||||
| Source | Access | Terms | Use |
|
||||
| --- | --- | --- | --- |
|
||||
| **Steam Community guides** | Listing: `steamcommunity.com/app/<appid>/guides/?browsefilter=toprated\|trend&requiredtags[]=Walkthroughs`. API: `IPublishedFileService/QueryFiles` with `filetype=11` needs a key or the signed-in user's token. Guide pages (`sharedfiles/filedetails/?id=`) are server-rendered; sections are `div.subSection` with numeric ids | Authors own their guides under the Steam Subscriber Agreement. Cache per user, never redistribute | First source. Native section reader with stable anchors for chapter jumps and resume |
|
||||
| **Steam achievements** | `IPlayerService/GetGameAchievements/v1/?appid=&language=` needs no key and returns names, icons, the hidden flag, global unlock percentage, and descriptions even for hidden achievements (checked on Elden Ring, Hollow Knight, Baldur's Gate 3). It is undocumented. `GetGlobalAchievementPercentagesForApp` also needs no key. The player's unlocks should come from the local client (`SteamClient.Apps` through CDP, or the client's stats cache); not yet tested | Valve | Achievement checklist with spoiler blur and difficulty from unlock % |
|
||||
| **Wikidata** | SPARQL by Steam app id (P1733), or Epic (P6278) or GOG (P2725) id, returns the Fandom wiki (P4073), PCGamingWiki (P6337), GameFAQs (P4769), IGN (P5385), HowLongToBeat (P2816) and speedrun.com ids | CC0 | Crosswalk from the running game to every other site, including non-Steam games |
|
||||
| **StrategyWiki** | MediaWiki API | CC BY-SA 4.0 | Full offline caching allowed |
|
||||
| **Fandom wikis** | MediaWiki `api.php` per wiki | CC BY-SA (media excluded) | Per-game wiki pages, found through Wikidata |
|
||||
| **PCGamingWiki** | `pcgamingwiki.com/api/appid.php?appid=` redirects to the page; MediaWiki API (anonymous Cargo queries are refused now) | CC BY-NC-SA 3.0 | Fixes and settings, in a "Fixes" section |
|
||||
| **ProtonDB** | `protondb.com/api/v1/reports/summaries/<appid>.json`, no key | ProtonDB | A tier badge next to fixes |
|
||||
| **GameFAQs, Neoseeker, IGN** | No API. GameFAQs terms forbid unauthorized scraping; its robots signals allow reference use but not AI training | Authors' copyright; Ziff Davis bans automated retrieval including AI use without permission | Browse in a WebView; save a page only when the user asks; never prefetch or send to AI |
|
||||
| **VGMaps, Map Genie** | Images; Map Genie is an interactive site (Ziff Davis) | Maps belong to the games' owners; Map Genie bans automated retrieval | Save VGMaps images on request into the map viewer; Map Genie only as a live WebView |
|
||||
| **YouTube** | Search URL (free) or Data API (100 quota units per search) | YouTube | Search link and embedded player, no downloads |
|
||||
| **HowLongToBeat, TrueSteamAchievements** | No stable API ([unofficial library breaks often](https://github.com/ScrappyCocco/HowLongToBeat-PythonAPI/issues)) | Ziff Davis / site owners | Links only |
|
||||
|
||||
Recommended order for the tab: Steam guides → achievements → StrategyWiki or the game's Fandom wiki (via Wikidata) → PCGamingWiki and ProtonDB → curated series sites → GameFAQs, Neoseeker and IGN in a WebView → maps → YouTube.
|
||||
|
||||
## What DroidDeck already has
|
||||
|
||||
Paths are under [`app/src/main/java/com/droiddeck/launcher/`](../../app/src/main/java/com/droiddeck/launcher/).
|
||||
|
||||
- **Game identity.** Bottom pages receive `gestureGame` as `runningGame`. In Steam mode it is the gamescope-focused app id (ignoring the Steam client, 769); in direct-run mode it is `program:<path>`, which is not a Steam app id, so Steam lookups must not use it. `AgentGuest.activeSteamAppId` reads the focused Steam app directly and is the source for Steam lookups. Non-Steam store games are Steam shortcuts; `resolveAchievementsInFront` already maps the focused id to the store and store id through the library cache.
|
||||
- **WebView base.** [`ui/BottomChatPage.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomChatPage.kt) loads Steam Community with a host allow-list, desktop user agent, fit-to-screen CSS and crash recovery. [`session/SteamWebLogin.kt`](../../app/src/main/java/com/droiddeck/launcher/session/SteamWebLogin.kt) imports the Steam client's own `steamcommunity.com` cookies, so guides load signed in without another login.
|
||||
- **Achievements.** [`stores/StoreAchievements.kt`](../../app/src/main/java/com/droiddeck/launcher/stores/StoreAchievements.kt) is a provider base with a per-game cache; GOG and Epic implement it. [`ui/StoreAchievementsUi.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/StoreAchievementsUi.kt) has the rows, tab and session panel. A Steam provider plugs in as source `steam`.
|
||||
- **Per-game storage.** `SessionPrefs` already keys settings by game (for example `fpsLimit.game.<id>`); the guide workspace fits the same pattern.
|
||||
- **Game frame without MediaProjection.** `SessionActivity.copyGameFrame` and `AgentAttachments.gameFrame` capture the game image directly, which an optional AI helper could use with no capture permission.
|
||||
- **Controller.** The dashboard forwards controller input to the game and has no D-pad focus today. The docked session menu has focus handling (`SecondScreenPresentation.dispatchMenuKey`, the `dockedMenuController` setting) and is the pattern to follow.
|
||||
|
||||
## Design
|
||||
|
||||
**Workspace per game.** One workspace per Steam app id (or store key): open guide, section, text anchor, recent searches, pinned maps, checklist ticks. Restored when the game gains focus. Cleared with the game profile.
|
||||
|
||||
**Home of the tab** for the running game:
|
||||
|
||||
1. Continue: the last guide at the last section.
|
||||
2. Steam guides, top rated and trending, filterable by tag (Walkthroughs, Achievements, Secrets, Maps).
|
||||
3. Achievements: locked first, missable flagged, hidden descriptions blurred.
|
||||
4. Wiki: StrategyWiki or Fandom, from Wikidata.
|
||||
5. Fixes: PCGamingWiki and the ProtonDB tier.
|
||||
6. Saved: offline pages and maps for this game.
|
||||
7. Search the web: GameFAQs, Neoseeker, IGN and YouTube with the game name prefilled.
|
||||
|
||||
**Reader.**
|
||||
|
||||
- Steam guides and MediaWiki pages are rendered natively from their HTML (sections, images, spoilers), not as a full web page: smaller, dark by default, and reflowed for the panel.
|
||||
- Other sites open in a WebView with cleanup CSS, forced dark mode and a cookie-banner dismiss.
|
||||
- Resume by text anchor (Game Twin's approach), falling back to scroll ratio.
|
||||
- Table of contents from Steam section ids or the MediaWiki outline; find in page.
|
||||
- Spoiler-safe by default: Steam `[spoiler]` spans and hidden achievements blurred until tapped.
|
||||
|
||||
**Offline.**
|
||||
|
||||
- Steam guides and wiki pages: save the parsed HTML and images per user.
|
||||
- Other sites: MHT saved on request, with scripts stripped.
|
||||
- Saved pages are listed per game and work without network.
|
||||
|
||||
**Controller.**
|
||||
|
||||
- The guide never takes focus or priority from the game (WalkThor's lesson).
|
||||
- A dedicated chord or the docked-menu controller mode gives it the pad: right stick scrolls, L1/R1 change section, D-pad moves through links and the contents, B returns the pad to the game.
|
||||
- Touch always works.
|
||||
|
||||
**Battery.** Pause or destroy WebViews when the tab is not visible; the top complaint about Game Twin is a live page draining the battery behind the game.
|
||||
|
||||
## Progress-aware help (later)
|
||||
|
||||
Signals we can use without reading game memory:
|
||||
|
||||
- Steam achievement unlocks with timestamps, matched to guide section titles.
|
||||
- Steam rich presence (`steam_display`) and, for games that report it, [Steam Timeline](https://partner.steamgames.com/doc/api/ISteamTimeline) game phases and tooltips. Whether the client exposes these to CDP needs checking.
|
||||
|
||||
An optional AI helper ("Where am I, what next?") would send the game frame plus those signals. Rules from Game Twin's feedback and the criticism of Xbox Gaming Copilot ([Tom's Hardware](https://www.tomshardware.com/video-games/pc-gaming/microsoft-says-gaming-copilot-uses-screenshots-to-understand-in-game-events-not-for-training-ai-models-optional-feature-can-be-turned-off-but-not-easily-uninstalled)):
|
||||
|
||||
- opt-in, user's own key;
|
||||
- one frame per question, with a visible indicator;
|
||||
- crop out notifications and overlays;
|
||||
- never send cached text from sources that forbid AI use.
|
||||
|
||||
## Open questions
|
||||
|
||||
- The most reliable way to read the player's Steam unlocks locally (CDP versus the client's stats cache).
|
||||
- Whether Steam guide listings load reliably without the web API key, using the signed-in cookies.
|
||||
- How much of a Steam guide's formatting (tables, embedded video) the native reader must support.
|
||||
- Where the tab lives in swapped mode (it follows the panel to the top screen).
|
||||
|
||||
## Milestones
|
||||
|
||||
1. Steam guides list and WebView reader for the running app id, with a per-game last page.
|
||||
2. Steam achievements provider and checklist with spoiler blur.
|
||||
3. Native section reader, offline saving and the controller mode.
|
||||
4. Wikidata crosswalk, wiki and fixes sections, maps viewer.
|
||||
5. Progress-aware suggestions and the optional AI helper.
|
||||
@@ -0,0 +1,107 @@
|
||||
# Bottom screen: region mirror
|
||||
|
||||
Part of the [bottom screen research](bottom-screen.md). Researched 2026-11-26 against `main` at `d788afc12`. Milestone 1 (the PixelCopy prototype) is built: a Mirror tab with a drag-to-pick editor on a still frame, a live view at about 15 fps with sharp or smooth scaling, and one region per game stored as fractions of the output. PixelCopy sees nothing while the zero-copy path puts the game on a child layer, so the tab turns zero-copy off while it is shown (HDR still forces it on). Checked on a Retroid Pocket Duo Lite Plus. Hide on top (milestone 3 in part) is built as a view over the game surface while the tab is shown: shown, black or dimmed per game. App views sit above the SurfaceView, so the mask hides the region on screen while PixelCopy still reads the real pixels. Blur and the compositor output are not done.
|
||||
|
||||
Show live crops of the game image (minimap, HUD, ability bar, dialogue box) scaled up on the bottom screen, and optionally remove them from the top screen. Regions are saved per game.
|
||||
|
||||
## Use cases
|
||||
|
||||
- **Minimaps** in open-world and action games (GTA, Monster Hunter, The Witcher, Elden Ring's compass): bigger on the bottom, gone from the top.
|
||||
- **MMO and ARPG bars**: ability, health and buff bars moved off a crowded 6" screen. Megingiard users asked for 90° rotation for a Guild Wars 2 ability bar and for very thin crops for visual-novel text.
|
||||
- **Racing**: rear-view mirror or track map on the bottom while the top shows only the road.
|
||||
- **Strategy**: the minimap of an RTS or a city builder, where it is the main navigation tool.
|
||||
- **Clean top screen**: hide every HUD element on top and keep them all on the bottom.
|
||||
|
||||
## Prior art
|
||||
|
||||
| Project | Capture | Notes |
|
||||
| --- | --- | --- |
|
||||
| [Megingiard](https://github.com/stormpanda/megingiard) (Thor) | A privileged shell helper creates a mirror display (hidden `SurfaceControl.createDisplay` on API 33; `AUTO_MIRROR` virtual display through `mirrorSurface` on API 34+), then SurfaceTexture → GLES → TextureView. Falls back to MediaProjection with a consent prompt on every start | Up to 10 cutouts. Crop box edited on the top screen, placement on the bottom. Edge handles, 1 px gamepad steps, snap guides, aspect lock (free, source-locked, destination-locked), rotation and flips, pinch zoom, circle shape, edge blending, temporal smoothing. Variance masks cut moving background out of HUD art. "Visual anchors" (a 256-point colour signature checked at 60 Hz) switch layout or freeze cutouts when a menu covers the HUD. FPS cap 10–120. Complaints: black mirror, consent prompts, helper pairing, DRM blanking ([docs](https://github.com/stormpanda/megingiard/tree/main/docs/features/mirror)) |
|
||||
| [Heimdall](https://github.com/mastercook777/Heimdall-AYN-Thor-Assistant) (Thor) | MediaProjection into one virtual display, fanned out on the GPU: one EGL surface per "Portal", crop in the texture matrix | Two Portals. Per-Portal zoom, shape, fps, and an "Interactive" mode that sends one-finger touch back to the region. Curated [community profiles](https://github.com/mastercook777/heimdall-community-profiles) keyed by app, checked by SHA-256 |
|
||||
| [WalkThor](https://github.com/nerf-herder-29/WalkThor) (Thor) | MediaProjection at half resolution into an `ImageReader`, drawn with Compose | Four regions per game stored as fractions of the screen and keyed by game title. Pick box keeps the bottom screen's aspect by default. About 30 fps. Its bottom window is non-focusable so the game keeps top-app priority |
|
||||
| [OnTopReplica](https://github.com/LorenzCK/OnTopReplica) (Windows) | DWM thumbnails (`DwmRegisterThumbnail` with source and destination rectangles): a crop done by the compositor, with no copy | The usual way to put an MMO minimap on a second monitor. SteamDeckHQ's [AYANEO Flip DS review](https://steamdeckhq.com/news/ayaneo-flip-ds-review/) used it for a Monster Hunter: World minimap on the bottom screen |
|
||||
| [wl-mirror](https://github.com/Ferdi265/wl-mirror) (Linux) | wlr-screencopy or dmabuf export with `--region` | Scaling modes fit, cover, exact, linear and nearest, plus freeze |
|
||||
| gamescope PipeWire stream | An extra composite pass of the whole output, used by Steam for recording | Full output only, no regions. Still a precedent for a second output rendered inside the compositor |
|
||||
|
||||
None of the Android tools can hide the region on the top screen: they capture the final display output, so any mask they drew would be captured too. Each also adds at least one composition cycle of latency and needs MediaProjection or a privileged helper.
|
||||
|
||||
## Why DroidDeck can do better
|
||||
|
||||
The game is composited by our own Wayland compositor in the app process. We have the game image as a Vulkan image before it reaches the display, so we can:
|
||||
|
||||
- crop without screen capture, a consent prompt or a privileged helper;
|
||||
- avoid the extra SurfaceFlinger round trip;
|
||||
- mask the region on the top screen in the same pass;
|
||||
- know the game's own resolution and our letterbox or stretch transform, so regions can be stored in game coordinates.
|
||||
|
||||
## Current pipeline
|
||||
|
||||
Paths are under [`app/src/main/cpp/waylandcomp/src/`](../../app/src/main/cpp/waylandcomp/src/).
|
||||
|
||||
- gamescope runs nested in our compositor with its Wayland backend (`tools/linuxfs/overlay/usr/local/bin/droiddeck-session`). Client buffers arrive as dma-bufs or AHardwareBuffers and are imported as `VkImage`s ([`vk_present.c`](../../app/src/main/cpp/waylandcomp/src/vk_present.c)).
|
||||
- `render_scene()` in [`compositor.c`](../../app/src/main/cpp/waylandcomp/src/compositor.c) builds a draw list; `vkp_render()` composites it, runs the effects chain ([`effects_chain.c`](../../app/src/main/cpp/waylandcomp/src/effects_chain.c): FSR, NIS, SGSR, CAS, CRT and others) and blits into one swapchain on one `ANativeWindow`.
|
||||
- There is exactly one output window. Swapping the game to the bottom screen ([`BottomGameScreen.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomGameScreen.kt), `SessionActivity.putGameOnBottom`) re-targets that window to the Presentation's `SurfaceView`; it does not feed two surfaces.
|
||||
- A gated zero-copy path ([`sc_layer.c`](../../app/src/main/cpp/waylandcomp/src/sc_layer.c), [`ZERO_COPY_SPIKE.md`](../../app/src/main/cpp/waylandcomp/ZERO_COPY_SPIKE.md)) posts the game's AHardwareBuffer straight to an `ASurfaceControl` child layer, with no composited image.
|
||||
- `update_map()` holds the scene-to-output transform for each scale mode (letterbox, fit, stretch, fill, integer); `vkp_output_to_scene` and `vkp_scene_to_output` convert between them. `vkp_blit_image()` already blits into AHB-backed images.
|
||||
- Screenshots use `PixelCopy` on the active `SurfaceView` (`SessionActivity.copyGameFrame`).
|
||||
- The bottom-screen Presentation ([`SecondScreenPresentation.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/SecondScreenPresentation.kt)) lives in the same process as the compositor, so a new JNI call can hand it a surface. The bottom KDE desktop runs a second compositor in another process and cannot share images without AHB IPC.
|
||||
|
||||
## Technical options
|
||||
|
||||
### A. Second output from the compositor (recommended first)
|
||||
|
||||
Add a second, optional output to `vk_present`: its own `ANativeWindow` and swapchain, fed by a `nativeSetMirrorSurface` JNI call from a `SurfaceView` in the bottom Presentation.
|
||||
|
||||
- After compositing the top frame, blit each region's source rectangle from the scene image into the mirror swapchain image with `vkCmdBlitImage` (or a small shader pass), and present it.
|
||||
- The copy is small: a 1240×1080 target at 60 Hz is about 0.3 GB/s against roughly 60 GB/s of memory bandwidth on the Thor's SoC (an estimate, not measured). The real costs are an extra queue submit competing with a GPU-bound game, and pacing a second display.
|
||||
- A shader pass makes nearest or integer scaling (pixel-art HUDs), masks, circles, rounded corners and colour keys possible. An existing upscaler (FSR EASU or SGSR) could scale a small minimap cleanly.
|
||||
- The mirror runs at its own rate (default 30 fps, options 15 and 60) and skips frames when the bottom panel is behind.
|
||||
- The top pass can fill, blur or dim the same rectangles to hide them.
|
||||
|
||||
### B. Zero-copy layers
|
||||
|
||||
Composite the top frame into compositor-owned AHardwareBuffers, then attach the same buffer to one `ASurfaceControl` child per region under the bottom `SurfaceView`, with `setCrop`, `setPosition`, `setScale` and `setBufferTransform`.
|
||||
|
||||
- The NDK documents that each layer holding a buffer counts as its own reference, and that all of them must be released before the buffer is reused ([`surface_control.h`](https://cs.android.com/android/platform/superproject/main/+/main:frameworks/native/include/android/surface_control.h)).
|
||||
- On API 33 (the Thor) the NDK `setBuffer` has no per-buffer release callback; release comes as a per-surface fence in the completion callback. All region fences must be merged before reuse, and the pool needs one or two extra buffers because the 60 Hz bottom panel holds buffers longer than the 120 Hz top panel.
|
||||
- Avoid the Java `Transaction.setBuffer` release callback here: callbacks are keyed by buffer and per-layer frame number, so two layers showing the same buffer can collide. This is inferred from AOSP source, not tested.
|
||||
- `ASurfaceControl_fromJava` needs API 34; on API 33 parent through `ASurfaceControl_createFromWindow` on the bottom `SurfaceView`'s window.
|
||||
- Scaling is done by the display hardware with a fixed vendor filter (no nearest neighbour), and the number of hardware planes is limited. If they run out, SurfaceFlinger composites on the GPU instead, which still works.
|
||||
- This only makes sense once the top screen itself is presented through AHB layers. Option A first.
|
||||
|
||||
### C. PixelCopy prototype
|
||||
|
||||
Crop a `PixelCopy` of the top `SurfaceView` at 5–10 fps into a bitmap. Useful for testing the editor UX and region presets quickly, but too slow for a real minimap, and it probably returns nothing when the zero-copy path puts the game on a child layer.
|
||||
|
||||
## Coordinates and presets
|
||||
|
||||
- Store rectangles in game-surface coordinates (gamescope's output, `DD_WIDTH`×`DD_HEIGHT`), not display pixels, so they survive changes to scale mode, FSR and output size. The compositor converts them each frame.
|
||||
- Fractions of the screen alone break when the aspect ratio changes, because engines anchor HUD widgets to corners and scale by height or DPI ([Unreal anchors](https://dev.epicgames.com/documentation/en-us/unreal-engine/umg-anchors-in-unreal-engine-ui)). Store an anchor (one of nine corners, edges or centre), an offset and a size in units of the game's height.
|
||||
- Key presets by Steam app id, aspect bucket (16:9, 16:10, 4:3, other) and an optional UI-scale tag set by the user.
|
||||
- Later: a community preset catalog keyed by app id, curated and hashed like Heimdall's, offered as "Suggested regions" for the running game.
|
||||
|
||||
## UX
|
||||
|
||||
- **Editing on both screens.** The top screen shows the frozen frame with a crop box: edge and corner handles, D-pad nudge by 1 px and shoulder buttons by 10. The bottom screen shows placement with snap guides, aspect lock, rotation, flip, filter (smooth or sharp) and shape.
|
||||
- **Limits.** Up to four regions per game. Long-press freezes a region; tap opens its options.
|
||||
- **Hide on top.** Per region: off, fill, blur or dim.
|
||||
- **Auto-hide.** Later, Megingiard-style colour anchors that hide or freeze regions when a menu covers the HUD.
|
||||
- **Place in the panel system.** A new "Mirror" bottom-screen mode next to the dashboard and control modes, remembered per game (see per-game panel memory in the overview). Regions can also be shown in a corner of the dashboard.
|
||||
- **Swapped mode.** With the game on the bottom screen, the mirror output goes to the top screen.
|
||||
- Reuse DroidDeck's own settings components; no generic dialogs.
|
||||
|
||||
## Open questions
|
||||
|
||||
- Pacing and fencing of a second swapchain on a different display without stalling the top present.
|
||||
- Interaction with glasses output, which already re-targets the single window.
|
||||
- Whether regions apply before or after effects (a CRT shader on a minimap is probably unwanted).
|
||||
- Battery and thermal cost, measured on the Thor and Duo with a GPU-bound game.
|
||||
- Touch forwarding into a region (Heimdall's "Interactive"), mapped back to game coordinates.
|
||||
|
||||
## Milestones
|
||||
|
||||
1. PixelCopy prototype of the editor and per-game storage.
|
||||
2. Second output in `vk_present` with one region and smooth scaling.
|
||||
3. Multiple regions, shader filters, hide on top.
|
||||
4. Presets keyed by aspect, suggested regions, anchors.
|
||||
5. Zero-copy layers once the top screen uses AHB presentation.
|
||||
@@ -0,0 +1,209 @@
|
||||
# Bottom screen: research and proposals
|
||||
|
||||
Researched 2026-11-26 against `main` at `d788afc12` (0.7.11). This document records what other dual-screen Android projects put on the second screen, how they get their data, where DroidDeck stood at that commit, and the features we want to build. "DroidDeck today" is that researched baseline; each proposal's **Status** line says what has been built since, and proposals without one are not scheduled. Two proposals have their own documents: [region mirror](bottom-screen-region-mirror.md) and [guides tab](bottom-screen-guides.md).
|
||||
|
||||
The starting point was WULFF DEN's survey video [Dual screen Android apps are getting crazy](https://youtu.be/dAiuG2A-wkc) (2026-11-26). It covers the AYN Thor and Retroid Pocket Duo, and most of its apps come from the [GAFT list](https://andreyvelsk.github.io/GAFT) of Thor apps.
|
||||
|
||||
## DroidDeck in the video
|
||||
|
||||
DroidDeck appears from 17:47 to 18:30 on a Thor: the Steam gamepad UI on top, our bottom panel below.
|
||||
|
||||
- Shown: the mode picker (DroidDeck menu, Keyboard + trackpad, Terminal, Deck grips + trackpads, Profile controls, Dashboard), the controller page of the docked menu, and the Dashboard's In-game stats card with FPS, 1%/0.1%/0.01% lows and a frame-time graph while Ball x Pit runs.
|
||||
- Verdict: it fills the bottom screen "with useful things like a keyboard and a trackpad" or game information, and makes the device feel "a lot more like having a dual screen Steam Deck".
|
||||
- Problem: it "froze on install a handful of times" and needed three device restarts. The build was probably 0.7.1 or earlier. Two first-run hang fixes landed later: #3070 (FEX/AppImage extraction deadlock in the clock-pause preload) and #3212 (first-run setup crashing in the background). Whether they cover this report is unconfirmed; slow exFAT preallocation on the Thor's SD card ([thor-sd-storage-investigation.md](thor-sd-storage-investigation.md)) can also look like a freeze.
|
||||
- Problem: with no game running, the stats card reads "59.6 fps · Steam Client ARM". It measures the Steam client itself, which tells the user nothing.
|
||||
|
||||
## What other projects do
|
||||
|
||||
### System companions and utilities
|
||||
|
||||
| Project | Bottom screen | Data source |
|
||||
| --- | --- | --- |
|
||||
| [ArmadaLive](https://github.com/FabianZettl/armadalive) (Armada OS, SteamOS-like Linux on the Thor) | Follows the top screen: logo, background, info, PDF manual, cheats and play time of the current game. Launcher with user and smart folders (recent, favourites, per system), random pick, Add to Steam. System page with FPS and a 60/120 Hz switch, rearrangeable quick-setting tiles (power profile, fan curve, stick LEDs, per-screen brightness, screen off), gauges. Rules (power profile, FPS limit, emulator resolution per game, per system, idle, or base). Tuning (governor, GPU limits, fan curve editor) that reverts after 15 s unless kept. Graphs, task manager, play-time history, trackpads, back buttons as a second controller. Dims after 10 s; hold Start+Select to close a game; AYN button shows or hides it, hold turns the screen off. 55 themes, first-run permission walkthrough, health check, verified self-update | ES-DE custom event scripts writing a state file, emulator process scan matched to ROMs, gamescope focus and stats pipe, the Big Picture selection read over Steam's CEF debug port, ES-DE scraped media and Steam's library cache |
|
||||
| [Armada OS](https://github.com/armada-os/armada) | Little in game mode: the bottom screen sleeps with the top. An experimental Plasma Mobile session, and `armada-run-bottom -- <cmd>` to run single apps on a second gamescope on the bottom panel | n/a |
|
||||
| [Thor Command Panel](https://github.com/BrianJr03/command-panel) | Replaces the stock dual-screen assistant: screen modes with real blanking, per-screen brightness and volume, 60/120 Hz with FPS, tiles, telemetry, themes, drag-to-arrange cards, replay buffer of either or both screens, full gamepad navigation | System APIs |
|
||||
| [Better Dual Screen Assistant](https://github.com/stormpanda/better-dual-screen-assistant) (Thor and Duo) | One-tap swap of the foreground apps between screens, linked brightness and volume, FPS from real frame delivery, paged tiles switched with L1/R1, recording, touch lock, mouse mode, key mapper, works before unlock | System APIs |
|
||||
| [Wayfinder](https://github.com/Thor-Wayfinder/thor-wayfinder) | Move or swap live apps between screens, button combos with a cheat sheet, per-app profiles (screen, performance, fan, refresh rate, lights, controls), keyboard and trackpad on the other screen | System APIs |
|
||||
| [Megingiard](https://github.com/stormpanda/megingiard) | Mirrors up to 10 cropped regions of the top screen (minimap, HUD) with pinch zoom; per-app macro pads; split keyboard on text focus; trackpad | Screen capture |
|
||||
| [WalkThor](https://github.com/nerf-herder-29/WalkThor) | Now Playing art, the guide at your last page, up to 4 mirrored top-screen regions remembered per game, console-style face-button labels, FPS graph, learned per-game battery runtime, offline captions of game audio. Hands focus back to the game | Cocoon and ES-DE log files, screen capture |
|
||||
| [Heimdall](https://github.com/mastercook777/Heimdall-AYN-Thor-Assistant) | Per-game module grid, macros, precision aim, virtual mouse and stick, "portals" (live top-screen regions), OCR translation | Screen capture |
|
||||
| [ThorSport](https://github.com/CHINW3/ThorSport) | Live scoreboards for 15 leagues, bottom-only mode so a game can run on top, spoiler delay synced to a stream | Sports APIs |
|
||||
| AYANEO Flip DS (Windows, AYASpace) | Performance stats, quick settings, app shortcuts, moving any window between screens | Windows |
|
||||
|
||||
### Guides
|
||||
|
||||
| Project | Bottom screen | Data source |
|
||||
| --- | --- | --- |
|
||||
| [Game Twin](https://github.com/alpha-minus/game-twin) | Per-game vault of guides (GameFAQs, StrategyWiki, IGN) saved offline, VGMaps maps with markers, RetroAchievements and Steam achievements including missables, checklists. Switches workspace with the game and reopens where you left off. Optional Gemini help with a screenshot of the top screen | Polls Cocoon `launch_debug.log`, ES-DE `es_log.txt`, RetroArch `content_history.lpl`, and the Steam Web API for recently played |
|
||||
| [Pixel Guide](https://github.com/rexmont/Pixel-Guide-Android) | Offline guides, maps, manuals, RetroAchievements, AI help | Games are added by hand |
|
||||
|
||||
### Game companions
|
||||
|
||||
| Project | Bottom screen | How it gets live state |
|
||||
| --- | --- | --- |
|
||||
| [Eden Duo](https://github.com/igawa6/eden-duo) (Switch) | Interactive per-game pages (Stats, Map, Tasks); can use items and change equipment | Per-game `.dsmod.zip` packages from a [catalog repo](https://github.com/igawa6/eden-duo-companions): `package.json` with build IDs and per-ABI native modules, a declarative UI manifest (pages, widgets, actions, `poll_hz`, art loaded from the game's own romfs), and pointer chains per build. A small C ABI gives modules `read_memory`/`write_memory`/`publish_*`. Unity IL2CPP members are resolved by name. Unknown builds show a "needs version X" page |
|
||||
| [GBA DS](https://github.com/kyannon/gba-ds) | Map or HUD for 77 GBA games. Per-game screen sizing, placement, generated overlays and per-screen brightness | A second silent emulator instance receives the live state, opens the map and captures it, confirmed by RAM flags and pixel probes. Some games render twice, with and without the HUD |
|
||||
| [WiiDS](https://github.com/Maddex712/WiiDS) | Course maps, standings, a rotating Galaxy planet with a touch cursor | Native recompilations, so state is in-process |
|
||||
| [Silksong Android](https://github.com/jakobkhansen/SilksongAndroid) | Interactive map, inventory and pause menu that look like part of the game | C# patches compiled on-device against the game's assemblies, drawn by a Unity camera on `Display.displays[1]`. Downloads the Linux depot with JavaSteam and syncs Steam Cloud saves |
|
||||
| [AYN Thor dual-screen mods](https://github.com/JoeCorrell/AYN-Thor-Dualscreen-Mods) (Stardew Valley) | Today, Map, Farm, Journal, Bundles, Calendar; touch actions | A SMAPI mod inside a Steam container serves a WebSocket on `127.0.0.1:7786`; a separate APK draws the pages. A [second client](https://github.com/project-barry/stardew-dual-screen) speaks the same protocol |
|
||||
| [ShulkDS](https://github.com/NaiSenshin/ShulkDS) (Minecraft Java) | Minimap, touch inventory, options | Its own client reimplementation |
|
||||
| [TotK Native](https://github.com/AurelioB/totk-android) | Touch equip and eat actions | Guarded reads of native memory into a JSON snapshot polled by a Java UI |
|
||||
| [Kanto Gear](https://github.com/AverageConsumer/kanto-gear) ([Gen 1 recomp](https://github.com/bryanthaboi/gen1recomp)) | Companion panel, as a combined window, a separate process, or a phone/browser over Wi-Fi | In-process; [KantoGearBottom](https://github.com/venatrix-ritz/KantoGearBottom) puts the separate window on Armada's bottom gamescope |
|
||||
| [EmuLnk](https://github.com/EmuLnk/emulnk) | HTML/JS dashboards per game that can also write memory or run macros | Emulator forks send memory over UDP; profiles are JSON memory points from a [content repo](https://github.com/EmuLnk/emulnk-repo) |
|
||||
|
||||
Other GAFT companions: Thor Pip-Boy, FNVDS, Grand Theft Companion, FFXII, Terraria, ZomboidDS, Skyrim, Delphis (live Dolphin button guide), PokeMMO Companion, Thor-SpeedrunSplits, DrillPod.
|
||||
|
||||
### Patterns that recur
|
||||
|
||||
- The bottom screen follows the game on top without the user telling it which game.
|
||||
- Everything is remembered per game: panel, guide page, mirrored regions, power and FPS rules, control profiles.
|
||||
- One hardware button shows or hides the panel; holding it switches the bottom screen fully off, not just black.
|
||||
- Per-screen brightness, a 60/120 Hz switch and an honest FPS readout.
|
||||
- Live crops of the minimap or HUD.
|
||||
- Auto-dim of an idle OLED panel.
|
||||
- The panel never takes focus or priority from the game.
|
||||
|
||||
## DroidDeck today
|
||||
|
||||
As of `d788afc12`, before the work in the Status lines below.
|
||||
|
||||
Paths are under [`app/src/main/java/com/droiddeck/launcher/`](../../app/src/main/java/com/droiddeck/launcher/).
|
||||
|
||||
**Panels.** [`input/SecondScreenMode.kt`](../../app/src/main/java/com/droiddeck/launcher/input/SecondScreenMode.kt) lists the modes: menu, keyboard + trackpad, terminal, Deck grips + trackpads, profile controls, dashboard and the KDE desktop. [`ui/SecondScreenPresentation.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/SecondScreenPresentation.kt) hosts them in a `Presentation`, with the bar in [`ui/BottomScreenBar.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomScreenBar.kt). The last mode is remembered once for game sessions and once for desktop sessions (`SessionPrefs.secondScreenPanel`), not per game. Outside a session the launcher shows [`ui/DualScreenPanel.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/DualScreenPanel.kt).
|
||||
|
||||
**Dashboard.** [`ui/BottomDashboard.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomDashboard.kt) has In-game stats, Downloads, Screenshots and Chat & voice. The tab is remembered per session and jumps to stats when a game starts. A strip of metrics ([`ui/BottomStrip.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomStrip.kt)) can sit on the other tabs.
|
||||
|
||||
**Displays.** [`input/DualScreen.kt`](../../app/src/main/java/com/droiddeck/launcher/input/DualScreen.kt) finds built-in presentation displays with their own touch panel. Sessions support Auto, On, Swapped (game on the bottom, [`ui/BottomGameScreen.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomGameScreen.kt)) and Off. The game is rendered by our compositor into a `SurfaceView` we own, not by a separate activity. [`input/BottomScreenGuests.kt`](../../app/src/main/java/com/droiddeck/launcher/input/BottomScreenGuests.kt) yields the screen when another app takes it.
|
||||
|
||||
**Data already available.**
|
||||
|
||||
- Frame times from gamescope's ring buffer ([`hud/GameFrames.kt`](../../app/src/main/java/com/droiddeck/launcher/hud/GameFrames.kt)), with lows, graph, focused app and refresh rate.
|
||||
- Device metrics ([`hud/HudMetrics.java`](../../app/src/main/java/com/droiddeck/launcher/hud/HudMetrics.java)): CPU/GPU load, clocks and temperatures, RAM, VRAM, network, battery with a runtime estimate, fan.
|
||||
- Game telemetry ([`session/GameTelemetry.kt`](../../app/src/main/java/com/droiddeck/launcher/session/GameTelemetry.kt)): racing UDP, War Thunder over local HTTP, Elite Dangerous status file.
|
||||
- Steam downloads from app manifests and `content_log.txt`, screenshots from DroidDeck and Steam, Steam chat in a WebView with the web-login cookies.
|
||||
- `AgentGuest.steamEval` runs `SteamClient.*` in Steam's UI. Only offline mode and live shortcuts use it today.
|
||||
- Per-game profiles ([`session/SelectedGameProfile.kt`](../../app/src/main/java/com/droiddeck/launcher/session/SelectedGameProfile.kt)) that follow the game Steam has focused (`GameProfileFollowState`).
|
||||
|
||||
**Gaps.**
|
||||
|
||||
- The panel does not follow the game: no per-game mode, tab or control layout.
|
||||
- With no game running, the stats card measures the Steam client.
|
||||
- No Steam achievements, friends or notifications on the bottom screen. Achievements exist only for Epic, GOG and EA. The 0.7.0 notes mention a notifications page that no longer exists.
|
||||
- No way to switch the bottom panel fully off or dim it when idle.
|
||||
- [`settings-map.md`](../settings-map.md) lists only "Dual screen launcher". Dual screen sessions, Show the game on, Bottom screen controls in games, Bottom screen HUD, Strip on every tab and Physical controls can use bottom screen are missing.
|
||||
|
||||
DroidDeck already has more on the bottom screen than any other project that runs PC games. What it lacks is context: it does not react to what is on top.
|
||||
|
||||
## Proposals
|
||||
|
||||
Ordered by value for effort. Each is independent unless noted.
|
||||
|
||||
### 1. Idle home page
|
||||
|
||||
**Status:** built as its own panel, Game art (Steam sessions), after a first version as a row on the dashboard was removed. The bottom screen shows the hero art of the running game, or the one selected in Big Picture, or the most recently played, with a slow pan and zoom, its logo, and play time; it cross-fades when the selection changes and starts with the bar hidden. Checked on a Retroid Pocket Duo Lite Plus. Code: [`ui/BottomArtPanel.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomArtPanel.kt), selection in [`ui/BottomIdleHome.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomIdleHome.kt).
|
||||
|
||||

|
||||
|
||||
When no game is focused, replace the Steam-client FPS card with a page about the game highlighted in Steam: art, play time, last played, achievement progress, and Play / Stream buttons. Add downloads in progress and friends online.
|
||||
|
||||
- Source: the Big Picture selection and app details through `steamEval`, as ArmadaLive does over the CEF port. Art from the existing `SteamGameArt`.
|
||||
- Open question: which `SteamClient` call or store gives the focused library item most reliably across client updates. ArmadaLive lists this as fragile; we need a fallback to the most recent game.
|
||||
|
||||
### 2. Per-game panel memory
|
||||
|
||||
**Status:** built. Picking a bottom mode or a dashboard tab while a game is focused saves it for that game (`secondScreenPanel.app.<id>`, `bottomPage.app.<id>`); focusing the game restores it, and returning to Steam restores the global choice. Resetting the game profile clears both. Control layouts already follow the game through input profiles. Not yet checked on hardware: launching a game on the test device would have signed out another session on the same Steam account.
|
||||
|
||||
Remember the bottom mode, dashboard tab and control layout per Steam app id, and restore them when that game gains focus. Fall back to today's global choice.
|
||||
|
||||
- Source: the focus already tracked for `GameProfileFollowState`. Store next to the game profile so Reset clears it.
|
||||
- Applies to swapped mode too, where the panel is on the top screen.
|
||||
|
||||
### 3. Steam achievements and notifications
|
||||
|
||||
**Status:** achievements built, as a section of the Guides panel rather than a dashboard tab. They are read from `SteamClient.Apps.GetMyAchievementsForApp` into the shared `StoreAchievements` model (same list and hidden-achievement handling as Epic and GOG); games without Steam stats show the empty state. Notifications are not started.
|
||||
|
||||
An achievements page for the running game (progress, recent unlocks, locked list with hidden descriptions behind a tap) and a notifications page (friends, invites, downloads finished).
|
||||
|
||||
- Source: `steamEval` against Steam's UI stores, which keep the last synced achievements while the device is offline. The Steam Web API is a fallback only when the device has a network but the Steam client is offline; with no network, the page shows the cached list or says achievements are unavailable.
|
||||
- Matches the existing Epic, GOG and EA achievement readers so all stores look the same.
|
||||
|
||||
### 4. Quick tiles and per-game rules
|
||||
|
||||
**Status:** not built. A first tile page was tried and removed: the in-game menu already has these controls, and a second copy on the dashboard did not fit the panel's style.
|
||||
|
||||
Rearrangeable tiles on the dashboard: FPS limit, 60/120 Hz, per-screen brightness, frame generation, screen effects, screenshot, swap screens, bottom screen off. A "Keep for this game" action saves the value into the game profile; settings that can make the device unusable revert after 15 s unless confirmed.
|
||||
|
||||
- Most of these are already per-game somewhere (frame generation, screen effects, FPS limit for non-Steam games). This exposes them where the user is looking during play.
|
||||
|
||||
### 5. Bottom screen off and auto-dim
|
||||
|
||||
**Status:** built and checked on a Retroid Pocket Duo Lite Plus, where the window brightness override is per display: screen off sets the bottom display to 0.0 and auto-dim to 0.05 (`mBrightnessReason=override(com.droiddeck.launcher)`), while the top display stays at the user's manual level. Every panel's bar has a sun button that drops down a brightness slider for the bottom screen only (5–100 %, saved; it never reaches 0) with the screen-off button at its end: the panel goes black and asks for the lowest window brightness (`BRIGHTNESS_OVERRIDE_OFF`); a touch wakes it to the chosen level, and the waking touch does not reach the panel. Auto-dim never brightens a level set below it. The dashboard dims after 60 s without touch (pref `bottomAutoDim`, on by default); trackpad and keyboard panels never dim. Hardware buttons are not claimed.
|
||||
|
||||
- A real off state for the bottom panel during a game (the backlight off, not a black Presentation), toggled from the bar or a button hold.
|
||||
- Dim after a period without touch, wake on touch. Off by default for the trackpad and keyboard modes.
|
||||
- Investigate which hardware buttons we can claim on the Thor and Duo without fighting the stock assistant.
|
||||
|
||||
**Bar:** every panel's bar can be hidden with its chevron button; a pull tab at the top edge brings it back by a tap or a pull down. Game art, a page open in the Guides reader and a pinned map hide it on their own, and leaving them shows it again.
|
||||
|
||||
| Brightness | Bar hidden |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
|
||||
### 6. Region mirror from our compositor
|
||||
|
||||
**Status:** milestone 1 built as its own bottom-screen panel (Mirror in the panel picker): the live region fills the panel, and Region, Top screen (shown, hidden or dimmed) and Scaling open as a card from the bar's options button. Checked on a Retroid Pocket Duo Lite Plus; see the region mirror doc.
|
||||
|
||||
Crop rectangles of the game image (minimap, HUD, ability bars) onto the bottom screen, saved per game, optionally hidden on the top screen. Other Thor tools need MediaProjection or a privileged helper and cannot hide the original; our compositor has the game image before display, so it can do both with no permission prompt. Recommended path: a second output in `vk_present` that blits region sub-rectangles, with zero-copy layers later.
|
||||
|
||||
Details: [bottom-screen-region-mirror.md](bottom-screen-region-mirror.md).
|
||||
|
||||
### 7. Guides panel
|
||||
|
||||
**Status:** milestones 1 and 4 built as their own bottom-screen panel (Guides in the panel picker), checked on a Retroid Pocket Duo Lite Plus. Five sections, switched with the app's tab strip and LB/RB, for the running game or the one selected in Steam: Guides (top-rated Steam guides in the device's language with a category choice and Continue reading), Achievements, Wiki & fixes (ProtonDB tier, and the wiki, StrategyWiki, PCGamingWiki, GameFAQs, IGN and HowLongToBeat through Wikidata; what Wikidata lacks is found from each site's own routes, such as Map Genie and IGN wiki slugs, Fandom's API and StrategyWiki's search API, so every row opens the page itself rather than a web search; only YouTube walkthroughs stay a search), Maps (images pinned by long-press, with zoom and markers per map, and the game's Map Genie page) and Saved (web archives for offline reading). The reader never takes focus, blocks common ad hosts and stays on the opened site unless the user follows a link. Code: [`session/SteamGuides.kt`](../../app/src/main/java/com/droiddeck/launcher/session/SteamGuides.kt), [`session/GameLinks.kt`](../../app/src/main/java/com/droiddeck/launcher/session/GameLinks.kt), [`ui/BottomGuidesPage.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomGuidesPage.kt).
|
||||
|
||||
A per-game tab with Steam Community guides for the exact app id, Steam achievements as a spoiler-safe checklist, the game's wiki and fixes (found through Wikidata), saved pages for offline use, and a workspace that reopens at the last section. It must never take focus from the game, and pauses pages it is not showing.
|
||||
|
||||
Details: [bottom-screen-guides.md](bottom-screen-guides.md).
|
||||
|
||||
### 8. Companion API for PC games
|
||||
|
||||
**Status:** not built here; the first adapters (Stardew Valley, Skyrim SE, Fallout 4) follow in their own change.
|
||||
|
||||
Let mods running in Proton drive native bottom-screen pages over loopback. Thor Pip-Boy (Fallout 4) and Grand Theft Companion (GTA) already run against DroidDeck as separate apps, and the Stardew, Skyrim and RimWorld ecosystems have servers we can adapt to. Plan: adapters for those first, then DroidDeck's own token-authenticated protocol with declarative pages and normalized state keys, then "run on bottom", then memory profiles only if needed. The existing racing, War Thunder and Elite Dangerous telemetry is the first set of built-in adapters.
|
||||
|
||||
### 9. Steam's Quick Access menu on the bottom screen
|
||||
|
||||
**Status:** built as its own panel (Quick Access in the panel picker, Steam sessions only) and checked on a Retroid Pocket Duo Lite Plus in Big Picture and in a game. The bottom screen shows Steam's real Quick Access menu: notifications, friends and chat, quick settings, performance, soundtracks and help, plus Decky Loader's tab and its plugins when Decky is enabled. Taps, drags and scrolling go to it; the controller stays on the top screen, so the d-pad drives the library or the game while the menu stays open. Code: [`session/SteamQam.kt`](../../app/src/main/java/com/droiddeck/launcher/session/SteamQam.kt), [`ui/BottomSteamQamPanel.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomSteamQamPanel.kt), [`droiddeck-qam-relay`](../../tools/linuxfs/overlay/usr/local/bin/droiddeck-qam-relay).
|
||||
|
||||
Plugin loaders expose Steam's CEF DevTools so the menu can be viewed in a desktop browser, but it renders only while it is open on the main screen. The panel keeps it open without covering the top screen:
|
||||
|
||||
- Steam's UI is told to open the menu and keep it open: its composition request is capped at "notification" while the menu is ours, so gamescope keeps focus on the game, and losing focus no longer closes it. Gamepad focus moves from the menu back to the main UI only when the menu took it, so Steam's own popups keep the controller. The blurred backdrop is hidden.
|
||||
- The menu's browser view is placed just outside the Big Picture window through its own `SetBounds`, so it keeps rendering but never shows on top, including while Steam slides it wider for Friends and chat. The view is also given the panel's shape (about 712 × 463 instead of Steam's 856 × 463), so every tab shows at one scale. In Full width, a style on the menu page also lifts Steam's 300 px cap on each tab, so every tab fills the panel and Friends shows its list and chat side by side.
|
||||
- A timer inside Steam keeps this state every 250 ms, so the menu comes back, on the tab it was showing, as soon as Steam's main menu or a full-screen page such as Decky's store closes. It runs on a 5 s lease that the panel renews each second: if the app stops, Steam returns to normal by itself.
|
||||
- The hold starts only once the session is ready: holding the menu before Steam's first frame kept gamescope from presenting anything.
|
||||
- `droiddeck-qam-relay` relays the app to the DevTools port, which only answers clients inside the guest. The panel streams the menu with `Page.startScreencast`, scales its content to the panel and fills the rest with the menu's own background, and forwards touches on the menu with `Input.dispatchTouchEvent`. A layout button in the panel's bar cycles Full width (every tab stretched to the panel), Left, Center and Right (Steam's own narrow tabs, placed on that side); the choice is kept. Returning to the panel shows the last frame at once while the stream reconnects, and the first frame after a cold start takes about 1.4 s.
|
||||
- The Quick Access button still shows the menu on the top screen, in Steam's own layout and with the controller; closing it there (B or the button again) returns it to the bottom screen on the same tab.
|
||||
- Leaving the panel closes the menu and turns the patches off; the Steam button and the normal Quick Access button then work as before. Opening Steam's main menu replaces the Quick Access menu for as long as it is open, as on a Deck.
|
||||
|
||||
Checked with Decky Loader 3.3.1 enabled: its tab renders and takes touch, and its store opens full screen on top with the controller, then returns to the Decky tab below. Decky hooks the menu after Steam starts, so the panel reopens it once when that happens.
|
||||
|
||||
Limits: it relies on Steam's minified UI stores and method names, so a client update can break it; the panel then shows that the menu is not available.
|
||||
|
||||
| Big Picture, friends | In game, performance | In game, quick settings |
|
||||
| --- | --- | --- |
|
||||
|  |  |  |
|
||||
|
||||
| Decky | Performance |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
|
||||
| Layout: Center | Layout: Right |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
|
||||
The top screen during that game, with the menu open on the bottom: 
|
||||
|
||||
## Related fixes
|
||||
|
||||
- Add the missing dual-screen settings to `SettingsIndex` and regenerate [`settings-map.md`](../settings-map.md).
|
||||
- Reproduce a first install on a Thor from a clean state, including with Steam on the SD card, against 0.7.11 to confirm the reported freeze is gone.
|
||||
@@ -13,6 +13,7 @@ EA games install, update and start without the EA app. The research behind it is
|
||||
| Downloads | Rust `src/ea/` in `libdroiddeckstores.so`, `EaInstaller.kt` | A build is one ZIP on EA's CDN. The engine reads its central directory with ranged reads, keeps files whose size and CRC match, and streams every other entry through inflate into place. `.droiddeck-ea-files` records what it placed, so a resume or update does not re-hash those files; files a new build drops are removed. |
|
||||
| Updates | `EaUpdates` in `EaBackend.kt` | The game page compares the installed version with the offer's live `gameVersion` (every 30 minutes at most). Update runs the same install, which only fetches changed files. |
|
||||
| Launch, guest | `droiddeck-store-launch` (`prepare_ea`) | Creates the prefix, reads the machine as Wine reports it (`wmic`, `vol`, `hostname`, CPUID from a 32-bit and a 64-bit probe; cached in `pfx/.droiddeck-ea-hw.json` until the Proton version or its FEX libraries change; a probe that times out, fails or misses a value keeps the older complete cache), writes EA app presence keys and the game's `Install Dir` keys in both registry views, runs the build's Touchup once per installed build, then asks the app for the session and writes any licence files. |
|
||||
| Launch, Steam copy | `prepare_steam_ea` in `droiddeck-store-launch`, the Proton wrapper | Steam starts its EA titles with `steam2ea://`, which only the EA app handles, and the EA app does not install here. When the prefix has no EA app, the hook reads the game's `__Installer/installerdata.xml` and its offers (`__Installer/LOC/Origin.OFR.*.dat`), runs `prepare_ea` with a `steam` request (the app answers with the launch environment instead of a sidecar file), and writes `droiddeck-ea-steam.bat` in the game's compatdata. The wrapper runs that launcher in place of the link. Writing the EA app presence keys also satisfies the install script, so Steam stops running the EA app installer. |
|
||||
| Launch, app | `EaLaunch.kt`, `EaOoa.kt`, `EaLsx.kt` | Answers `ea-prepare`: starts the LSX endpoint on `127.0.0.1:3216`, mints the short-lived opaque token, writes `.droiddeck-ea-env` (read once and deleted by the launcher `.bat`), and for games with a `Core` folder requests an online-activation licence for the machine hash. |
|
||||
| LSX | `EaLsx.kt` | The local endpoint EA's SDK talks to instead of the EA app: challenge, AES session key, config, profile, settings, game info, auth codes for the game's own client ids, licences with Denuvo tokens, entitlements. Friends, presence and the overlay answer empty. |
|
||||
|
||||
@@ -28,6 +29,5 @@ only the 32-bit values, and every game gets those until a probe with Proton foun
|
||||
## Not done yet
|
||||
|
||||
- Cloud saves (`cloudsync.juno.ea.com`).
|
||||
- Steam copies of EA games still install the EA app (#2036).
|
||||
- Pre-DiP games (no `installerdata.xml`) fall back to the exe picker.
|
||||
- Javelin anti-cheat games do not run under Proton.
|
||||
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 341 KiB |
|
After Width: | Height: | Size: 760 KiB |
|
After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 642 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 463 KiB |
|
After Width: | Height: | Size: 359 KiB |
|
After Width: | Height: | Size: 265 KiB |
|
After Width: | Height: | Size: 486 KiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 285 KiB |
|
After Width: | Height: | Size: 215 KiB |
|
After Width: | Height: | Size: 162 KiB |
|
After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 792 KiB |
@@ -212,6 +212,12 @@ more, so its fix removes both variables, also from its launch options, and sets
|
||||
`vk_x11_strict_image_count=true`, the option Mesa's driconf gives the game. A
|
||||
per-game value in the environment editor still wins.
|
||||
|
||||
Dragon Quest Monsters 4 does not draw slime bodies at its default monster mesh
|
||||
detail, leaving only their tips. Before each launch, DroidDeck sets
|
||||
`r.SkeletalMeshLODBias=-4` and `r.SkeletalMeshLODRadiusScale=0.25` under
|
||||
`[SystemSettings]` in the game's `Engine.ini`. It does this every time because the
|
||||
game ignores `-ini:` overrides and deletes a writable `Engine.ini` after reading it.
|
||||
|
||||
## Defaults and available suggestions
|
||||
|
||||
The initial configuration enables Mesa shader caching with
|
||||
@@ -293,6 +299,12 @@ configuration falls back to the inherited environment without evaluating its
|
||||
contents. Both component and environment selection normalize signed non-Steam
|
||||
prefix IDs to unsigned IDs.
|
||||
|
||||
A Dragon's Dogma 2 launch (Steam app 2054970) appends the game's own
|
||||
`/WineDetectionEnabled:False` switch: the game checks for Wine and its Wine path
|
||||
does not start. The switch is added only at launch, never to Steam's stored
|
||||
Launch Options, and a user's own `/WineDetectionEnabled:` value in Launch
|
||||
Options keeps priority and is not repeated.
|
||||
|
||||
The published file also carries generated `dxvkConfig` and `dxvkConfigGames`
|
||||
values the app's own file never has. The session menu's texture filtering
|
||||
(`core/TextureFiltering`) becomes `d3d9/d3d11.samplerAnisotropy` and
|
||||
|
||||
@@ -105,7 +105,11 @@ is left, so a process that is not paging out has no thread the preload added. Pr
|
||||
check they are single-threaded before they fork or call `unshare(CLONE_NEWUSER)`, such as
|
||||
Chromium's zygote, keep working. The worker is a bare `clone` with the flags of a normal
|
||||
thread, on a stack the preload maps itself, and makes only raw system calls, so starting it
|
||||
from the signal handler is safe and seccomp filters that only allow thread clones accept it. A
|
||||
from the signal handler is safe and seccomp filters that only allow thread clones accept it.
|
||||
Because those calls bypass the native userland hook (Run without proot), which maps guest paths
|
||||
only inside libc, the preload adds `DDNATV_ROOT` to `/tmp/.dd-zram` and its hold, trim and ack files
|
||||
once at startup. Without it, no process of a native session installed the handler and every
|
||||
request was ignored. A
|
||||
process that has a single thread, or whose signalled thread added a seccomp filter after the
|
||||
process started, as browser sandboxes do, gets no worker. When there is no worker, the process trims inline in steps of at most 32 MiB per request and
|
||||
looks at no more than 512 MiB of its address space each time. The page-out for a suspend and the read-back
|
||||
|
||||
@@ -215,6 +215,15 @@ Still to check by hand: pasting Android text into a game.
|
||||
Force fullscreen is still unsafe without a matching Game Resolution: with the default (native),
|
||||
a game drawing at another size fights it as in run 4. It stays off by default.
|
||||
|
||||
## Stretch 16:9 with two Xwayland servers
|
||||
|
||||
With "Stretch 16:9 to panel" the games' server starts at the 16:9 nested size, but the client sets it
|
||||
to the output size at every launch (run 7), so games saw a near-square screen and letterboxed
|
||||
themselves. While stretching, the session script rewrites a `GAMESCOPE_XWAYLAND_MODE_CONTROL` that
|
||||
sizes the game server (`1`) to exactly the output into the nested size with `allow_super_res` set,
|
||||
since gamescope otherwise clamps it to the output. A Game Resolution chosen in Steam is a different
|
||||
size and is kept.
|
||||
|
||||
## Force fullscreen removed (`feat/remove-force-fullscreen`)
|
||||
|
||||
With games on their own Xwayland server, FlatOut 2 no longer shrinks under the QAM, which was the
|
||||
|
||||
@@ -60,7 +60,9 @@ missing prefix is removed first, and nothing is copied.
|
||||
|
||||
The account's `.droiddeck-routes.json` maps shortcut IDs to real Steam app IDs so the
|
||||
Android launcher uses the same title and Proton prefix as Steam. Other accounts do not
|
||||
inherit those routes. Managed shortcuts are replaced; user-created shortcuts and
|
||||
inherit those routes. A program chosen in DroidDeck other than the folder's default executable (for example a mod
|
||||
launcher beside the game's own executable) is never routed: it stays its own shortcut and tile.
|
||||
A target set in the Steam shortcut's properties keeps the route. Managed shortcuts are replaced; user-created shortcuts and
|
||||
unreadable shortcut files are preserved. Both routes use the existing ARM64 Proton
|
||||
registration.
|
||||
|
||||
|
||||
@@ -197,6 +197,13 @@ The appid Steam derives (CRC32 of the quoted exe plus the name, high bit set) is
|
||||
listing carries, so the live add and the writer never disagree. Uninstall removes the folder and the
|
||||
listing drops the entry; the live client is asked to remove it too.
|
||||
|
||||
`droiddeck-steam-shortcuts` merges each entry against the one Steam holds: a Target or Start In
|
||||
edited in Steam survives the client's restart. A target whose file is gone is not an edit to keep -
|
||||
it can only fail before the game starts - so the listing's exe replaces it, checked in the guest
|
||||
where the shortcut's paths live, as long as the folder holding it exists (a missing folder can be an
|
||||
unmounted card). #694 was a hand-typed Target that outlived the game update that removed its file,
|
||||
so every launch died with Wine's `Failed to create process ...: 2` before the game ran.
|
||||
|
||||
`Library.SteamGame.source` is `steam`, `gog`, `epic`, `amazon` or `added`; the Library shows it as
|
||||
a chip on every tile and in the hero, and filters by it.
|
||||
|
||||
|
||||
@@ -131,6 +131,18 @@ The client's web helper draws its whole UI. There are two:
|
||||
blank. `LinuxRuntime` binds an empty folder over `/sys/bus/pci/devices` on such devices; device:
|
||||
0 GPU process exits, ANGLE on zink and Turnip.
|
||||
|
||||
FEX ships per-program AppConfigs, and `/usr/local/share/fex-emu/AppConfig/steamwebhelper.json` turns
|
||||
the GL thunk off for every program named `steamwebhelper`. A program's AppConfig is read after
|
||||
`FEX_THUNKCONFIG`, so the x86 helper got the rootfs's x86 Mesa while the client next to it had the
|
||||
thunk. Steam's browser compositor creates its output window through SDL3 and GLX in the helper's
|
||||
browser process, and x86 Mesa's `driCreateNewScreen3` (kisak libgallium 26.1.6) faulted there
|
||||
(SIGSEGV, exit 139) about 11 s after every start; the client restarted it each time (device: 57
|
||||
restarts in 11 minutes). `x64_env` therefore writes, for every global AppConfig that turns off a
|
||||
thunk the session uses, a local AppConfig (`$X64_HOME/.config/fex-emu/AppConfig/<name>.json`, read
|
||||
after the global one) with the session's thunk set. It never touches a local file with other content,
|
||||
so a user's own AppConfig wins, and removes its own files when the client runs in software. Device:
|
||||
helper up for over 10 minutes with no restart, ANGLE on zink and Turnip through the thunk.
|
||||
|
||||
The session shim (`preload/net.c`) turns `steamrt64/steamwebhelper.sh`'s exec of `./steamwebhelper`
|
||||
into `DD_X64_ARM_WEBHELPER`. Nothing in the client's folder is edited: the client checksums its files
|
||||
as it starts and reinstalled itself over an edited launcher (2-3 minutes) on every start.
|
||||
@@ -197,13 +209,109 @@ alone would then read as an installed client.
|
||||
restarted from the top forever (found with `perf_event_open` IP sampling, since proot holds
|
||||
ptrace). Such a range is now skipped whole and a second exhausted scan returns `-ENOMEM`, as the
|
||||
kernel does (`fex-2610-r3`).
|
||||
- `0006-smc-alias-of-code-created-after-translation`: a JIT with a double-mapped memfd (CoreCLR's
|
||||
W^X allocator) maps its writable alias after the executable alias was translated. Under
|
||||
`SMCChecks=mtrack` the new alias was not write-protected, so writes through it never faulted and
|
||||
never invalidated the translated code; x86-64 .NET programs ran stale code (access violations,
|
||||
NullReferenceException, internal CLR errors). A writable mapping or mprotect now write-protects the
|
||||
overlapping part of any alias that is already executable, so the first write faults and invalidates.
|
||||
`FEX_SMCCHECKS=full` was the only workaround; no setting is needed with the patch.
|
||||
- `0007-cmake-install-code-without-depends`: CMake 4.5 rejects the `DEPENDS` argument FEX passes to
|
||||
`install(CODE ...)` for the guest thunk libraries, so builds with host thunks stopped at configure.
|
||||
The guest libraries are external projects in the default build, which `install` already follows.
|
||||
- `0008-signal-return-restores-syscall-state`: a guest `rt_sigreturn` is a system call, so FEX's
|
||||
syscall stub marks every static register as spilled (`InSyscallInfo = 0xFFFF`). When the handler
|
||||
left RIP alone, the return resumed the interrupted JIT code without passing the stub's reset, and
|
||||
the mark stayed. Every asynchronous signal after that (until the next system call ended) skipped the
|
||||
register spill and handed the guest handler stale registers from the last system call: only RIP was
|
||||
right. CoreCLR suspends threads for the GC with such signals and reads or redirects the interrupted
|
||||
context, so x86-64 .NET programs failed at random (`AccessViolationException` in whatever code ran
|
||||
next, then SIGABRT). `tools/fex/probes/async-signal-context.c` shows it: under FEX-2611.1 one signal in
|
||||
2000 carried the interrupted registers, natively all of them. The return now restores the value saved
|
||||
when the signal arrived, and only when the signal interrupted JIT code, which is the only case that
|
||||
saves it. Restoring it for a signal that interrupted a system call cleared the mark while that call
|
||||
was still running, so the next signal in the call's return path spilled clobbered registers:
|
||||
`setitimer` at 100 Hz around `time()` crashed in 15 of 15 runs, and with the guard as often as the
|
||||
same build without the patch (about half; a separate crash that FEX-2611.1 also shows).
|
||||
- `0009-signal-handler-escape-frees-host-stack`: FEX keeps each signal's host context on the host
|
||||
stack and frees it only on `rt_sigreturn`. A guest that leaves its handler another way (`siglongjmp`,
|
||||
or CoreCLR resuming a `catch` after a NullReferenceException) left that 2 KB block and one
|
||||
`SignalHandlerRefCounter` count behind. About 3500 such exceptions on one thread overran the 8 MB
|
||||
host stack, which has no guard page, and the CurseForge agent died with "Internal CLR error.
|
||||
(0x80131506)" and "Stack overflow occurred on the same thread again!" at the start of its second
|
||||
addon scan. FEX now chains each thread's signal frames with the guest frame range and alternate
|
||||
stack they used. When a signal arrives in JIT code that runs at the host level of the newest frame
|
||||
and the guest stack pointer shows the guest has left that frame (above its frame, or back off the
|
||||
alternate stack above where the outermost frame on it interrupted), the left frames are dropped and
|
||||
the new context is stored where the newest live frame (or the dispatcher entry) left the host stack.
|
||||
`rt_sigreturn` pops its frame and any newer ones it skips. Signals that arrive inside system calls or
|
||||
thunk callbacks are left alone. `tools/fex/probes/signal-handler-escape.c` leaves handlers on and
|
||||
off the alternate stack, mixes them with handlers that return, and leaves nested handlers: FEX-2611.1
|
||||
with 0001 to 0008 crashed (SIGSEGV) before 2000 iterations of it, and `siglongjmp` out of a SIGSEGV
|
||||
handler died after about 3500; with this patch 350000 escapes and 200000 straight `siglongjmp`s
|
||||
finish, as natively. The approach is the one suggested in FEX-Emu/FEX#2487.
|
||||
- `0010-syscall-exit-resets-host-stack` (`Fixed-upstream: FEX-2612`): a backport of FEX's
|
||||
"JIT: Ensure IR ops that jump out of the JIT reset the stack" (FEX-Emu/FEX#6122). A system call or
|
||||
code-entry removal that ends a block jumps to the dispatcher without dropping the block's spill
|
||||
slots, and the syscall handler's fast path branches straight into the next block, so every such
|
||||
exit leaked up to 32 bytes per spill slot of host stack. AVX and MMX code keeps enough values live to
|
||||
spill, and `tools/fex/probes/syscall-host-stack.c` overran the 8 MB host stack after about 65000
|
||||
system calls; with the patch 2000000 finish, as natively. The CPUID hunk of the upstream commit is
|
||||
left out, since CPUID returns to the JIT in 2611.
|
||||
- `0011-thunk-calls-mark-spilled-state`: a thunk call (every vDSO `clock_gettime`, `gettimeofday`
|
||||
and `time`, and the host library thunks) spills the static registers to the guest frame and calls
|
||||
host code, which clobbers the caller-saved host registers. A signal that arrived in the JIT code
|
||||
after the host call returned and before the registers were refilled took the interrupted state from
|
||||
those clobbered host registers: the guest handler got garbage registers, and the interrupted code
|
||||
resumed with them, or FEX built the signal frame at a garbage stack pointer and crashed. The thunk
|
||||
call now marks every static register as spilled (`InSyscallInfo = 0xFFFF`, as the system call
|
||||
handler does) until the refill ends, and a fully spilled mark takes only RIP from the host PC and
|
||||
leaves the frame's GPRs, vector registers and flags alone (the 16-bit mask could not name the
|
||||
x16/x17 and v16 to v31 registers the host call clobbers). Every guest signal now saves and clears the
|
||||
mark, so guest handlers and nested signals never inherit it, and every return puts back the value it
|
||||
saved; 0008 restored it only for JIT code because the other paths saved none. A handler that changes
|
||||
RIP restarts at the dispatcher with no mark, and thunk callbacks into guest code run with none.
|
||||
`tools/fex/probes/vdso-signal-state.c` calls `clock_gettime` under a 1 kHz `SIGALRM` and checks the
|
||||
values held across each call: FEX-2611 crashed in 3 of 8 runs, with 0001 to 0010 in 7 of 8; with
|
||||
this patch 0 of 28, as natively. This was the "separate crash" noted under 0008.
|
||||
- `0012-signal-return-applies-guest-registers`: a signal return that kept RIP threw away every
|
||||
register change the guest handler made in its `ucontext`; only a changed RIP made FEX reload the
|
||||
guest state from it. CoreCLR suspends threads for garbage collection with a signal and, in fully
|
||||
interruptible code, runs the collection from that handler and writes the moved object references
|
||||
back into the interrupted registers, so under FEX the thread resumed with pointers into the old heap.
|
||||
The CurseForge agent's crashes during parallel addon scans (an `AccessViolationException` in
|
||||
`Curse.Hashing.MurmurHash2.ComputeHash` or `RegexInterpreter`, or "Internal CLR error. (0x80131506)"
|
||||
with a stack overflow) look like this, but they still happen with this patch, so it is not a fix for
|
||||
them. When RIP is
|
||||
unchanged, each guest GPR the handler changed is now written where the resumed code reads it: the
|
||||
guest frame for registers the interrupted code had spilled (all of them inside a system call or
|
||||
thunk call), otherwise the static host register. Unchanged registers are left alone, signals that
|
||||
interrupted code outside the JIT (and not inside a system call or thunk call) keep the old
|
||||
behaviour, and 32-bit frames compare and write only the low 32 bits. `tools/fex/probes/signal-register-update.c`
|
||||
spins until a `SIGALRM` handler sets a register (R12, or ESI in 32-bit `rt` and legacy frames):
|
||||
FEX-2611.1 with 0001 to 0011 never sees it in any of the three frame types, with this patch all
|
||||
three see it on the first signal, as natively.
|
||||
- `0013-path-syscalls-through-libc`: FEX passes most path system calls of the guest (`mkdirat`,
|
||||
`unlinkat`, `renameat`, `renameat2`, `symlinkat`, `linkat`, `mknodat`, `fchmodat`, `fchmodat2`,
|
||||
`fchownat`, `utimensat`, `truncate`, `chdir`, `chroot`, `inotify_add_watch`) straight to the kernel
|
||||
with an inline `svc`, which the native userland's path hook never sees, so an x86-64 program wrote
|
||||
`/opt/...` or `/root/...` to the Android root instead of the rootfs, and `cd` into a rootfs folder
|
||||
failed. They now go through libc's `syscall()`, which the hook maps like every other path; without
|
||||
the hook it is the same system call. `tools/tests/test_native_hook_path_syscalls.py` checks the hook
|
||||
side, including that an allocator which opens files before the hook has started does not hang.
|
||||
FEX also mirrors each guest signal handler with `syscall(SYS_rt_sigaction, ...)`; for `SIGSYS` the
|
||||
hook records the guest handler as it does for `sigaction()` and keeps its own installed, so a
|
||||
program that sets a crash handler is no longer killed by the next blocked system call
|
||||
(`tools/tests/test_native_hook_sigsys_mask.py`).
|
||||
- **Building and publishing.** Droid-Deck/DroidDeck-Components' `build-fex.yml` builds `tools/fex` from
|
||||
this repository at a chosen ref (default `main`) with host thunks, in the same Arch Linux ARM container
|
||||
with a read-only token, then a separate job replaces `fex.tzst` on Components' single `fex` release,
|
||||
checks the digest GitHub stored, and records the build's version, sha256 and size in its `fex.json`
|
||||
(in that order: a device that reads the old `fex.json` meanwhile gets a mismatching archive and keeps
|
||||
its FEX). This repository's `build-fex.yml` only builds `tools/fex` when it changes (and on dispatch,
|
||||
for diagnostic builds such as `-DDEBUG_STRACE`); nothing is published from it.
|
||||
for diagnostic builds such as `-DDEBUG_STRACE`); nothing is published from it. It builds FEX's latest
|
||||
release, point releases (`FEX-2611.1`) included; `build-in-arch.sh` takes the tag from `FEX_VERSION`
|
||||
and compares only its four-digit release against a patch's `Fixed-upstream`.
|
||||
- Releases so far: `fex-2609-r2` (no thunks), `fex-2609-r3` (thunks), `fex-2610-r1`, `fex-2610-r2`,
|
||||
`fex-2610-r3`, `fex-2610-r4` (in-root resolution when openat2 is missing, exact MAP_32BIT
|
||||
marking), `fex-2610-r5` (current: bundles libxxhash, which the Linux runtime does not ship; the
|
||||
|
||||
@@ -240,3 +240,65 @@ extended gameplay stability need hardware validation. One successful view/motion
|
||||
check does not establish long-session stability. Users must select Follow mode and disable the glasses' own
|
||||
stabilization. Factory calibration and XREAL Eye/6DoF are not implemented.
|
||||
One Pro is not enabled or claimed as tested.
|
||||
|
||||
## Native 1 Pro+ implementation and hardware validation — 2026-11-13
|
||||
|
||||
The attached device identifies as USB `3318:0444`, product `XREAL 1 Pro+`. This exact
|
||||
identity enables the experimental 1 Pro+ profile alongside the existing 1S profile.
|
||||
The [official specifications](https://tutorials.xreal.com/docs/glasses/pro-plus/specifications/)
|
||||
give 1920×1080 per eye and a 57° diagonal field of view. The direct Kotlin driver
|
||||
uses the USB-Ethernet control and IMU services; it requires no XREAL SDK or
|
||||
ControlGlasses installation and includes no vendor SDK binaries or headers.
|
||||
|
||||
Verified on the connected phone and glasses:
|
||||
|
||||
| Observation | Result |
|
||||
| --- | --- |
|
||||
| Control and IMU transport | Individually bound Android Ethernet sockets reach `169.254.2.1:52999` and `:52998` without replacing the default Internet network. |
|
||||
| Native display | `GET_DISPLAY` (`0x275e`) returns **9**, with Android reporting **1920×1080 at 60 Hz**. This profile preserves mode 9 for native 60 Hz instead of the 1S's mode 29. |
|
||||
| Legacy 60 Hz command | Setting mode **2** is rejected with status **10001**. A rejected command does not count as a successful display switch. |
|
||||
| Higher refresh commands | Setting modes **3** and **4** through DroidDeck selects physical **1920×1080 at 90/120 Hz**, confirmed through Android's active display mode. |
|
||||
| Full SBS | `SET_INPUT` (`0x2822`) with value **1** settles at display mode **5** and Android **3840×1080 at 60 Hz**. Value **0** restores native mode **9**; DroidDeck then restores the saved 90 Hz preference. Tracking resumed after both switches. |
|
||||
| IMU | Type **11** raw sensor reports arrive at approximately **1,000 Hz**, using the existing 128-byte body layout. |
|
||||
|
||||
Mode 9 is an observed native display configuration, not a general mapping from
|
||||
EDID number to the physical refresh rate selected by every host. The older
|
||||
[xr-tools enum](https://github.com/0xcaff/xr-tools/blob/main/packages/xreal_one_driver/src/proto/net/dp_get_current_edid_dsp.rs)
|
||||
contains only modes 2–5. The independent
|
||||
[one-xr investigation](https://github.com/Skarian/one-xr/blob/main/docs/UNRESOLVED.md)
|
||||
also records mode 9 and mode-2 rejection status 10001 on other firmware. This
|
||||
supports keeping display mappings per model and confirming output through Android.
|
||||
|
||||
The Pro+ profile applies a nominal **+35° rotation around X** to both gyro and
|
||||
acceleration before fusion, inverting the factory display-to-IMU mounting
|
||||
direction. Directed wearer captures separately establish the sign: horizontal
|
||||
turns primarily rotate around corrected Y, and shoulder tilts around corrected Z.
|
||||
The initial opposite-sign correction mixed these axes; a stationary capture alone
|
||||
could not distinguish sensor mounting from the physical angle of the glasses.
|
||||
This is a model mounting correction, not individually calibrated tracking. Device
|
||||
calibration data and serial numbers are not stored in the repository. After the
|
||||
corrected build was installed, the wearer confirmed all three rotation directions
|
||||
and the horizon were correct. The existing 1S mapping stays unchanged.
|
||||
|
||||
The initial APK build and 621 targeted glasses/UI tests completed with zero failures
|
||||
and one skipped test. After correcting the mounting direction, all 73 focused
|
||||
XREAL/routing tests passed, including a regression using the measured movement
|
||||
axes. Native dependency checks passed and the APK contains no vendor
|
||||
SDK libraries. On this phone, background network restrictions interrupted the
|
||||
glasses sockets while DroidDeck was away from the foreground; foreground operation
|
||||
recovered. Sustained background use needs separate validation.
|
||||
|
||||
Brightness remains limited to the known protocol values **0–9**. XREAL's
|
||||
[display guide](https://tutorials.xreal.com/docs/glasses/pro-plus/display-sound/)
|
||||
documents 14 physical levels in Follow mode with Stabilizer off and 10 in Anchor
|
||||
or Spatial Anchor. Those counts do not establish a 0–13 direct-protocol range.
|
||||
The wearer confirmed that DroidDeck's brightness and dimming controls work on the
|
||||
Pro+. The wider brightness API mapping remains unverified.
|
||||
|
||||
Use **Follow** with **Stabilizer off** in the glasses' own menu before using
|
||||
DroidDeck tracking, following the official
|
||||
[display-mode](https://tutorials.xreal.com/docs/glasses/pro-plus/spatial-screen/display-modes/)
|
||||
and [Stabilizer](https://tutorials.xreal.com/docs/glasses/pro-plus/spatial-screen/stabilizer-transparency/)
|
||||
descriptions. The built-in tracking must not be layered over host tracking.
|
||||
XREAL Eye, camera capture, and 6DoF are not implemented. Long-session stability
|
||||
remains an outstanding hardware check.
|
||||