Add Wayland GPU rendering profile#302
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a9b9f99286
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case "$ELECTRON_RENDERING_MODE" in | ||
| wslg|wayland-gpu) | ||
| return 1 |
There was a problem hiding this comment.
Gate renderer accessibility on platform, not requested mode
When CODEX_LINUX_RENDERING_MODE=wayland-gpu is set, should_force_renderer_accessibility() now always disables --force-renderer-accessibility even if launch args later force X11 (for example --x11, --safe-mode, or passthrough --ozone-platform=x11). That regresses prior behavior for those X11 launches and can break accessibility-dependent tooling in exactly the troubleshooting path users are likely to take after exporting the new mode globally. The check should use the effective platform (or explicit X11 overrides) rather than only the requested rendering profile.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Thanks for adding the Wayland GPU profile. I re-reviewed the current head and confirmed the existing renderer-accessibility concern is still present, so I cannot merge this yet.
Finding:
launcher/start.sh.template:should_force_renderer_accessibility()now keys offELECTRON_RENDERING_MODE=wayland-gpu, not the effective Electron platform. When a user hasCODEX_LINUX_RENDERING_MODE=wayland-gpuexported globally but launches an explicit X11 fallback (--x11or--safe-mode), the launcher still suppresses--force-renderer-accessibilityeven though it is actually launching with--ozone-platform=x11. I reproduced this locally:CODEX_LINUX_RENDERING_MODE=wayland-gpu ... --x11producedozone_platform=x11 renderer_accessibility=0and no--force-renderer-accessibility. The--safe-modepath has the same issue while also disabling GPU.
Please base the default accessibility decision on the effective platform/explicit overrides, or add a guard so explicit X11 fallback keeps the prior default accessibility behavior. Also add smoke coverage for CODEX_LINUX_RENDERING_MODE=wayland-gpu --x11 and CODEX_LINUX_RENDERING_MODE=wayland-gpu --safe-mode.
Validation I ran:
bash -n launcher/start.sh.template tests/scripts_smoke.shgit diff --check origin/main...HEAD- targeted launcher probe for
wayland-gpu --x11andwayland-gpu --safe-mode
|
Thanks for the clear review. I pushed The follow-up changes
I also added smoke coverage for those cases and reran validation:
|
ilysenko
left a comment
There was a problem hiding this comment.
Re-reviewed current head c7e7e27. The previous renderer-accessibility concern is addressed: wayland-gpu still skips forced renderer accessibility on native Wayland, while explicit X11 fallback paths (--x11, --safe-mode, and pass-through --ozone-platform=x11) preserve the existing --force-renderer-accessibility default.
Validation checked:
- GitHub Actions are green
- bash -n launcher/start.sh.template tests/scripts_smoke.sh
- git diff --check origin/main...HEAD
- targeted launcher probe for native Wayland, --x11, --safe-mode, and pass-through X11
- full tests/scripts_smoke.sh
Summary
CODEX_LINUX_RENDERING_MODE=wayland-gputo force native Wayland while keeping GPU compositing enabled.CODEX_FORCE_RENDERER_ACCESSIBILITY=1override.Context
On Pop!_OS 24.04 COSMIC with NVIDIA, the safe-mode/software-rendering path failed with
GPU access not allowed, and the X11/Xwayland path could hang. The stable launch profile was native Wayland with GPU enabled, GPU compositing enabled, and forced renderer accessibility disabled. This PR keeps the existing default Linux and WSLg behavior intact while making that working profile first-class.Validation
bash -n launcher/start.sh.templatebash -n tests/scripts_smoke.shgit diff --checkenv -i HOME="$HOME" PATH="$PATH" USER="$USER" SHELL="$SHELL" TERM="${TERM:-xterm}" bash tests/scripts_smoke.sh