GHOST/Wayland WM Timer Problems #76720

Closed
opened 2020-05-13 15:35:10 +02:00 by Hans Goudey · 10 comments
Member

System Information
Operating system: Fedora 32
Graphics card: Mesa Intel UHD Graphics 620 (KBL GT2)

Blender Version
Broken: master WITH_GHOST_WAYLAND
Worked: never

Short description of error
When build with Wayland and running on it, panel animation only updates when the mouse is moved over the Blender window.

Exact steps for others to reproduce the error
Drag a panel in the properties area and let them animate back.

With Wayland
Screencast from 05-13-2020 09:24:08 AM.webm

XWayland
Screencast from 05-13-2020 09:34:26 AM.webm

**System Information** Operating system: Fedora 32 Graphics card: Mesa Intel UHD Graphics 620 (KBL GT2) **Blender Version** Broken: master `WITH_GHOST_WAYLAND` Worked: never **Short description of error** When build with Wayland and running on it, panel animation only updates when the mouse is moved over the Blender window. **Exact steps for others to reproduce the error** Drag a panel in the properties area and let them animate back. *With Wayland* [Screencast from 05-13-2020 09:24:08 AM.webm](https://archive.blender.org/developer/F8532839/Screencast_from_05-13-2020_09_24_08_AM.webm) *XWayland* [Screencast from 05-13-2020 09:34:26 AM.webm](https://archive.blender.org/developer/F8532856/Screencast_from_05-13-2020_09_34_26_AM.webm)
Author
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Author
Member

Added subscriber: @christian.rauch

Added subscriber: @christian.rauch
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Added subscriber: @brecht

Added subscriber: @brecht

Marking as To Do since Wayland is still under development and is not enabled in official builds.

Marking as To Do since Wayland is still under development and is not enabled in official builds.

The problem is basically that the event handling in GHOST_SystemWayland::processEvents by wl_display_dispatch blocks until new events have been received from the compositor. This is fine and efficient of the UI only has to respond to input events etc. but obviously does not work with animations or other input independent UI events.

A non-blocking alternative, such as wl_display_roundtrip, will fix this the animation issue but will result in a "busy loop" that consumes a lot of CPU.

I will have to look into another solution for this. I think a big problem is that event handling and interface rendering happens in the same thread, but that the UI drawing is not throttled by the monitor update rate.

The problem is basically that the event handling in `GHOST_SystemWayland::processEvents` by `wl_display_dispatch` blocks until new events have been received from the compositor. This is fine and efficient of the UI only has to respond to input events etc. but obviously does not work with animations or other input independent UI events. A non-blocking alternative, such as `wl_display_roundtrip`, will fix this the animation issue but will result in a "busy loop" that consumes a lot of CPU. I will have to look into another solution for this. I think a big problem is that event handling and interface rendering happens in the same thread, but that the UI drawing is not throttled by the monitor update rate.

Blender as a whole works with a busy loop. While this might be changed in the future, for now Wayland should do the same as other GHOST backends and for waitForEvent argument.

Changing this assumption would require some deeper changes in Blender, and would involve Python API breakage as well.

Blender as a whole works with a busy loop. While this might be changed in the future, for now Wayland should do the same as other GHOST backends and for `waitForEvent` argument. Changing this assumption would require some deeper changes in Blender, and would involve Python API breakage as well.

@HooglyBoogly This should be solved by https://developer.blender.org/D7658. Can you confirm and close this if applicable?

@HooglyBoogly This should be solved by https://developer.blender.org/D7658. Can you confirm and close this if applicable?
Author
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Hans Goudey self-assigned this 2020-05-24 22:37:28 +02:00
Author
Member

Works great! Thanks!

Works great! Thanks!
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#76720
No description provided.