Bug 457668

Summary: slow to desktop and widget does not load properly
Product: [Plasma] plasmashell Reporter: lesto <lestofante88>
Component: Startup processAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kde, nate, nicolas.fella
Priority: NOR    
Version: 5.25.5   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: systemd log of the boot + double login
wayland boot fail, complete
failed_xdg.txt

Description lesto 2022-08-09 10:36:33 UTC
SUMMARY
After update to 5.25 (not sure about sub-version, looking at my deletion of .config it is few days after 5.25.1) startup has been very slow.
After login, it used to be pretty much immediate to have usable desktop; now i get my background without any panel for 5-10 seconds, then the screen goes black, then desktop appear.
Also my Vaults, KDE Connect and maybe few more will NOT load properly, they are running but see no vaults/device connected, i need to log out and log back in; 
then the log in will be immediate as normal, and all the widget works as expected.

So pretty much for a few weeks I log in, wait ~30seconds to log in, log out, and log in again.  

I tried removing the ".local/share/plasma*" to start from a clean startup, but the issue persist.  
  
There seems to be no error reported in jounalctl, so i have no idea how to start debugging this.

STEPS TO REPRODUCE
1. update to 5.25
2. log in

OBSERVED RESULT
very slow to desktop, broken widget

EXPECTED RESULT
immediate to working desktop

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.18.16-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 5700 XT
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B450 AORUS PRO
Comment 1 Nate Graham 2022-08-09 19:31:39 UTC
How many screens are you using?

