Bug 487208 - Full screen apps dim/turn off the screen when invoked under Wayland
Summary: Full screen apps dim/turn off the screen when invoked under Wayland
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.0.4
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-18 21:54 UTC by Ricardo J. Barberis
Modified: 2024-05-23 14:19 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
drm_info before screen dim (215.80 KB, text/plain)
2024-05-19 18:06 UTC, Ricardo J. Barberis
Details
drm_info while screen dim (215.80 KB, text/plain)
2024-05-19 18:07 UTC, Ricardo J. Barberis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ricardo J. Barberis 2024-05-18 21:54:43 UTC
SUMMARY

When I invoke Spactacle, either via PrintScreen key, krunner or konsole, my screen dims and there's no easy way to bring it back to life

STEPS TO REPRODUCE

1. Press PrintScreen key or launch spectacle some other way
2. Watch the screen dim with no way to recover it

OBSERVED RESULT

Screen dims completely

EXPECTED RESULT

Screen shoud remain on

SOFTWARE/OS VERSIONS

spectacle 24.02.2
Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Kernel Version: 6.8.9-300.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-1035G1 CPU @ 1.00GHz
Memory: 15.2 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics

ADDITIONAL INFORMATION

The first time it happend I connected a secondary monitor, it took its time but worked, so I at least was able to save my work and close my programs before rebooting.
Before rebooting I tried disabling the laptop screen from system settings, modifying the screen brightnes, making the external monitor primary, etc. to no avail.

Today at home I started experimenting and if I put my laptop to sleep (which takes longer than usual) it resumes correctly, except if I didn't close spectacle the screen dims again, so I have to blindly Alt+Tab out of spectacle before hitting th sleep button.

When invoked from konsole/yakuake (e.g. `spectacle -t`), this message is repeteadly printed:

```
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/lib64/dri-nonfree/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_21
libva info: va_openDriver() returns 0
kpipewire_record_logging: VAAPI: Display initialized
kpipewire_record_logging: VAAPI: API version 1 . 21
kpipewire_record_logging: VAAPI: Intel iHD driver for Intel(R) Gen Graphics - 24.1.5 () in use for device "/dev/dri/renderD128"
```
Comment 1 Ricardo J. Barberis 2024-05-18 23:39:51 UTC
OK, I kept using my laptop and this screen dim happened again but spectacle wasn't involved at all, this might be a kwin_wayland or intel driver issue.

Upgraded kwin-x11, switched to it and all problems gone.
Comment 2 Zamundaaa 2024-05-19 16:21:43 UTC
Please attach the output of drm_info before, and while the screen is off
Comment 3 Ricardo J. Barberis 2024-05-19 18:06:55 UTC
Created attachment 169624 [details]
drm_info before screen dim
Comment 4 Ricardo J. Barberis 2024-05-19 18:07:32 UTC
Created attachment 169625 [details]
drm_info while screen dim
Comment 5 Ricardo J. Barberis 2024-05-19 18:08:34 UTC
Thanks for your reply Zamundaaa, attached the output of drm_info before and while the screen was dimmed.
Comment 6 Zamundaaa 2024-05-22 12:39:51 UTC
Okay, the difference I see is that VRR gets enabled in fullscreen. Does this still happen if you disable adaptive sync in the display settings?
Comment 7 Ricardo J. Barberis 2024-05-22 18:46:17 UTC
(In reply to Zamundaaa from comment #6)
> Okay, the difference I see is that VRR gets enabled in fullscreen. Does this
> still happen if you disable adaptive sync in the display settings?

I can't test right now but there's a kwin update for Fedora which I was planning on applying this evening.

If I can still reproduce this after the update, I'll test with and without adaptive sync and let you know.
Comment 8 Ricardo J. Barberis 2024-05-23 13:43:32 UTC
Seems definitely that adaptive sync is the issue, if I leave it automatic it fails like reported, if I enable it (always) the screen immediately goes off, if I disable it (never) everything seems to work so far.

I even rebooted a couple of times, did a few suspend/resume cycles and the screen remained on at all times.

I'll keep using wayland without adaptive sync for a few days, see how it behaves (but I'm really liking it so far!).
Comment 9 Zamundaaa 2024-05-23 14:19:34 UTC
Great, then you have a workaround and the cause of the problem. Please make a bug report about this at https://gitlab.freedesktop.org/drm/i915/kernel/-/issues; hopefully they can fix this or at least blacklist the screen for VRR support