Bug 452648

Summary: the osd volume indicator is displayed in the top left corner of the screen instead of being displayed in the center of the screen
Product: [Frameworks and Libraries] libplasma Reporter: Jim Jones <rauchwolke>
Component: libplasmaAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: 1gsiqkbz, aleixpol, bernardo.menicagli, firew4lker, kde, koshikas, me, me, mitrax, nate, notmart, openmail+kde
Priority: HI Keywords: regression
Version: 5.93.0   
Target Milestone: ---   
Platform: Other   
OS: Other   
See Also: https://bugs.kde.org/show_bug.cgi?id=486560
Latest Commit: Version Fixed In: 6.0
Sentry Crash Report:
Attachments: dialog patch

Description Jim Jones 2022-04-15 07:53:38 UTC
SUMMARY
after the upgrade to kde-frameworks-5.93 the osd volume indicator is displayed in the top left corner of the screen instead of being displayed in the center of the screen


STEPS TO REPRODUCE
1. start kmix
2. press the volume button on the keyboard

OBSERVED RESULT
the osd volume indicator is displayed in the top left corner of the screen

EXPECTED RESULT
the osd volume indicator is displayed in the center of the screen

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Graphics Platform: X11

ADDITIONAL INFORMATION
Comment 1 Koshika 2022-04-16 04:11:48 UTC
About System;
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Graphics Platform: X11
wm: kwin_x11 vt: 1 dm: SDDM
Distro: Manjaro Linux base: Arch Linux

Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Dell driver: i915
    v: kernel ports: active: LVDS-1 empty: DP-1,HDMI-A-1,VGA-1 bus-ID: 00:02.0
    chip-ID: 8086:0166 class-ID: 0300
  Device-2: AMD Thames [Radeon HD 7500M/7600M Series] vendor: Dell
    driver: radeon v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 8 link-max:
    gen: 2 speed: 5 GT/s lanes: 16 bus-ID: 01:00.0 chip-ID: 1002:6840
    class-ID: 0300
  Display: x11 server: X.Org v: 21.1.3 compositor: kwin_x11 driver: X:
    loaded: modesetting,radeon alternate: fbdev,vesa gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.21x7.99")
    s-diag: 414mm (16.31")
  Monitor-1: LVDS-1 model: LG Display 0x033a built: 2012 res: 1366x768
    hz: 60 dpi: 101 gamma: 1.2 size: 344x194mm (13.54x7.64") diag: 395mm (15.5")
    ratio: 16:9 modes: 1366x768
  OpenGL: renderer: Mesa Intel HD Graphics 4000 (IVB GT2) v: 4.2 Mesa 22.0.1
    compat-v: 3.1 direct render: Yes

SUMMARY
after the upgrade to kde-frameworks-5.93 the all(system, brightness, volume) OSD indicators are displayed in the top left corner of the screen instead of being displayed in the center of the screen

STEPS TO REPRODUCE
invoke any changes through Fn keys  brightness, volume, Wifi, etc.

OBSERVED RESULT
the OSD indicator is displayed in the top left corner of the screen

EXPECTED RESULT
the OSD indicator should be displayed in the center of the screen
Comment 2 PQCraft 2022-04-16 07:41:20 UTC
I can confirm that I have this same problem. Downgrading plasma-framework to 5.92.0 fixed it.
Comment 3 Koshika 2022-04-16 11:17:03 UTC
sometimes it fixes itself, and OSD begin appearing in the center again. just when, i wasnt able to determine. (could be if you meddle with volume changing function keys first)
Comment 4 firewalker 2022-04-16 18:24:09 UTC
The product for the bug should change to frameworks-plasma.
Comment 5 firewalker 2022-04-17 13:44:34 UTC
This commit introduces the bug. 

https://github.com/KDE/plasma-framework/commit/29d31c159503e454b3c483b0b7eb180ce0ee926a

Reverting it addresses the issue.
Comment 6 firewalker 2022-04-17 14:56:33 UTC
Specifically this part of the commit:

auto ret = QQuickWindow::event(event);
if (d->mainItem) {
    d->syncToMainItemSize();
}
 return ret;
Comment 7 Kai Uwe Broulik 2022-04-17 15:19:38 UTC
I have also seen this occasionally
Comment 8 Aleix Pol 2022-04-18 00:36:01 UTC
Can you confirm that b62d83bef7733e4943e6f66787166b41198d1359 doesn't address it?
Comment 9 firewalker 2022-04-18 05:23:03 UTC
With the commit b62d83bef7733e4943e6f66787166b41198d1359 applied to 5.93.0 he issue is still present.
Comment 10 firewalker 2022-04-18 05:30:09 UTC
Also the Archlinux 5.93.0 packet includes the b62d83bef7733e4943e6f66787166b41198d1359 commit as a patch.
Comment 11 firewalker 2022-04-18 05:50:59 UTC
Don't know if it helps but i believe that updateLayoutParameters() exits when it shouldn;t commenting out the return restores the expected behavior.

void DialogPrivate::updateLayoutParameters()
{
    if (!componentComplete || !mainItem || !mainItemLayout || q->visibility() == QWindow::Hidden)
        return;
    }
Comment 12 Nate Graham 2022-04-18 15:28:58 UTC
Cool, would you be able to submit a merge request with that change? Thanks!
Comment 13 Jim Jones 2022-04-19 08:56:42 UTC
Created attachment 148232 [details]
dialog patch

this patch fixes the problem for me, it reverts a part of 29d31c159503e454b3c483b0b7eb180ce0ee926a
Comment 14 Nate Graham 2022-04-19 13:33:45 UTC
Thanks, can you test some more on your system with various types of Plasma pop-ups, dialogs, and windows, and submit it at https://invent.kde.org/frameworks/plasma-framework/-/merge_requests?
Comment 15 Jim Jones 2022-04-19 13:47:15 UTC
shouldn't the guy that pushed this broken commit fix it? based on git it was Aleix Pol <aleixpol@kde.org>
Comment 16 Nate Graham 2022-04-19 13:50:29 UTC
That's not how the open-source world works. Anyone is allowed to fix anything. Sometimes the original author is busy at the moment and would appreciate help from the community. If you have a proposed fix, best to submit it!
Comment 17 Jim Jones 2022-04-19 14:09:39 UTC
to be honest, i just payed around with the patch and i'm not quite sure if it would be a better idea to just revert the whole commit
Comment 18 Jim Jones 2022-04-19 14:11:06 UTC
if someone can answer this, i can create a the invite stuff
Comment 19 Nate Graham 2022-04-19 16:29:53 UTC
Go ahead and submit it. Code review happens there, not here. :)
Comment 20 Jim Jones 2022-04-20 11:29:35 UTC
how do i create a merge request? I can only find a new button to create a new issue, checking out the source creating a new branch and trying to push the new branch leads to a

