Force software cursor on Intel devices

kwin randomly freezes for a second when calling glFlush or glFenceSync.
In principle, this should not happen.

BUG: 474725
This commit is contained in:
Vlad Zahorodnii 2024-01-09 11:39:43 +02:00
parent f7e8d3cefb
commit b214251f81

View file

@ -272,8 +272,11 @@ void WaylandCompositor::addOutput(Output *output)
cursorLayer->setParent(workspaceLayer); cursorLayer->setParent(workspaceLayer);
cursorLayer->setSuperlayer(workspaceLayer); cursorLayer->setSuperlayer(workspaceLayer);
static bool valid; // Software cursor is forced for intel devices because there are screen stuttering issues with hardware cursor,
static const bool forceSoftwareCursor = qEnvironmentVariableIntValue("KWIN_FORCE_SW_CURSOR", &valid) == 1 && valid; // possibly a kernel driver bug. Remove the workaround when https://gitlab.freedesktop.org/drm/intel/-/issues/9571 is fixed.
static bool forceSoftwareCursorIsSet;
static const bool forceSoftwareCursor = qEnvironmentVariableIntValue("KWIN_FORCE_SW_CURSOR", &forceSoftwareCursorIsSet) == 1
|| (!forceSoftwareCursorIsSet && GLPlatform::instance() && GLPlatform::instance()->isIntel());
auto updateCursorLayer = [this, output, cursorLayer]() { auto updateCursorLayer = [this, output, cursorLayer]() {
const Cursor *cursor = Cursors::self()->currentCursor(); const Cursor *cursor = Cursors::self()->currentCursor();