Bug 467951

Summary: Sometimes newly-created items in ~/Desktop don't appear in Folder View until Plasmashell is restarted or a screen is unplugged and plugged in again
Product: [Plasma] plasmashell Reporter: Valerio Galdo <valerio.galdo>
Component: FolderAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, hein, nate, niccolo.venerandi, notmart
Priority: NOR    
Version: 5.27.3   
Target Milestone: 1.0   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 6.0
Sentry Crash Report:
Attachments: i created a new folder in dolphin but i can't see it in the folder view
thi is a new video
attachment-2539391-0.html
video.mp4

Description Valerio Galdo 2023-03-29 23:24:27 UTC
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
***


STEPS TO REPRODUCE
1. login 
2. I can't see the content of the folder desktop
3. i have to switch from folder view to desktop view and back to see the content

OBSERVED RESULT
If i unplug the secon screen everything works



EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: kde Neon 5.27
(available in About System)
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.18

ADDITIONAL INFORMATION
Comment 1 veggero 2023-03-31 15:47:15 UTC
Hi! Could you provide some screenshots/recordings of this?
Comment 2 Valerio Galdo 2023-03-31 17:30:50 UTC
Created attachment 157746 [details]
i created a new folder in dolphin but i can't see it in the folder view

this also happens with a fresh install of kde neon
Comment 3 Valerio Galdo 2023-03-31 17:33:28 UTC
(In reply to veggero from comment #1)
> Hi! Could you provide some screenshots/recordings of this?

Hi i made a video but it doesn't work
Comment 4 Valerio Galdo 2023-03-31 17:46:25 UTC
Created attachment 157747 [details]
thi is a new video
Comment 5 Nate Graham 2023-04-04 18:50:41 UTC
It sounds like the mapping of desktops to screens has gotten confused, and has caused a desktop to get misplaced. We do have a UI to recover it in the form of the "Manage Desktops and Panels" window, which should let you manually restore the setup yo want You can access it like so:

Right-click on desktop > click on "Enter Edit Mode" > a toolbar pops down from the top of the screen > click on "Manage Desktops and Panels"

Can you use this to drag the desktop back to the screen you want it to on? And if you do, does the problem stop happening on subsequent logins? Or does it keep happening after manually fixing it?

If that config window did not fix the issue, can you create a new user account on the machine and see if it happens as well with the new user account? This will let us know if it's a universal issue with your setup, or it's something specific to the config data in your existing user account.

Thanks!
Comment 6 Valerio Galdo 2023-04-05 06:22:15 UTC
Created attachment 157860 [details]
attachment-2539391-0.html

I've already tested with the UI, I've also tested with a new user and even
with a kde neon installation, but the bug it's the same.
But if i run

$ plasmashell --replace </dev/null &>/dev/null & disown

the bug is fixed until reboot.

Il mar 4 apr 2023, 20:50 Nate Graham <bugzilla_noreply@kde.org> ha scritto:

> https://bugs.kde.org/show_bug.cgi?id=467951
>
> Nate Graham <nate@kde.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>          Resolution|---                         |WAITINGFORINFO
>                  CC|                            |nate@kde.org
>             Version|git-stable-Plasma/5.27      |5.27.3
>              Status|REPORTED                    |NEEDSINFO
>
> --- Comment #5 from Nate Graham <nate@kde.org> ---
> It sounds like the mapping of desktops to screens has gotten confused, and
> has
> caused a desktop to get misplaced. We do have a UI to recover it in the
> form of
> the "Manage Desktops and Panels" window, which should let you manually
> restore
> the setup yo want You can access it like so:
>
> Right-click on desktop > click on "Enter Edit Mode" > a toolbar pops down
> from
> the top of the screen > click on "Manage Desktops and Panels"
>
> Can you use this to drag the desktop back to the screen you want it to on?
> And
> if you do, does the problem stop happening on subsequent logins? Or does it
> keep happening after manually fixing it?
>
> If that config window did not fix the issue, can you create a new user
> account
> on the machine and see if it happens as well with the new user account?
> This
> will let us know if it's a universal issue with your setup, or it's
> something
> specific to the config data in your existing user account.
>
> Thanks!
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 7 Valerio Galdo 2023-04-05 07:05:00 UTC
Take a look at this

Il giorno mer 5 apr 2023 alle ore 08:21 Valerio Galdo <
valerio.galdo@gmail.com> ha scritto:

> I've already tested with the UI, I've also tested with a new user and even
> with a kde neon installation, but the bug it's the same.
> But if i run
>
> $ plasmashell --replace </dev/null &>/dev/null & disown
>
> the bug is fixed until reboot.
>
> Il mar 4 apr 2023, 20:50 Nate Graham <bugzilla_noreply@kde.org> ha
> scritto:
>
>> https://bugs.kde.org/show_bug.cgi?id=467951
>>
>> Nate Graham <nate@kde.org> changed:
>>
>>            What    |Removed                     |Added
>>
>> ----------------------------------------------------------------------------
>>          Resolution|---                         |WAITINGFORINFO
>>                  CC|                            |nate@kde.org
>>             Version|git-stable-Plasma/5.27      |5.27.3
>>              Status|REPORTED                    |NEEDSINFO
>>
>> --- Comment #5 from Nate Graham <nate@kde.org> ---
>> It sounds like the mapping of desktops to screens has gotten confused,
>> and has
>> caused a desktop to get misplaced. We do have a UI to recover it in the
>> form of
>> the "Manage Desktops and Panels" window, which should let you manually
>> restore
>> the setup yo want You can access it like so:
>>
>> Right-click on desktop > click on "Enter Edit Mode" > a toolbar pops down
>> from
>> the top of the screen > click on "Manage Desktops and Panels"
>>
>> Can you use this to drag the desktop back to the screen you want it to
>> on? And
>> if you do, does the problem stop happening on subsequent logins? Or does
>> it
>> keep happening after manually fixing it?
>>
>> If that config window did not fix the issue, can you create a new user
>> account
>> on the machine and see if it happens as well with the new user account?
>> This
>> will let us know if it's a universal issue with your setup, or it's
>> something
>> specific to the config data in your existing user account.
>>
>> Thanks!
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
>
>
Comment 8 Valerio Galdo 2023-04-05 07:09:43 UTC
Created attachment 157861 [details]
video.mp4

Sorry i retry...

Il giorno mer 5 apr 2023 alle ore 09:04 Valerio Galdo <
valerio.galdo@gmail.com> ha scritto:

> Take a look at this
>
> Il giorno mer 5 apr 2023 alle ore 08:21 Valerio Galdo <
> valerio.galdo@gmail.com> ha scritto:
>
>> I've already tested with the UI, I've also tested with a new user and
>> even with a kde neon installation, but the bug it's the same.
>> But if i run
>>
>> $ plasmashell --replace </dev/null &>/dev/null & disown
>>
>> the bug is fixed until reboot.
>>
>> Il mar 4 apr 2023, 20:50 Nate Graham <bugzilla_noreply@kde.org> ha
>> scritto:
>>
>>> https://bugs.kde.org/show_bug.cgi?id=467951
>>>
>>> Nate Graham <nate@kde.org> changed:
>>>
>>>            What    |Removed                     |Added
>>>
>>> ----------------------------------------------------------------------------
>>>          Resolution|---                         |WAITINGFORINFO
>>>                  CC|                            |nate@kde.org
>>>             Version|git-stable-Plasma/5.27      |5.27.3
>>>              Status|REPORTED                    |NEEDSINFO
>>>
>>> --- Comment #5 from Nate Graham <nate@kde.org> ---
>>> It sounds like the mapping of desktops to screens has gotten confused,
>>> and has
>>> caused a desktop to get misplaced. We do have a UI to recover it in the
>>> form of
>>> the "Manage Desktops and Panels" window, which should let you manually
>>> restore
>>> the setup yo want You can access it like so:
>>>
>>> Right-click on desktop > click on "Enter Edit Mode" > a toolbar pops
>>> down from
>>> the top of the screen > click on "Manage Desktops and Panels"
>>>
>>> Can you use this to drag the desktop back to the screen you want it to
>>> on? And
>>> if you do, does the problem stop happening on subsequent logins? Or does
>>> it
>>> keep happening after manually fixing it?
>>>
>>> If that config window did not fix the issue, can you create a new user
>>> account
>>> on the machine and see if it happens as well with the new user account?
>>> This
>>> will let us know if it's a universal issue with your setup, or it's
>>> something
>>> specific to the config data in your existing user account.
>>>
>>> Thanks!
>>>
>>> --
>>> You are receiving this mail because:
>>> You reported the bug.
>>
>>
Comment 9 Valerio Galdo 2023-04-14 18:27:51 UTC
Nothing news?
Comment 10 Nate Graham 2023-04-14 19:57:26 UTC

*** This bug has been marked as a duplicate of bug 467092 ***
Comment 11 Nate Graham 2023-11-08 20:33:29 UTC
Git commit 1c8a4d1e46b9a519ab6576d3b9829eb611c5c9a5 by Nate Graham, on behalf of Harald Sitter.
Committed on 08/11/2023 at 21:27.
Pushed by ngraham into branch 'master'.

foldermodel: lift screen add/remove handling out of screenmapper

screenmapper is the wrong place for it because we don't know the url
inside the mapper. Instead handle events in the foldermodel and
correctly delegate the add/remove actions to the mapper with both our
screenId AND the activityId

notably the previous code would incorrectly invoke addScreen with empty
activityIds triggering fallback handling that resulted in incorrect
m_screensPerPath management (there would be no screen associated with
our url anymore after a screenAdded signal because our screen got
associated with no url) and consequently firstAvailableScreen would
return no screen for our url (remember: we are associated with no url)
making FolderModel::filterAcceptsRow return false and filtering
completely valid entries
Related: bug 467092

possibly also is the root cause behind

M  +11   -1    containments/desktop/plugins/folder/foldermodel.cpp
M  +1    -8    containments/desktop/plugins/folder/screenmapper.cpp
M  +1    -1    containments/desktop/plugins/folder/screenmapper.h

https://invent.kde.org/plasma/plasma-desktop/-/commit/1c8a4d1e46b9a519ab6576d3b9829eb611c5c9a5
Comment 12 Nate Graham 2023-11-08 20:44:39 UTC
Git commit a6bc63103ed128ffe0fd843eb3c4416ede835fde by Nate Graham, on behalf of Harald Sitter.
Committed on 08/11/2023 at 21:36.
Pushed by ngraham into branch 'Plasma/5.27'.

foldermodel: lift screen add/remove handling out of screenmapper

screenmapper is the wrong place for it because we don't know the url
inside the mapper. Instead handle events in the foldermodel and
correctly delegate the add/remove actions to the mapper with both our
screenId AND the activityId

notably the previous code would incorrectly invoke addScreen with empty
activityIds triggering fallback handling that resulted in incorrect
m_screensPerPath management (there would be no screen associated with
our url anymore after a screenAdded signal because our screen got
associated with no url) and consequently firstAvailableScreen would
return no screen for our url (remember: we are associated with no url)
making FolderModel::filterAcceptsRow return false and filtering
completely valid entries
Related: bug 467092

possibly also is the root cause behind

M  +11   -1    containments/desktop/plugins/folder/foldermodel.cpp
M  +1    -8    containments/desktop/plugins/folder/screenmapper.cpp
M  +1    -1    containments/desktop/plugins/folder/screenmapper.h

https://invent.kde.org/plasma/plasma-desktop/-/commit/a6bc63103ed128ffe0fd843eb3c4416ede835fde