You are not allowed to push code to this project.
Comment 22 Nate Graham 2022-04-20 12:55:39 UTC
Thank you!
Comment 23 Aleix Pol 2022-04-20 16:18:26 UTC
Git commit aec00b32980390b93411f140dfb0503a671c2163 by Aleix Pol Gonzalez, on behalf of Jim Jones.
Committed on 20/04/2022 at 16:18.
Pushed by apol into branch 'master'.

Fix osd dialog position

After the upgrade to kde-frameworks-5.93 the osd volume indicator is displayed in the top left corner of the screen instead of being displayed in the center of the screen.

M  +1    -5    src/plasmaquick/dialog.cpp

https://invent.kde.org/frameworks/plasma-framework/commit/aec00b32980390b93411f140dfb0503a671c2163
Comment 24 Nate Graham 2022-05-05 23:45:11 UTC
*** Bug 453443 has been marked as a duplicate of this bug. ***
Comment 25 Zamundaaa 2024-02-22 14:51:56 UTC
*** Bug 477835 has been marked as a duplicate of this bug. ***
Comment 26 Nate Graham 2024-02-23 21:40:13 UTC
*** Bug 481723 has been marked as a duplicate of this bug. ***
Comment 27 Alexander Sanderson 2024-11-09 00:54:03 UTC
Hey, I'm seeing this happen in Plasma 6.2.2 on openSUSE Tumbleweed. It happens whenever I connect my Scarlett Solo audio interface after logging in, though only when the output device is set to the Scarlett instead of my HDMI output. Note that I'm running on a laptop, with an external monitor connected.

My system info: 
Operating System: openSUSE Tumbleweed 20241105
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.6-2-default (64-bit)
Graphics Platform: Wayland
Processors: 16 × 12th Gen Intel® Core™ i5-1240P
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: Framework
Product Name: Laptop (12th Gen Intel Core)
System Version: A4
Comment 28 Bernardo 2024-11-11 15:46:17 UTC
I'm experiencing a similar behaviour on Arch Linux with Plasma 6.2.3
I have a multi monitor configuration so that I got:
                               Built-In Screen
LG Display FULL-HD 2       LG Display FULL-HD 2

I cannot reproduce WHEN it's happening exacly but it might be realted.

OS: Arch Linux x86_64
Host: 20X7003WIX ThinkPad L15 Gen 2a
Kernel: 6.11.6-arch1-1
Resolution: 1920x1080
DE: Plasma 6.2.3
WM: kwin
Theme: Breeze-Dark [GTK2], Breeze [GTK3]
Icons: breeze-dark [GTK2/3]
CPU: AMD Ryzen 7 PRO 5850U with Radeon Graphics (16) @ 4.507GHz
GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series
Comment 29 Nate Graham 2024-11-12 17:02:55 UTC
It sounds like the two of you are experiencing Bug 495194. Let's continue there.