Bug 423493 - Entry of Discover appears quickly in Plasma panel when User Feedback kcm is selected on X11
Summary: Entry of Discover appears quickly in Plasma panel when User Feedback kcm is s...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_feedback (show other bugs)
Version: unspecified
Platform: Neon Linux
: HI normal with 20 votes (vote)
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
: 443270 446727 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-06-25 12:22 UTC by Patrick Silva
Modified: 2022-01-20 19:32 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24


Attachments
screen recording (920.95 KB, video/webm)
2020-06-25 12:22 UTC, Patrick Silva
Details
frame captured from the screen recording (230.58 KB, image/png)
2020-06-25 12:25 UTC, Patrick Silva
Details
Discover popping into the front (371.94 KB, video/mp4)
2021-06-10 13:20 UTC, Nagy Tibor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-06-25 12:22:21 UTC
Created attachment 129671 [details]
screen recording

SUMMARY
This behavior doesn't occur on Wayland.

STEPS TO REPRODUCE
1. use X11 session
2. set System Settings to side bar view
3. switch to User Feedback kcm from another kcm

OBSERVED RESULT
Entry of Discover appears quickly in Plasma panel when User Feedback kcm is selected. Watch the attached screen recording please.

EXPECTED RESULT
norhing should appear in Plasma panel when User Feedbck kcm is selected.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.80
KDE Frameworks Version: 5.72.0
Qt Version: 5.14.2
Comment 1 Patrick Silva 2020-06-25 12:25:44 UTC
Created attachment 129672 [details]
frame captured from the screen recording
Comment 2 Nate Graham 2021-01-26 00:53:08 UTC
Can you reproduce this in the 5.21 beta?
Comment 3 Patrick Silva 2021-01-26 17:05:41 UTC
Yes, I can reproduce with Plasma 5.21 beta on Arch Linux.
Comment 4 Nate Graham 2021-06-02 17:35:15 UTC
I cannot reproduce this issue, but code inspection reveals that the KCM runs `plasma-discover --feedback` when it launches. On slow systems, this probably makes a Task Manager entry briefly appear.

We should be using an API to get this information, or make Discover suppress showing a Task Manager icon when launched with that argument.
Comment 5 Nagy Tibor 2021-06-10 13:20:22 UTC
Created attachment 139193 [details]
Discover popping into the front

I can still reproduce it with Plasma 5.22 on Neon. This bug even causes already running background windows of Discover to pop into the front when opening the KCM.
Comment 6 Nate Graham 2021-06-10 15:38:18 UTC
lol, can confirm. That's slightly ridiculous!
Comment 7 Nagy Tibor 2021-06-10 22:49:46 UTC
That `plasma-discover --feedback` command you mentioned above also doesn't return anything in this case, things seems to be getting short circuited before Discover reaches handling that feedback argument.
Comment 8 Bug Janitor Service 2021-07-06 12:54:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/143
Comment 9 Nate Graham 2021-07-22 19:17:57 UTC
Git commit 353066367b2bfec5385a22167388e499dce3819f by Nate Graham, on behalf of Aleix Pol.
Committed on 22/07/2021 at 19:14.
Pushed by ngraham into branch 'master'.

notifier: Declare the reboot notification in the notifyrc file

M  +5    -0    libdiscover/resources/discoverabstractnotifier.notifyrc
M  +9    -5    notifier/DiscoverNotifier.cpp

https://invent.kde.org/plasma/discover/commit/353066367b2bfec5385a22167388e499dce3819f
Comment 10 Patrick Silva 2021-07-29 12:53:37 UTC
it's still reproducible on neon unstable.
Comment 11 Nate Graham 2021-07-29 13:39:02 UTC
Works for me with current git master everything. I am beginning to suspect that your Neon has old packages instead of the latest stuff. Can you verify with Neon packagers that things are actually getting built?
Comment 12 Patrick Silva 2021-07-30 01:27:46 UTC
Discover was updated on my system a few minutes before my previous comment.
Comment 13 Bug Janitor Service 2021-08-14 04:36:13 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 14 Patrick Silva 2021-08-14 10:23:51 UTC
new info was added in comment 12
Comment 15 Nate Graham 2021-08-16 13:26:46 UTC
I can still no longer reproduce the issue and have no idea how you are able to do it. :/
Comment 16 Patrick Silva 2021-08-16 13:32:35 UTC
Weird. I can also reproduce the behavior mentioned in comment 5.
Comment 17 Alexandre Pereira 2021-08-28 13:03:52 UTC
I discovered ( pun intended :P ) this issue today, and made a video reproducing it.

package versions are git master, ( framework and plasma groups ) just compiled 15 minutes ago.

The video is made on X11, because the video recorder only works on X11. But it also happens on Wayland.

link to video: https://youtu.be/h4L3Vxw7eRE
Comment 18 Nate Graham 2021-08-28 14:09:23 UTC
Darn. I have no idea why I can't reproduce the issue. :(

Aleix, could yo maybe take another look?
Comment 19 Nate Graham 2021-08-28 14:24:06 UTC
Even though for some reason I cannot reproduce the issue, the bug in the code is obvious: https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/feedback/feedback.cpp#L56

It will run `plasma-discover --feedback` to get the feedback information from Discover.

If Discover isn't already running, it gets launched (and then quit) and briefly appears in the Task Manager.

If Discover is already running, it gets activated and switched to the main view.

