Retroarch: [Wayland]RetroArch ignored idle-inhibit (suspend screensaver) option

Created on 28 Nov 2018  路  5Comments  路  Source: libretro/RetroArch

Description

Screensaver is not blocking when "suspend screensaver" option enabled. Tested on KDE Plasma 5.

Expected behavior

Screensaver must blocked.

Actual behavior

Seems like idle-inhibitor is creating, but RetroArch is ignore it:

static bool gfx_ctx_wl_suppress_screensaver(void *data, bool state)
{
    (void)data;
    gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;

    if (!wl->idle_inhibit_manager)
        return false;
    if (state == (!!wl->idle_inhibitor))
        return true;
    if (state) {
        RARCH_LOG("[Wayland]: Enabling idle inhibitor\n");
        struct zwp_idle_inhibit_manager_v1 *mgr = wl->idle_inhibit_manager;
        wl->idle_inhibitor = zwp_idle_inhibit_manager_v1_create_inhibitor(mgr, wl->surface);
    } else {
        RARCH_LOG("[Wayland]: Disabling the idle inhibitor\n");
        zwp_idle_inhibitor_v1_destroy(wl->idle_inhibitor);
        wl->idle_inhibitor = NULL;
    }
    return true;
}

Steps to reproduce the bug

  1. Build RetroArch with --enable-wayland
  2. Turn on screensaver in KDE Plasma 5
  3. Run RetroArch and some game on it

Bisect Results

[Try to bisect and tell us when this started happening]

Version/Commit

  • RetroArch: 1.7.5 b538786b00a1a820e156646a87baa96929335399

Environment information

  • OS: KDE Neon GIT Unstable
  • Compiler: GCC 4:7.3.0-3ubuntu2.1
wayland

All 5 comments

Works fine in Sway

Are you able of testing the upstream KDE solution?

@orbea Yes, I will test it on weekend

Fixed

Was this page helpful?
0 / 5 - 0 ratings