Some applications crash after switching to hybrid mode using optimus-manager

After 2021-12-10 update, I found that if I switch to hybrid mode using optimus-manager, some applications crash (e.g. kate, systemsettings5). But if I stay in integrated mode or switch to nvidia mode, there are no such problems.

Here is partial output of inxi -Fazy (I removed some unnecessary output)

  Kernel: 5.15.6-2-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
  root=UUID=afa722d3-54e3-4f86-871c-f0f2d4854516 rw quiet udev.log_priority=3
  Desktop: KDE Plasma 5.23.4 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1
  dm: SDDM Distro: Manjaro Linux base: Arch Linux
  Info: 8-Core model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64
  type: MT MCP arch: Zen 3 family: 19 (25) model-id: 50 (80) stepping: 0
  microcode: A50000C cache: L1: 512 KiB L2: 4 MiB L3: 16 MiB
  flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  bogomips: 102243
  Speed: 1480 MHz min/max: 1200/3200 MHz boost: enabled Core speeds (MHz):
  1: 1480 2: 1428 3: 1197 4: 2237 5: 2133 6: 1655 7: 1442 8: 1511 9: 1829
  10: 1197 11: 1809 12: 1388 13: 1729 14: 1197 15: 1670 16: 2608
  Vulnerabilities: Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
  mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
  mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, IBRS_FW,
  STIBP: always-on, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
  Device-1: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: Lenovo
  driver: nvidia v: 495.44 alternate: nouveau,nvidia_drm bus-ID: 01:00.0
  chip-ID: 10de:2560 class-ID: 0300
  Device-2: AMD Cezanne vendor: Lenovo driver: amdgpu v: kernel
  bus-ID: 06:00.0 chip-ID: 1002:1638 class-ID: 0300
  Display: x11 server: X.Org compositor: kwin_x11 driver:
  loaded: modesetting,nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 4480x1600 s-dpi: 96 s-size: 1184x423mm (46.6x16.7")
  s-diag: 1257mm (49.5")
  Monitor-1: eDP-1 res: 2560x1600 hz: 165 dpi: 188 size: 345x215mm (13.6x8.5")
  diag: 407mm (16")
  Monitor-2: HDMI-1-0 res: 1920x1080 hz: 60 dpi: 102
  size: 476x268mm (18.7x10.6") diag: 546mm (21.5")
  OpenGL: renderer: AMD RENOIR (DRM 3.42.0 5.15.6-2-MANJARO LLVM 13.0.0)
  v: 4.6 Mesa 21.2.5 direct render: Yes
  Processes: 372 Uptime: 34m wakeups: 4 Memory: 13.57 GiB
  used: 3.69 GiB (27.2%) Init: systemd v: 249 tool: systemctl Compilers:
  gcc: 11.1.0 alt: 7 clang: 13.0.0 Packages: pacman: 1686 lib: 406 Shell: Zsh
  v: 5.8 default: Bash v: 5.1.12 running-in: yakuake inxi: 3.3.09

Here is the result of gdb kate. gdb systemsettings5 has a familiar output.

Starting program: /usr/bin/kate 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/".
[New Thread 0x7ffff0746640 (LWP 12458)]
[New Thread 0x7fffef353640 (LWP 12459)]

Thread 1 "kate" received signal SIGSEGV, Segmentation fault.
0x00007ffff6c14c64 in QWidget::hide() () from /usr/lib/

I think it might be some problem of qt5 and nvidia driver, but I don’t know how to fix it.

Anybody can help me? Thanks a lot.