Bug 467342 - Plasmashell does not start when logging in with external screen attached on laptop with MUX switch and defaulting to integrated GPU
Summary: Plasmashell does not start when logging in with external screen attached on l...
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: Startup process (other bugs)
Version First Reported In: 5.27.2
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-14 16:51 UTC by Rishabh
Modified: 2025-02-14 03:46 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rishabh 2023-03-14 16:51:32 UTC
SUMMARY
Plasmashell crashes when logging in just after boot with external monitor connected over HDMI

STEPS TO REPRODUCE
1. Attach external monitor over HDMI and select switch to external Display only.
2. Reboot Laptop.
3. Login when prompted

OBSERVED RESULT
Black Screen with just the cursor

EXPECTED RESULT
Normal Desktop with panels and wallpaper

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon 5.27
(available in About System)
KDE Plasma Version:  5.27
KDE Frameworks Version: 
Qt Version:  5.15

ADDITIONAL INFORMATION
observed the following in systemd logs

Mar 14 18:38:15 rishabh-asus-14 kactivitymanagerd[1975]: Couldn't start kglobalaccel from org.kde.kglobalaccel.service: QDBusError("org.freedesktop.DBus.Error.NoReply", "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.")
Mar 14 18:38:54 rishabh-asus-14 systemd[1215]: plasma-plasmashell.service: start operation timed out. Terminating.
Mar 14 18:38:54 rishabh-asus-14 systemd[1215]: plasma-plasmashell.service: Failed with result 'timeout'.
Mar 14 18:38:54 rishabh-asus-14 systemd[1215]: Failed to start KDE Plasma Workspace.
Comment 1 Nate Graham 2023-03-14 17:58:46 UTC
Looks like it didn't crash but rather it never launched successfully in the first place. Are you using X11 or Wayland?

Does it work when you only have one external screen?
Comment 2 Rishabh 2023-03-15 11:20:02 UTC
Hi Nate,
I have reproduced it with both wayland and x11.  I only have 1 external display and it is semi consistently reproducible.

Since it is a newer laptop all the drivers were not present in the kernel shipped with 5.27 so i manually installed linux 6.1 but i don't think that is the cause. but i could be wrong.  If required i am willing to set some flags/ gather some more logs for you. 

