Bug 453012 - Wallpaper ignores global scale of 200% when a 144Hz 4K HDMI 2.1 monitor is used
Summary: Wallpaper ignores global scale of 200% when a 144Hz 4K HDMI 2.1 monitor is used
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Image Wallpaper (show other bugs)
Version: 5.24.4
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-25 19:20 UTC by Richard Yao
Modified: 2022-07-25 18:50 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
This shows what the wallpaper looks like after logging into plasma shell before running any commands to restart plasmashell or kwin. (1.90 MB, image/png)
2022-04-25 19:20 UTC, Richard Yao
Details
This shows the double wallpaper after `plasmashell --replace` has been executed. (778.48 KB, image/jpeg)
2022-04-25 19:22 UTC, Richard Yao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Yao 2022-04-25 19:20:06 UTC
Created attachment 148364 [details]
This shows what the wallpaper looks like after logging into plasma shell before running any commands to restart plasmashell or kwin.

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

I have a 144Hz 4K monitor. I set my resolution scale to 200%. When I login, I see the wallpaper occupying the upperleft 1/4 of the screen, with the rest being black. I have attached a screenshot showing this.

If I execute `plasmashell --replace` via Alt+F2, the wallpaper properly occupies the entire screen. However, if I change focus to skype or just about any application, I see two copies of the wallpaper. One properly occupies the entire screen. The other occupies 1/4 of the screen on top of that. If I click on the wallpaper, I only see the correct copy. If I execute `kwin_x11 --replace` via Alt+F2, an extra copy no longer is shown when other applications have focus.

My monitor has a HDMI compatibility mode, which seems to restrict the monitor to HDMI 2.0b and limits the maximum refresh rate to 120Hz. When I set this compatibility mode and login, the problem disappears.

STEPS TO REPRODUCE
1. Get a Nvidia graphics card that supports HDMI 2.1. Configure it to use X11 with the nvidia driver.
2. Get a 144Hz 4K HDMI 2.1 monitor.
3. Configure a 200% resolution scale.
4. Log into the plasma shell.

OBSERVED RESULT
I expect to see my wallpaper cover the entire screen.

EXPECTED RESULT
I see my wallpaper occupy 1/4 of the screen, with the rest black. I have attached a picture showing this.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.16.14-gentoo-x86_64
(available in About System)
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
I am not sure if this is related to having Nvidia graphics (although it would not surprise me) since I have no AMD graphics card to use to test. This issue was present in KDE Plasma Version 5.23.5, but I upgraded my entire system to Gentoo's testing branch to see if it was present in the latest version. That gave me 5.24.4.

Running `kwin_x11 --replace` without running `plasmashell --replace` has no effect on the issue. Turning off VRR on the monitor also has no effect on the issue.

I wrote a small script to execute since I find this annoying:

# Workaround bug
nohup plasmashell --replace 2>&1 >/dev/null &
nohup kwin_x11 --replace 2>&1 >/dev/null &

It did not always fix the issue with a single run, so there might have been some sort of race condition present. I primarily used it against KDE Plasma Version 5.23.5. When doing testing while writing this bug report, I was not able to reproduce the race, but I did not test many times.

My system's relevant hardware configuration is as follows:

Eve Spectrum ES07D03 144Hz 4K monitor (running scaler firmware version 106)
GeForce RTX 3080 (ROG-STRIX-RTX3080-O10G-GAMING) (running VBIOS v5) 
Asrock B450 Pro4 motherboard (running BIOS version 5.00)

I only have a single monitor. I have tried different HDMI cables, which made no difference. I am also using nvidia driver version 510.60.02, although the issue was present with 510.54.
Comment 1 Richard Yao 2022-04-25 19:22:16 UTC
Created attachment 148365 [details]
This shows the double wallpaper after `plasmashell --replace` has been executed.

I am attaching a second screenshot that shows the double wallpaper visible after `plasmashell --replace` has been executed via Alt+F2, but before `kwin_x11 --replace` has been executed.

Note that I hit print screen a few times to make the infinite recursion in the spectacle window look nice. I also had to make it a JPEG because the PNG exceeded the file size limit.
Comment 2 David Edmundson 2022-04-25 22:18:33 UTC
What happens when you right click on the black area?
Comment 3 Richard Yao 2022-04-25 23:58:21 UTC
(In reply to David Edmundson from comment #2)
> What happens when you right click on the black area?

Nothing. No context menu appears.
Comment 4 Richard Yao 2022-04-27 14:05:00 UTC
I just changed the global scale back to 100%, logged out and logged back in and the issue still happened. I did a reboot just in case some state had persisted from the old setting, but it happened again after the reboot. I am not sure what the cause could be anymore other than my HDMI 2.1 4K monitor running at 144Hz. I had upgraded from a 144Hz 1080p monitor and only saw this issue after the upgrade and the HDMI compatibility mode on my monitor does not trigger this, so the trigger for this seems to be HDMI 2.1. :/
Comment 5 Richard Yao 2022-04-29 21:08:08 UTC
(In reply to Richard Yao from comment #3)
> (In reply to David Edmundson from comment #2)
> > What happens when you right click on the black area?
> 
> Nothing. No context menu appears.

This turns out to be racy. I just had a login where this did not happen. Then I logged out and back in, only for it to happen again. Nearly every time, it happens on my system.
Comment 6 Nate Graham 2022-04-29 21:40:10 UTC
If you were on Wayland, I'd say it's probably Bug 449212, but so far that's only manifested for Wayland users.
Comment 7 Richard Yao 2022-05-11 19:48:25 UTC
I discovered that doing these commands will workaround it without restarting plasmashell or kwin:

xrandr -s 1920x1080
xrandr -s 3840x2160
Comment 8 Richard Yao 2022-05-14 22:24:21 UTC
This is also present with nvidia driver version 515.43.04. The glitch occurs with both the closed source and open source kernel modules.
Comment 9 Fushan Wen 2022-05-30 00:28:23 UTC
Could you test if https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1781 fixes the issue?
Comment 10 Bug Janitor Service 2022-06-14 04:35:22 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2022-06-29 04:37:01 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 12 Richard Yao 2022-07-25 18:50:40 UTC
(In reply to Fushan Wen from comment #9)
> Could you test if
> https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1781 fixes
> the issue?

Sorry for the late response. This appears to have fixed it. I did not test that pull request by itself, but instead tested 5.25.3, which appears to contain it.