There is no chance that the previously-mentioned commit would have solved the issue, so now I'm not sure why I can't reproduce it again. :/ But the code is clearly wrong here. Ideally we shouldn't be invoking Discover's executable to get the feedback stats. We should get it from DBus or an API or something.

If this is somehow technically problematic or impossible, we need to make sure to launch the app in such a manner that it doesn't appear in the Task Manager, and we need to always start a new instance if it's already running, so that we don't interfere with any already-running instances.
Comment 20 Nate Graham 2021-10-04 23:48:37 UTC
*** Bug 443270 has been marked as a duplicate of this bug. ***
Comment 21 kelen 2021-10-13 05:17:04 UTC
(In reply to Nate Graham from comment #19)
> Even though for some reason I cannot reproduce the issue, the bug in the
> code is obvious:
> https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/feedback/
> feedback.cpp#L56
> 
> It will run `plasma-discover --feedback` to get the feedback information
> from Discover.
> 
> If Discover isn't already running, it gets launched (and then quit) and
> briefly appears in the Task Manager.
> 
> If Discover is already running, it gets activated and switched to the main
> view.
> 
> There is no chance that the previously-mentioned commit would have solved
> the issue, so now I'm not sure why I can't reproduce it again. :/ But the
> code is clearly wrong here. Ideally we shouldn't be invoking Discover's
> executable to get the feedback stats. We should get it from DBus or an API
> or something.
> 
> If this is somehow technically problematic or impossible, we need to make
> sure to launch the app in such a manner that it doesn't appear in the Task
> Manager, and we need to always start a new instance if it's already running,
> so that we don't interfere with any already-running instances.

Hello, dear Graham. This bug has also appeared on my PC since yesterday. 
When will this bug be resolved, or do you have any suggestions? 
Best wishes from kelen.
Comment 22 kelen 2021-10-30 01:58:42 UTC
Hello, I managed to reproduce this bug in the hope of getting your solution. The BUG is caused by fcitx5 and can be reproduced when there is a 'QT_IM_MODULE DEFAULT'fcitx' in the .pam_environment or /etc/environment.
Comment 23 kelen 2021-10-30 02:02:04 UTC
(In reply to kelen from comment #22)
> 您好,我设法重现了这个错误,希望能得到您的解决方案。该BUG是fcitx5引起的,在.pam_environment或/etc/
> environment中有'QT_IM_MODULE DEFAULT'fcitx'时可以重现。

sorry , it is (In reply to Patrick Silva from comment #0)
> 已创建附件 129671  [详情]
> 屏幕录制
> 
> 概括
> 这种行为不会发生在 Wayland 上。
> 
> 重现步骤
> 1.使用X11会话
> 2.将系统设置设置为侧栏视图
> 3.从另一个kcm切换到用户反馈kcm
> 
> 观察结果
> Entry of Discover appears quickly in Plasma panel when User Feedback kcm is
> selected. 请观看随附的屏幕录像。
> 
> 预期结果
> 当用户反馈 kcm 被选择时,norhing 应该出现在 Plasma 面板中。
> 
> 软件/操作系统版本
> 操作系统:KDE neon 不稳定版
> KDE 等离子版本:5.19.80
> KDE 框架版本:5.72.0
> Qt 版本:5.14.2
Sorry, it should be 
'QT_IM_MODULE DEFAULT=fcitx'
in ~/.pam_environment, I input error word.
Comment 24 Patrick Silva 2021-10-30 11:21:30 UTC
On Wayland session of neon unstable, this bug occurs when I open System Settings
and when I switch to 'Quick settings' page from any KCM.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.23.80
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.3
Graphics Platform: Wayland
Comment 25 Nate Graham 2021-12-09 19:21:13 UTC
*** Bug 446727 has been marked as a duplicate of this bug. ***
Comment 26 Nate Graham 2021-12-09 19:22:40 UTC
Can reproduce in a fashion on the Quick Settings KCM:

1. Open Discover
2. Open System Settings
3. Navigate to another page in System Settings
4. Click the Home button

Discover's window is brought to the front (X11 only; won't happen on Wayland due to bugs, but this nonetheless shows that Discover is being activated)
Comment 27 Patrick Silva 2022-01-15 02:48:49 UTC
*** Bug 448502 has been marked as a duplicate of this bug. ***
Comment 28 Bug Janitor Service 2022-01-17 18:31:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/227
Comment 29 Aleix Pol 2022-01-18 01:41:57 UTC
Git commit 906d5e096baccecd80711714d676702b45a534f0 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 18/01/2022 at 01:39.
Pushed by apol into branch 'master'.

Mark the window as invisible when calling with --feedback

This way it shouldn't glitch into the task manager

M  +4    -0    discover/main.cpp

https://invent.kde.org/plasma/discover/commit/906d5e096baccecd80711714d676702b45a534f0
Comment 30 Aleix Pol 2022-01-18 01:42:44 UTC
Git commit ff1c8f413fb49bcd993ebd412b5a078abd417d6e by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 18/01/2022 at 01:42.
Pushed by apol into branch 'Plasma/5.24'.

Mark the window as invisible when calling with --feedback

This way it shouldn't glitch into the task manager


(cherry picked from commit 906d5e096baccecd80711714d676702b45a534f0)

M  +4    -0    discover/main.cpp

https://invent.kde.org/plasma/discover/commit/ff1c8f413fb49bcd993ebd412b5a078abd417d6e