Skip to content

Conversation

@tobe2098
Copy link
Contributor

@tobe2098 tobe2098 commented Oct 24, 2025

This PR adds an environment variable to do proper software rendering within the flutter GUI. This avoids flickering problems when flutter attempts to send GPU instructions to the CPU in Mesa drivers (or possibly when drivers are not available) according to flutter/flutter#169508. Fixes #4369 (tested) when this PR is merged into main.

This solution should only be temporary until we (or flutter) solve the root cause of bad rendering, since it could impose some additional load in less modern CPUs.

Additional info

  • It seems like it is only caused by snap confinement, since the built version has no problems.
  • Previous versions of flutter do not enable this fix, probably due to bad flutter software rendering, but the flickering is the same. So, it requires [submodules] Update flutter to 3.35.7 #4441
  • This problem appears after the latest 1.16.1, unclear what caused it in our end. It could be a flutter update, since it seems to have been their problem. I examined the diff between main and the 1.16.1 tag and there was nothing obvious that could have caused it (no driver change, no snapcraft.yaml change or linux.patch change).

MULTI-2357

@tobe2098 tobe2098 added this to the 1.17.0 milestone Oct 24, 2025
@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.46%. Comparing base (b293e8d) to head (9dc6c20).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4475   +/-   ##
=======================================
  Coverage   89.46%   89.46%           
=======================================
  Files         240      240           
  Lines       13829    13829           
=======================================
  Hits        12372    12372           
  Misses       1457     1457           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tobe2098 tobe2098 self-assigned this Oct 24, 2025
@tobe2098
Copy link
Contributor Author

For future reference when the flickering issue is revisited, the following tool can be used for debugging: https://renderdoc.org/.

Base automatically changed from gui-update-flutter to main October 24, 2025 18:54
@tobe2098 tobe2098 force-pushed the gui/fix-render-flicker branch 2 times, most recently from 57a681b to ff21dd5 Compare October 24, 2025 19:53
@tobe2098 tobe2098 force-pushed the gui/fix-render-flicker branch from ff21dd5 to 9dc6c20 Compare October 25, 2025 09:12
@tobe2098
Copy link
Contributor Author

The fix works, the flickering is gone in this PR's snap. Only issue is the following warning message and possible CPU consumption:

** (multipass_gui:9796): WARNING **: 11:15:58.947: Using the software renderer. Not all features are supported. This is not recommended.

To switch back to the default renderer, unset the FLUTTER_LINUX_RENDERER environment variable.

Which appears in the GUI's logs. For this reason I would like somewhat additional testing before approval, hopefully in less modern machines.

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.

[gui][snap] Continuous significant flickering when there are any redrawing events

1 participant