fix(kwayland): move blocking tablet init before timer start
ClosedPublic

Authored by romangg on Tue, Jan 14, 12:10 PM.

Details

Summary

On init of the tablet mode the d-bus connection to KWin for receiving tablet
mode information is blocking for some reason for over one second. This leads
to the single shot timer timing out before the Wayland interfaces can be
received.

For now move the blocking call before the timer is started such that we do
not fail anymore.

Note that the d-bus call is only blocking unusual long on session startup.
Later d-bus calls return without prolonged delay.

Test Plan

Starts without seg fault on output management object in applyConfig.

Diff Detail

Repository
R110 KScreen Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
romangg created this revision.Tue, Jan 14, 12:10 PM
Restricted Application added a project: Plasma. · View Herald TranscriptTue, Jan 14, 12:10 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
romangg requested review of this revision.Tue, Jan 14, 12:10 PM
davidedmundson accepted this revision.Tue, Jan 14, 12:42 PM
This revision is now accepted and ready to land.Tue, Jan 14, 12:42 PM
romangg updated this revision to Diff 73630.Wed, Jan 15, 3:50 PM
  • Init tablet before starting KWayland timer

Further analysis showed that the issue is that for some reason the d-bus call to tablet mode properties is blocking for over one second. That in return leads to the single-shot timer failing. While we should not fail in this case that badly and in KWin it should be further investigated why the d-bus call is blocking for so long (it only blocks on startup, later on not anymore), for now move the tablet init before the timer is started. Then we should not fail any more on receiving the Wayland interfaces.

romangg retitled this revision from WIP: fix(kwayland): stall tablet config change to fix(kwayland): move blocking tablet init before timer start.Wed, Jan 15, 3:55 PM
romangg edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.