Summary: | System Settings Quick Settings page shows same "Most Used" item twice | ||
---|---|---|---|
Product: | [Applications] systemsettings | Reporter: | Schlaefer <openmail+kde> |
Component: | Quick Settings | Assignee: | Alexander Lohnau <alexander.lohnau> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexander.lohnau, almur.kde, bednarczyk.pawel, gisk+kdebugs, ivan.cukic, nate, plasma-bugs, tneo |
Priority: | HI | ||
Version: | 5.24.3 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-desktop/commit/44821ceddc9bd14f72bf1e9e4c5f22119f657262 | Version Fixed In: | 5.25.5 |
Sentry Crash Report: | |||
Attachments: |
System Settings most used shows same module twice
System Settings most used shows same module twice sqlite3 ResourceEvent and ResourceScoreCache output Still reproducing duplicated module audio resourceEvent ResourceScoreCache |
Created attachment 146231 [details]
System Settings most used shows same module twice
Sorry, original example video had annoying desktop background audio.
Can reproduce. Duplicate items aren't filtered out. Hopefully should not be too hard to fix. Looks like the model data comes from KActivitiesStats; the duplicate data should probably ne filtered out there, not not even added in the first place. *** Bug 450972 has been marked as a duplicate of this bug. *** *** Bug 451922 has been marked as a duplicate of this bug. *** (In reply to Nate Graham from comment #3) > Looks like the model data comes from KActivitiesStats; the duplicate data > should probably ne filtered out there, not not even added in the first place. Hi Nate, I am trying to investigate this behavior. The duplicate data comes indeed from there. However, i believe the issue comes at insertion time. Apparently, when the notification to KActivitiesStats happens, it happens in such a way that the module ID sent is different. When accessing the last 20 characters of such module IDs from the statistics, I manage to get two different results for the same item (plasmasearch): kf.activitiesstats: Item: ⊥ 26 "" 1648998245 "_lookandfeel.desktop" kf.activitiesstats: Item: ⊥ 14 "" 1648998547 "cm_baloofile.desktop" kf.activitiesstats: Item: ⊥ 11.4125 "" 1649527799 "kcm:kcm_plasmasearch" kf.activitiesstats: Item: ⊥ 7 "" 1648998547 "plasmasearch.desktop" kf.activitiesstats: Item: ⊥ 6 "" 1648998246 "cm:kcm_style.desktop" Specifically, it seems sometimes the kcm_pasmasearch.desktop item is sent without the .desktop extension, and some others with the extension. However, now that I am trying to purposefully spawn something which notifies it with the extension, I don´t seem to be able to. Any ideas what could be causing it? Maybe some other project is notifying access to this KCM file incorrectly? (In reply to Schlaefer from comment #0) > Created attachment 146230 [details] > System Settings most used shows same module twice > > SUMMARY > > The "Most Used Settings" shows same item twice. > > STEPS TO REPRODUCE > > 1. Open System Settings > 2. Have my setup and System Settings usage behavior > > OBSERVED RESULT > > "Display Configuration" is shown twice for me. > > See attached video. > > EXPECTED RESULT > > Display Configuration module should only be displayed once. > > SOFTWARE/OS VERSIONS > Operating System: EndeavourOS > KDE Plasma Version: 5.24.80 > KDE Frameworks Version: 5.91.0 > Qt Version: 5.15.2 > Kernel Version: 5.16.4-242-tkg-cacule (64-bit) > Graphics Platform: Wayland > Processors: 12 × 11th Gen Intel® Core™ i5-11400 @ 2.60GHz > Memory: 31,2 GiB of RAM > Graphics Processor: AMD Radeon RX 5500 XT (In reply to Alfonso Murolo from comment #6) > (In reply to Nate Graham from comment #3) > > Looks like the model data comes from KActivitiesStats; the duplicate data > > should probably ne filtered out there, not not even added in the first place. > > Hi Nate, I am trying to investigate this behavior. The duplicate data comes > indeed from there. However, i believe the issue comes at insertion time. > Apparently, when the notification to KActivitiesStats happens, it happens in > such a way that the module ID sent is different. When accessing the last 20 > characters of such module IDs from the statistics, I manage to get two > different results for the same item (plasmasearch): > kf.activitiesstats: Item: ⊥ 26 "" 1648998245 "_lookandfeel.desktop" > kf.activitiesstats: Item: ⊥ 14 "" 1648998547 "cm_baloofile.desktop" > kf.activitiesstats: Item: ⊥ 11.4125 "" 1649527799 "kcm:kcm_plasmasearch" > kf.activitiesstats: Item: ⊥ 7 "" 1648998547 "plasmasearch.desktop" > kf.activitiesstats: Item: ⊥ 6 "" 1648998246 "cm:kcm_style.desktop" > > Specifically, it seems sometimes the kcm_pasmasearch.desktop item is sent > without the .desktop extension, and some others with the extension. However, > now that I am trying to purposefully spawn something which notifies it with > the extension, I don´t seem to be able to. Any ideas what could be causing > it? Maybe some other project is notifying access to this KCM file > incorrectly? I still can´t put my finger on this, but I am under the impression that this phenomenon is the result of the KActivities-stats database being notified differently over different KDE versions. @Schlaefer: did you update your KDE version before noticing this bug, by any chance? > @Schlaefer: did you update your KDE version before noticing this bug, by any chance?
It happened on a live system which is kept up to date and was in regular use for over a year. I never saw duplicates before but immediately after updating to the 5.24 beta for testing. Since then the issue disappeared (multiple, different items are shown). So when it comes to version updates it was during the 5.23 → 5.24 plasma transition.
CCing Ivan who may understand more. Hi Schlaefer, Can you post the output of the following here (as two attachments). sqlite3 ~/.local/share/kactivitymanagerd/resources/database 'select * from ResourceScoreCache where initiatingAgent = "org.kde.systemsettings";' and sqlite3 ~/.local/share/kactivitymanagerd/resources/database 'select * from ResourceEvent where initiatingAgent = "org.kde.systemsettings";' I see two possible causes of this -- plasma changed how it reports KCM URLs (but the kcm: prefix wasn't added in 5.24) or, as you said, some other component reporting this the wrong way. This is not something that KActivities can handle, but we can prune the invalid ones easily when they are loaded in system settings. (In reply to Ivan Čukić from comment #10) > Hi Schlaefer, > > Can you post the output of the following here (as two attachments). > > sqlite3 ~/.local/share/kactivitymanagerd/resources/database 'select * from > ResourceScoreCache where initiatingAgent = "org.kde.systemsettings";' > > and > > sqlite3 ~/.local/share/kactivitymanagerd/resources/database 'select * from > ResourceEvent where initiatingAgent = "org.kde.systemsettings";' > > I see two possible causes of this -- plasma changed how it reports KCM URLs > (but the kcm: prefix wasn't added in 5.24) or, as you said, some other > component reporting this the wrong way. > > This is not something that KActivities can handle, but we can prune the > invalid ones easily when they are loaded in system settings. Hi Ivan, for what it's worth, I am sending you my output in the VM where I have been replicating it. Currently, I get duplicate output for "File Search" if I open systemsettings. > 0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:about-distro.desktop|0|3.0|1639847651|1648997945 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_baloofile.desktop|0|14.0|1639847870|1648998547 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_lookandfeel.desktop|0|26.0|1639864711|1648998245 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kwinoptions.desktop|0|0.0|1648996660|1648996660 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:screenlocker.desktop|0|0.0|1648996674|1648996674 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_translations.desktop|0|0.0|1648996682|1648996682 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_notifications.desktop|0|2.0|1648998038|1648998075 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:fontinst.desktop|0|0.0|1648998040|1648998040 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_workspace.desktop|0|0.0|1648998042|1648998042 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_kup.desktop|0|1.0|1648998067|1648998069 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_style.desktop|0|6.0|1648998225|1648998246 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_plasmasearch.desktop|0|7.0|1648998521|1648998547 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_lookandfeel|0|11.5568568269966|1649108250|1649600255 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_plasmasearch|0|20.412484512923|1649176526|1649529146 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_baloofile|0|8.96923323447635|1649177402|1649598590 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_style|0|1.0|1649179696|1649194468 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_updates|0|0.0|1649194308|1649194308 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_desktoptheme|0|0.0|1649194468|1649194468 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_kwindecoration|0|0.0|1649194473|1649194473 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_fonts|0|0.0|1649194473|1649194473 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_icons|0|0.0|1649194475|1649194475 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_translations|0|0.0|1649194599|1649194599 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_kscreen|0|0.0|1649509984|1649509984 > f0963528-319c-4763-a86b-580f3e27e664|org.kde.systemsettings|kcm:kcm_sddm|0|0.0|1649600261|1649600261 (In reply to Ivan Čukić from comment #10) > Hi Schlaefer, > > Can you post the output of the following here (as two attachments). > > sqlite3 ~/.local/share/kactivitymanagerd/resources/database 'select * from > ResourceScoreCache where initiatingAgent = "org.kde.systemsettings";' > > and > > sqlite3 ~/.local/share/kactivitymanagerd/resources/database 'select * from > ResourceEvent where initiatingAgent = "org.kde.systemsettings";' > > I see two possible causes of this -- plasma changed how it reports KCM URLs > (but the kcm: prefix wasn't added in 5.24) or, as you said, some other > component reporting this the wrong way. > > This is not something that KActivities can handle, but we can prune the > invalid ones easily when they are loaded in system settings. The second command instead produces the following output (I used pastebin since it is very long): https://pastebin.com/QxW41TRB Created attachment 148508 [details]
sqlite3 ResourceEvent and ResourceScoreCache output
Here the sqlite3 query result.
PS: Sorry for the late answer, it got buried in my inbox.
I can not reproduce the issue in 5.25. Even though I have some "kcm:kcm_baloofile" and "kcm:kcm_baloofile.desktop" file entries in my DB and I manually messed with their score so that they show up. Created attachment 150880 [details]
Still reproducing
Still reproducing for me; see attachment.
Can I send you my database file?
Please do :) Sure, where does it live? Created attachment 150889 [details]
duplicated module audio
I can reproduce as well - currently the Audio module is duplicated. Screenshot + db query results attached
Created attachment 150890 [details]
resourceEvent
+resource event
Created attachment 150891 [details]
ResourceScoreCache
+ ResourceScoreCache
I am unable to reproduce the issue by importing these two tables. The recently used pages are just empty :/ @Nate could you please send me your ~/.local/share/kactivitymanagerd/resources/database file? Maybe just do it using Mail/Telegram to avoid posting this much data publicly. Done. A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1105 Git commit 9a78c778c24564bf71571c3993deddb20baa104f by Alexander Lohnau. Committed on 20/08/2022 at 11:35. Pushed by alex into branch 'master'. Fix KCM duplicates in landingpage In systemsettings, we no longer write a ".desktop" at the end of the KCM ids. This change was made during Plasma 5.24. However, it causes duplicates on some setups. To avoid this, we ignore all of the old .desktop URLs. To ensure that we fill all of the 6 available items, the limit is increased to 12 and we check against a list how many results we have ignored. M +9 -2 kcms/landingpage/landingpage.cpp M +1 -0 kcms/landingpage/landingpage.h https://invent.kde.org/plasma/plasma-desktop/commit/9a78c778c24564bf71571c3993deddb20baa104f Git commit 44821ceddc9bd14f72bf1e9e4c5f22119f657262 by Alexander Lohnau. Committed on 21/08/2022 at 06:16. Pushed by alex into branch 'Plasma/5.25'. Fix KCM duplicates in landingpage In systemsettings, we no longer write a ".desktop" at the end of the KCM ids. This change was made during Plasma 5.24. However, it causes duplicates on some setups. To avoid this, we ignore all of the old .desktop URLs. To ensure that we fill all of the 6 available items, the limit is increased to 12 and we check against a list how many results we have ignored. (cherry picked from commit 9a78c778c24564bf71571c3993deddb20baa104f) M +9 -2 kcms/landingpage/landingpage.cpp M +1 -0 kcms/landingpage/landingpage.h https://invent.kde.org/plasma/plasma-desktop/commit/44821ceddc9bd14f72bf1e9e4c5f22119f657262 |
Created attachment 146230 [details] System Settings most used shows same module twice SUMMARY The "Most Used Settings" shows same item twice. STEPS TO REPRODUCE 1. Open System Settings 2. Have my setup and System Settings usage behavior OBSERVED RESULT "Display Configuration" is shown twice for me. See attached video. EXPECTED RESULT Display Configuration module should only be displayed once. SOFTWARE/OS VERSIONS Operating System: EndeavourOS KDE Plasma Version: 5.24.80 KDE Frameworks Version: 5.91.0 Qt Version: 5.15.2 Kernel Version: 5.16.4-242-tkg-cacule (64-bit) Graphics Platform: Wayland Processors: 12 × 11th Gen Intel® Core™ i5-11400 @ 2.60GHz Memory: 31,2 GiB of RAM Graphics Processor: AMD Radeon RX 5500 XT