octopi icon indicating copy to clipboard operation
octopi copied to clipboard

Octopi on Wayland (Plasma) support

Open demmm opened this issue 3 years ago • 3 comments

Plasma 5 is just about ready to default to running on Wayland instead of X. Octopi however is having issues running on Wayland, causing very high CPU, and eventually hanging/segfaulting with error:

qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
Terminated

There are many bug reports dealing with this issue, seems https://github.com/aarnt/octopi/search?q=activateWindow is not supported in Wayland. Examples of some reports with maybe some useful patches: https://github.com/flameshot-org/flameshot/issues/619 https://bugzilla.redhat.com/show_bug.cgi?id=1820923 https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/issues/288

demmm avatar Jan 19 '22 15:01 demmm

Hi @demmm

You can make this test to see if it works:

  • Comment all "actWin->activateWindow()" statements on "src/QtSolutions/qtsingleapplication.cpp"
  • Comment all "->activateWindow()" statements on "notifier/mainwindow.cpp"

Do the messages/high cpu usage go away after that?

aarnt avatar Jan 20 '22 12:01 aarnt

Patching did not make a difference.

demmm avatar Feb 06 '22 11:02 demmm

Hi @demmm

I've just updated my KaOS virtualbox vm here to make some tests in a wayland session (with an unpatched Octopi 0.13 dev version). Unfortunately I was not able to reproduce the high cpu/termination error.

Can you elaborate on the use cases this bug occurs?

aarnt avatar Feb 06 '22 14:02 aarnt

@demmm Any update on this issue?

aarnt avatar Oct 08 '22 11:10 aarnt

It is gone, all my systems run Wayland exclusively now, no issue whatsoever with Octopi.

demmm avatar Oct 08 '22 12:10 demmm