Currently after logging in i restart plasmashell using plasmashell --replace to get things moving.
Comment 3 Rishabh 2023-03-15 11:21:10 UTC
(In reply to Nate Graham from comment #1)
> Looks like it didn't crash but rather it never launched successfully in the
> first place. Are you using X11 or Wayland?
> 
> Does it work when you only have one external screen?

I forgot to add my previou comment as a reply.
Comment 4 Nate Graham 2023-03-15 16:06:19 UTC
Does it reproduce *without* the external display?
Comment 5 Rishabh 2023-03-15 16:48:14 UTC
(In reply to Nate Graham from comment #4)
> Does it reproduce *without* the external display?

No, Its only seen when system is booted with external display connected . Without one every thing works good.
Comment 6 Nate Graham 2023-03-15 19:38:07 UTC
Thanks. So plasma didn't start because kactivitymanagerd didn't start, which happened because it couldn't start kglobalaccel. Let's figure out what happened with kglobalaccel.

What happens if you run `systemctl start plasma-kglobalaccel.service` in a terminal window?

Also `systemctl status plasma-kglobalaccel.service`?
Comment 7 Rishabh 2023-03-16 15:11:39 UTC
(In reply to Nate Graham from comment #6)
> Thanks. So plasma didn't start because kactivitymanagerd didn't start, which
> happened because it couldn't start kglobalaccel. Let's figure out what
> happened with kglobalaccel.
> 
> What happens if you run `systemctl start plasma-kglobalaccel.service` in a
> terminal window?
> 
> Also `systemctl status plasma-kglobalaccel.service`?

rishabh@rishabh-asus-14:~$ systemctl start plasma-kglobalaccel.service
Failed to start plasma-kglobalaccel.service: Unit plasma-kglobalaccel.service not found.
rishabh@rishabh-asus-14:~$ systemctl status plasma-kglobalaccel.service
Unit plasma-kglobalaccel.service could not be found.
rishabh@rishabh-asus-14:~$ 

I looked i did not find any unit files with that name 

rishabh@rishabh-asus-14:~$ systemctl list-unit-files | grep plasma
rishabh@rishabh-asus-14:~$
Comment 8 Nate Graham 2023-03-16 15:20:24 UTC
Oh, does it work if you add --user to the command? I think I might have forgotten that part.
Comment 9 Rishabh 2023-03-16 16:25:18 UTC
(In reply to Nate Graham from comment #8)
> Oh, does it work if you add --user to the command? I think I might have
> forgotten that part.

Thanks that worked should have tried --user myself ;p. Here is the output, but this is with successful startup . Will add one when the startup fails. Sorry cant restart my system now have a meeting soon.

● plasma-kglobalaccel.service - KDE Global Shortcuts Server
     Loaded: loaded (/usr/lib/systemd/user/plasma-kglobalaccel.service; static)
     Active: active (running) since Thu 2023-03-16 20:37:04 IST; 1h 15min ago
   Main PID: 1534 (kglobalaccel5)
      Tasks: 3 (limit: 18107)
     Memory: 17.5M
        CPU: 1.292s
     CGroup: /user.slice/user-1000.slice/user@1000.service/background.slice/plasma-kglobalaccel.service
             └─1534 /usr/bin/kglobalaccel5

Mar 16 20:37:04 rishabh-asus-14 systemd[1331]: Starting KDE Global Shortcuts Server...
Mar 16 20:37:04 rishabh-asus-14 systemd[1331]: Started KDE Global Shortcuts Server.
Mar 16 20:38:21 rishabh-asus-14 kstart5[3417]: Omitting both --window and --windowclass arguments is not recommended
Mar 16 20:39:20 rishabh-asus-14 kstart5[3596]: Omitting both --window and --windowclass arguments is not recommended
Comment 10 Rishabh 2023-03-16 17:07:59 UTC
(In reply to Nate Graham from comment #8)
> Oh, does it work if you add --user to the command? I think I might have
> forgotten that part.

This is when i encountered  blackscreen with cursor the service itself seems to be running
 
● plasma-kglobalaccel.service - KDE Global Shortcuts Server
     Loaded: loaded (/usr/lib/systemd/user/plasma-kglobalaccel.service; static)
     Active: active (running) since Thu 2023-03-16 22:01:18 IST; 9min ago
   Main PID: 1487 (kglobalaccel5)
      Tasks: 3 (limit: 18107)
     Memory: 9.7M
        CPU: 8.148s
     CGroup: /user.slice/user-1000.slice/user@1000.service/background.slice/plasma-kglobalaccel.service
             └─1487 /usr/bin/kglobalaccel5

Mar 16 22:01:18 rishabh-asus-14 systemd[1287]: Starting KDE Global Shortcuts Server...
Mar 16 22:01:18 rishabh-asus-14 systemd[1287]: Started KDE Global Shortcuts Server.
Mar 16 22:03:02 rishabh-asus-14 kstart5[1774]: Omitting both --window and --windowclass arguments is not recommended

==================================Plasma shell =========================


● plasma-plasmashell.service - KDE Plasma Workspace
     Loaded: loaded (/usr/lib/systemd/user/plasma-plasmashell.service; disabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-03-16 22:01:18 IST; 19min ago
   Main PID: 1505 (plasmashell)
      Tasks: 10 (limit: 18107)
     Memory: 71.2M
        CPU: 501ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/plasma-plasmashell.service
             └─1505 /usr/bin/plasmashell --no-respawn

Mar 16 22:01:19 rishabh-asus-14 plasmashell[1505]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:78: TypeError: Cannot read property 'pluginName' of null
Mar 16 22:01:19 rishabh-asus-14 plasmashell[1505]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:80: TypeError: Cannot read property 'configuration' of null
Mar 16 22:01:19 rishabh-asus-14 plasmashell[1505]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:81: TypeError: Cannot read property 'configuration' of null
Mar 16 22:01:19 rishabh-asus-14 plasmashell[1505]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:82: TypeError: Cannot read property 'configuration' of null
Mar 16 22:01:19 rishabh-asus-14 plasmashell[1505]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:83: TypeError: Cannot read property 'configuration' of null
Mar 16 22:01:19 rishabh-asus-14 plasmashell[1505]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:84: TypeError: Cannot read property 'configuration' of null
Mar 16 22:01:19 rishabh-asus-14 plasmashell[1505]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:16: TypeError: Cannot read property 'configuration' of null
Mar 16 22:01:19 rishabh-asus-14 plasmashell[1505]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:17: TypeError: Cannot read property 'configuration' of null
Mar 16 22:01:19 rishabh-asus-14 plasmashell[1505]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:18: TypeError: Cannot read property 'configuration' of null
Mar 16 22:01:19 rishabh-asus-14 kioslave5[1739]: QObject::connect: No such slot DesktopProtocol::_k_slotRedirection(KIO::Job *, QUrl)
crash.plasmashell.log (END)
Comment 11 Rishabh 2023-03-18 09:29:17 UTC
Did these help?
Comment 12 Rishabh 2023-03-24 17:09:25 UTC
So changing my laptops MUX Mode to dedicated graphics fixed the issue for me . I am not sure why but it seems like for a brief while plasmashell was not seeing any monitor (neither laptop screen nor external display ) . Since other laptop with same plasma version is not showing this issue I think the root cause was the MUX Switch ... Although  I tried Fedora 37 (kde spin) Live disk and it did not have that issue.
Comment 13 Nate Graham 2023-03-27 18:09:00 UTC
Interesting, thanks.
Comment 14 Nate Graham 2025-01-15 18:52:55 UTC
Is this still happening with the MUX switch in a recent version of Plasma, like 6.2.5 or later?
Comment 15 Bug Janitor Service 2025-01-30 03:47:17 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 16 Bug Janitor Service 2025-02-14 03:46:46 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.