Are there any crashes during login? You can check using `coredumpctl --reverse`; the items at the top will be the most recent crashes. If you find any, can you paste the output of that command that shows the new crashes that happened during login?
Comment 2 lesto 2022-08-09 21:44:44 UTC
(In reply to Nate Graham from comment #1)
> How many screens are you using?

AH, ok, if we talk screen, then something weird also start to happen.
First of all, i am using xorg, with 2 screen, primary is 1440p 75Hz and the other 1080p 60Hz
The 1440p is slower to start up, but lately seems to be "slower". Switching to a virtual terminal with ctrl+alt+Fx seems immediate and works correctly.
BUT, this also happen when only the 1440p monitor is on.

> Are there any crashes during login? You can check using `coredumpctl
> --reverse`; the items at the top will be the most recent crashes. If you
> find any, can you paste the output of that command that shows the new
> crashes that happened during login?

no crashed according to `coredumpctl  --reverse`, just a few of unrelated program i use daily (vscode, clion, teams)

I logged in into a test user, that should be clean.
Same problem, login from sddm started at 23:28:37, i got dolpin opened almost immediately full screen (so it IS able to restore session, at least partially correct, it is trying to open my main user home.. but sure was not left open on that), panels does not appear until 23:29:30, then the system is fully usable.
Then i log out at 23:29:53, at 23:30:02 there is a coredump, and actually what i notice is instead of monitor going black for a moment after log out, it took a few seconds longer.
At 23:30:33 we can see the second login, and in less than a few seconds I am on the fully functional desktop.  
  
Notice, this was a default user, my main user does NOT use session restore, so we can exclude some rogue issue there.

See boot.txt
Comment 3 lesto 2022-08-09 21:45:53 UTC
Created attachment 151205 [details]
systemd log of the boot + double login
Comment 4 Nate Graham 2022-08-10 14:35:51 UTC
Thanks for the info.

Can you try the Wayland session and see if it's broken there too? In general, multi-monitor mixed DPI mixed refresh rate use cases work better there too.
Comment 5 lesto 2022-08-10 16:15:12 UTC
wayland even worse, it has completerly froze my system, not even virtual console or the capslock light. 
Seems like the magic REISUB worked tho, so the kernel was alive

Also note those test have been made with only ONE monitor on (but the other still connected, maybe i should try disconnect it?)

I just remember at certain point i switched from proprietary AMDGPU to the open Radeonsi, im now gonna try switch back and see it that was the source of the issue!
Comment 6 lesto 2022-08-10 16:16:38 UTC
Created attachment 151227 [details]
wayland boot fail, complete
Comment 7 lesto 2022-08-10 16:52:29 UTC
my bad, i was playing a bit around with vulkan driver (radeon vs amdvlk) but is all back to initial state and the issue is still there
Comment 8 Bug Janitor Service 2022-08-25 04:35:45 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 9 Bug Janitor Service 2022-09-09 04:36:43 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now 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

Thank you for helping us make KDE software even better for everyone!
Comment 10 lesto 2022-09-21 08:05:44 UTC
The issue was and is still present, if NEEDINFO please let me know what info I can collect

Current configuration:
Operating System: Arch Linux
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 5.19.9-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 5700 XT
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B450 AORUS PRO
Comment 11 Nate Graham 2022-09-22 14:50:50 UTC
You've got a kernel/GU driver bug:

Aug 10 18:07:24 primero kernel: amdgpu 0000:0d:00.0: amdgpu: SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x0000000D SMN_C2PMSG_82:0x00000000
Aug 10 18:07:24 primero kernel: amdgpu 0000:0d:00.0: amdgpu: Failed to retrieve enabled ppfeatures!
Aug 10 18:07:27 primero kernel: rtl_usb: reg 0x80, usbctrl_vendorreq TimeOut! status:0xffffff92 value=0xa500
Aug 10 18:07:28 primero kernel: amdgpu 0000:0d:00.0: amdgpu: SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x0000000D SMN_C2PMSG_82:0x00000000
Aug 10 18:07:28 primero kernel: amdgpu 0000:0d:00.0: amdgpu: Failed to retrieve enabled ppfeatures!
Aug 10 18:07:29 primero kernel: BUG: kernel NULL pointer dereference, address: 0000000000000568
Aug 10 18:07:29 primero kernel: #PF: supervisor read access in kernel mode
Aug 10 18:07:29 primero kernel: #PF: error_code(0x0000) - not-present page
Aug 10 18:07:29 primero kernel: PGD 0 P4D 0 
Aug 10 18:07:29 primero kernel: Oops: 0000 [#1] PREEMPT SMP NOPTI
Aug 10 18:07:29 primero kernel: CPU: 11 PID: 825 Comm: kwin_wayland Tainted: G           OE     5.18.16-arch1-1 #1 dd4fdd19f9b9db73fa00a1e8bfc0950337edf3ef
Aug 10 18:07:29 primero kernel: Hardware name: Gigabyte Technology Co., Ltd. B450 AORUS PRO/B450 AORUS PRO-CF, BIOS F62d 10/13/2021
Aug 10 18:07:29 primero kernel: RIP: 0010:dcn20_program_front_end_for_ctx+0x419/0xfb0 [amdgpu]
Aug 10 18:07:29 primero kernel: Code: 8b 80 28 01 00 00 48 85 c0 75 d0 41 0f b6 84 24 f0 07 00 00 4d 8b b7 20 fb 00 00 89 c2 a8 01 0f 85 e3 05 00 00 49 8b 4c 24 08 <f6> 81 68 05 00 00 08 0f 85 d1 05 00 00 a8 08 0f 84 c9 00 00 00 49
Aug 10 18:07:29 primero kernel: RSP: 0018:ffffabae828a7778 EFLAGS: 00010246
Aug 10 18:07:29 primero kernel: RAX: 0000000000000000 RBX: ffff9597cb987800 RCX: 0000000000000000
Aug 10 18:07:29 primero kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
Aug 10 18:07:29 primero kernel: RBP: ffffabae828a7810 R08: 0000000000000000 R09: 0000000000000000
Aug 10 18:07:29 primero kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffff9597f9982a38
Aug 10 18:07:29 primero kernel: R13: ffff9597f3de9800 R14: ffff9597c120ac00 R15: ffff9597cb860000
Aug 10 18:07:29 primero kernel: FS:  00007faeb9a16f40(0000) GS:ffff959aeecc0000(0000) knlGS:0000000000000000
Aug 10 18:07:29 primero kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Aug 10 18:07:29 primero kernel: CR2: 0000000000000568 CR3: 0000000129752000 CR4: 0000000000350ee0
Aug 10 18:07:29 primero kernel: Call Trace:
Aug 10 18:07:29 primero kernel:  <TASK>
Aug 10 18:07:29 primero kernel:  dc_commit_state+0x3f5/0xad0 [amdgpu 664434debd98b50e06aa184e4b751ae76f4ecf30]
Aug 10 18:07:29 primero kernel:  amdgpu_dm_atomic_commit_tail+0x54a/0x2790 [amdgpu 664434debd98b50e06aa184e4b751ae76f4ecf30]
Aug 10 18:07:29 primero kernel:  ? dcn20_fast_validate_bw+0x36d/0x410 [amdgpu 664434debd98b50e06aa184e4b751ae76f4ecf30]
Aug 10 18:07:29 primero kernel:  ? dcn20_validate_bandwidth_internal+0xfe/0x2b0 [amdgpu 664434debd98b50e06aa184e4b751ae76f4ecf30]
Aug 10 18:07:29 primero kernel:  ? dc_fpu_end+0x97/0xb0 [amdgpu 664434debd98b50e06aa184e4b751ae76f4ecf30]
Aug 10 18:07:29 primero kernel:  ? dcn20_validate_bandwidth+0x47/0x60 [amdgpu 664434debd98b50e06aa184e4b751ae76f4ecf30]
Aug 10 18:07:29 primero kernel:  ? dc_validate_global_state+0x310/0x3e0 [amdgpu 664434debd98b50e06aa184e4b751ae76f4ecf30]
Aug 10 18:07:29 primero kernel:  ? ttm_resource_compat+0x27/0x60 [ttm 3d31336058520ec2ff82404ee51206d51718f6bb]
Aug 10 18:07:29 primero kernel:  ? ttm_bo_validate+0x4c/0x160 [ttm 3d31336058520ec2ff82404ee51206d51718f6bb]
Aug 10 18:07:29 primero kernel:  ? ttm_bo_move_to_lru_tail+0x173/0x1f0 [ttm 3d31336058520ec2ff82404ee51206d51718f6bb]
Aug 10 18:07:29 primero kernel:  ? amdgpu_vm_del_from_lru_notify+0x12/0x80 [amdgpu 664434debd98b50e06aa184e4b751ae76f4ecf30]
Aug 10 18:07:29 primero kernel:  ? ttm_eu_backoff_reservation+0x67/0x80 [ttm 3d31336058520ec2ff82404ee51206d51718f6bb]
Aug 10 18:07:29 primero kernel:  ? amdgpu_bo_gpu_offset+0x72/0xc0 [amdgpu 664434debd98b50e06aa184e4b751ae76f4ecf30]
Aug 10 18:07:29 primero kernel:  ? dm_plane_helper_prepare_fb+0x198/0x2f0 [amdgpu 664434debd98b50e06aa184e4b751ae76f4ecf30]
Aug 10 18:07:29 primero kernel:  ? __wait_for_common+0x19d/0x1d0
Aug 10 18:07:29 primero kernel:  ? usleep_range_state+0x90/0x90
Aug 10 18:07:29 primero kernel:  commit_tail+0x94/0x130
Aug 10 18:07:29 primero kernel:  drm_atomic_helper_commit+0x116/0x140
Aug 10 18:07:29 primero kernel:  drm_mode_atomic_ioctl+0x9be/0xbd0
Aug 10 18:07:29 primero kernel:  ? drm_plane_get_damage_clips.cold+0x1c/0x1c
Aug 10 18:07:29 primero kernel:  ? drm_atomic_set_property+0xb40/0xb40
Aug 10 18:07:29 primero kernel:  drm_ioctl_kernel+0xcd/0x170
Aug 10 18:07:29 primero kernel:  drm_ioctl+0x231/0x410
Aug 10 18:07:29 primero kernel:  ? drm_atomic_set_property+0xb40/0xb40
Aug 10 18:07:29 primero kernel:  amdgpu_drm_ioctl+0x4e/0x90 [amdgpu 664434debd98b50e06aa184e4b751ae76f4ecf30]
Aug 10 18:07:29 primero kernel:  __x64_sys_ioctl+0x94/0xd0
Aug 10 18:07:29 primero kernel:  do_syscall_64+0x5f/0x90
Aug 10 18:07:29 primero kernel:  ? syscall_exit_to_user_mode+0x26/0x50
Aug 10 18:07:29 primero kernel:  ? do_syscall_64+0x6b/0x90
Aug 10 18:07:29 primero kernel:  ? syscall_exit_to_user_mode+0x26/0x50
Aug 10 18:07:29 primero kernel:  ? do_syscall_64+0x6b/0x90
Aug 10 18:07:29 primero kernel:  ? do_syscall_64+0x6b/0x90
Aug 10 18:07:29 primero kernel:  entry_SYSCALL_64_after_hwframe+0x61/0xcb
Aug 10 18:07:29 primero kernel: RIP: 0033:0x7faebe3189ef
Aug 10 18:07:29 primero kernel: Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 18 48 8b 44 24 18 64 48 2b 04 25 28 00 00
Aug 10 18:07:29 primero kernel: RSP: 002b:00007ffffb14a3d0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
Aug 10 18:07:29 primero kernel: RAX: ffffffffffffffda RBX: 0000564346bacda0 RCX: 00007faebe3189ef
Aug 10 18:07:29 primero kernel: RDX: 00007ffffb14a470 RSI: 00000000c03864bc RDI: 0000000000000015
Aug 10 18:07:29 primero kernel: RBP: 00007ffffb14a470 R08: 0000000000000005 R09: 0000000000000005
Aug 10 18:07:29 primero kernel: R10: 00007faebe3f2080 R11: 0000000000000246 R12: 00000000c03864bc
Aug 10 18:07:29 primero kernel: R13: 0000000000000015 R14: 0000564346943600 R15: 0000564346edbf50
Aug 10 18:07:29 primero kernel:  </TASK>
Aug 10 18:07:29 primero kernel: Modules linked in: rtl8xxxu cmac algif_hash algif_skcipher af_alg it87 bnep hwmon_vid intel_rapl_msr btusb intel_rapl_common btrtl btbcm rtl8192cu btintel rtl_usb btmtk rtl8192c_common edac_mce_amd snd_hda_codec_realtek bluetooth rtlwifi kvm_amd snd_hda_codec_generic joydev mousedev ledtrig_audio ecdh_generic snd_hda_codec_hdmi snd_usb_audio mac80211 kvm snd_hda_intel snd_usbmidi_lib snd_intel_dspcfg snd_intel_sdw_acpi irqbypass snd_rawmidi crct10dif_pclmul snd_hda_codec crc32_pclmul ghash_clmulni_intel snd_seq_device snd_hda_core libarc4 mc snd_hwdep aesni_intel crypto_simd snd_pcm gigabyte_wmi igb wmi_bmof snd_timer cryptd vfat usbhid fat rapl snd pcspkr tpm_crb dca ccp sp5100_tco soundcore k10temp i2c_piix4 tpm_tis tpm_tis_core tpm gpio_amdpt rng_core gpio_generic pinctrl_amd cfg80211 mac_hid wmi lzo_rle acpi_cpufreq rfkill vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) i2c_dev sg crypto_user fuse zram bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2
Aug 10 18:07:29 primero kernel:  xhci_pci nvme crc32c_intel nvme_core xhci_pci_renesas amdgpu drm_ttm_helper ttm gpu_sched drm_dp_helper
Aug 10 18:07:29 primero kernel: CR2: 0000000000000568
Aug 10 18:07:29 primero kernel: ---[ end trace 0000000000000000 ]---
Aug 10 18:07:29 primero kernel: RIP: 0010:dcn20_program_front_end_for_ctx+0x419/0xfb0 [amdgpu]
Aug 10 18:07:29 primero kernel: Code: 8b 80 28 01 00 00 48 85 c0 75 d0 41 0f b6 84 24 f0 07 00 00 4d 8b b7 20 fb 00 00 89 c2 a8 01 0f 85 e3 05 00 00 49 8b 4c 24 08 <f6> 81 68 05 00 00 08 0f 85 d1 05 00 00 a8 08 0f 84 c9 00 00 00 49
Aug 10 18:07:29 primero kernel: RSP: 0018:ffffabae828a7778 EFLAGS: 00010246
Aug 10 18:07:29 primero kernel: RAX: 0000000000000000 RBX: ffff9597cb987800 RCX: 0000000000000000
Aug 10 18:07:29 primero kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
Aug 10 18:07:29 primero kernel: RBP: ffffabae828a7810 R08: 0000000000000000 R09: 0000000000000000
Aug 10 18:07:29 primero kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffff9597f9982a38
Aug 10 18:07:29 primero kernel: R13: ffff9597f3de9800 R14: ffff9597c120ac00 R15: ffff9597cb860000
Aug 10 18:07:29 primero kernel: FS:  00007faeb9a16f40(0000) GS:ffff959aeecc0000(0000) knlGS:0000000000000000
Aug 10 18:07:29 primero kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Aug 10 18:07:29 primero kernel: CR2: 0000000000000568 CR3: 0000000129752000 CR4: 0000000000350ee0


I'd recommend that you report this upstream to https://bugzilla.kernel.org.
Comment 12 lesto 2022-09-24 09:41:02 UTC
I upgraded to linux kernel 5.19.10 and so far seems everything is fine.

As side note, I find very interesting how a kernel issue with the graphics driver, break unrelated functionality, but also that those broken application does not seems to report anything.
Comment 13 lesto 2022-10-01 11:01:20 UTC
ok, the kernel problem seems gone, the system mostly works, BUT i still sporadically get the issue.  
But at least now there is a bit more info:

Oct 01 12:39:33 primero xdg-desktop-portal-kde[737]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                                                     
                                                     Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

full log of `journalctl -p 3 -xb` attached as failed_xdg.tx
Comment 14 lesto 2022-10-01 11:01:41 UTC
Created attachment 152533 [details]
failed_xdg.txt
Comment 15 Nate Graham 2022-10-09 20:50:16 UTC
Oh that's Bug 458865.

*** This bug has been marked as a duplicate of bug 458865 ***