Skip to content

Comments

Fix weston-simple-egl flakiness on fresh flash by improving Wayland/Weston bring-up and 60Hz enforcement#230

Merged
abbajaj806 merged 3 commits intoqualcomm-linux:mainfrom
smuppand:Display
Dec 18, 2025
Merged

Fix weston-simple-egl flakiness on fresh flash by improving Wayland/Weston bring-up and 60Hz enforcement#230
abbajaj806 merged 3 commits intoqualcomm-linux:mainfrom
smuppand:Display

Conversation

@smuppand
Copy link
Contributor

This PR makes the weston-simple-egl test reliable across freshly flashed images and reruns by hardening Wayland session discovery and Weston start/stop behavior.

  • Autodetects and adopts an existing Wayland socket (fixes missing/incorrect XDG_RUNTIME_DIR + WAYLAND_DISPLAY).
  • Starts a private Weston session when no usable socket exists (overlay-style flow), with connection probing before running the client.
  • Adds best-effort primary display enforcement to 1080p60@60 via weston.ini, without restarting Weston if it isn’t running yet (key for first-run stability).
  • Improves CI visibility with display snapshots + modetest dump + Wayland/Weston debug snapshots.
  • Runs weston-simple-egl under timeout, collects logs, parses FPS samples, and applies optional FPS gating while keeping CI-friendly PASS/FAIL/SKIP semantics.

… and reruns

Autodetect Wayland socket and adopt XDG_RUNTIME_DIR/WAYLAND_DISPLAY reliably
Add display + modetest + Wayland/Weston debug snapshots for CI visibility
Run weston-simple-egl with timeout, capture logs, and parse FPS stats
Enforce PASS/FAIL/SKIP semantics with optional FPS gating

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
…0@60

Avoid restarting Weston when it is not running (improves first-run stability)
Restart Weston only when needed to apply weston.ini updates
Harden weston process detection and silence ShellCheck SC2009 where required
Keep changes non-fatal: mode enforcement remains best-effort for CI

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
…env adoption

Add/strengthen weston_is_running and connection probe utilities
Ensure XDG_RUNTIME_DIR creation/permissions handling for private Weston sessions
Standardize restart/start flows via weston_pick_env_or_start / overlay start helpers
Improve logging and resilience for CI runs without introducing new bashisms

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
# Also enforces/fixes XDG_RUNTIME_DIR permissions so clients won’t reject it.
wayland_connection_ok() {
sock=""

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can display specific function be moved to lib_display.sh

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several display/weston functions in the current functestlib.sh, and moving all of them to lib_display can be handled in a separate PR rather than in this one.

# Best-effort: return current mode for a DRM connector using debugfs state.
# Input : full connector name like "card0-HDMI-A-1"
# Output: "1920x1080@60.00" (or "1920x1080@60") or "-" if unknown/unavailable
display_connector_cur_mode() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this as well. Can this function be moved to lib_display.sh

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT

# Sysfs connectors (expects display_list_connectors to print tab-separated fields)
have=0
while IFS="$(printf '\t')" read -r name status typ mc fm; do
while IFS="$(printf '\t')" read -r name status enabled typ mc fm cur; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this as well. Can this function be moved to lib_display.sh

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT

@smuppand smuppand requested a review from abbajaj806 December 18, 2025 09:27
Copy link
Contributor

@abbajaj806 abbajaj806 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abbajaj806 abbajaj806 merged commit f680543 into qualcomm-linux:main Dec 18, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants