[GH-ISSUE #5714] [BUG]: Wayland global shortcuts fail on KDE Plasma with Electron 31 (works under XWayland) #5251

Closed
opened 2026-06-05 14:52:56 -04:00 by yindo · 2 comments
Owner

Originally created by @basiphobe on GitHub (May 27, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5714

How are you running AnythingLLM?

Normally:

AppImage launched directly under KDE Plasma 6 Wayland.

Tested launch commands:

Native Wayland (fails to register global shortcuts):
./AnythingLLMDesktop.AppImage --enable-features=UseOzonePlatform,GlobalShortcutsPortal --ozone-platform=wayland

XWayland (global shortcuts work correctly):
./AnythingLLMDesktop.AppImage --ozone-platform=x11

Desktop file:
Exec=./AnythingLLMDesktop.AppImage

What happened?

Environment:

  • KDE Plasma 6
  • Wayland session
  • Ubuntu Questing
  • AnythingLLM Desktop AppImage
  • Electron 31.7.7 (bundled)

Observed behavior:

  • Desktop Assistant global shortcut fails to register for every Ctrl+key.
  • UI always reports:
    "Failed to register Ctrl+. It may conflict with another shortcut."

Verified:

  • KDE global shortcuts work normally.
  • 1Password KDE global shortcut works.
  • Discord global shortcuts work under Electron 37.6.0.
  • No conflicting KDE shortcut exists.
  • AnythingLLM creates no KDE kglobalaccel component when registration fails.
  • AnythingLLM creates no GlobalShortcuts portal session.
  • AnythingLLM source code uses Electron globalShortcut.register().

Critical test:

  • Launching AnythingLLM with:
    --ozone-platform=x11
    makes global shortcuts work immediately.

Conclusion:

  • Failure appears specific to native Wayland + Electron 31 globalShortcut handling.
  • XWayland is a functional workaround.

Are there known steps to reproduce?

Steps to reproduce:

  1. Run KDE Plasma 6 under a native Wayland session on Linux.
  2. Launch the AnythingLLM Desktop AppImage normally.
  3. Open:
    Settings → Desktop Assistant
  4. Attempt to set any assistant shortcut such as:
    Ctrl+J
    Ctrl+K
    Ctrl+/
  5. Observe:
    "Failed to register Ctrl+. It may conflict with another shortcut."
  6. Verify there are no KDE shortcut conflicts.
  7. Quit AnythingLLM completely.
  8. Relaunch using XWayland:
    ./AnythingLLMDesktop.AppImage --ozone-platform=x11
  9. Repeat the same shortcut registration attempt.
  10. Observe:
    Shortcut registration succeeds and the Desktop Assistant hotkey works normally.

Additional notes:

  • KDE global shortcuts work correctly for other applications.
  • Discord global shortcuts work under Electron 37.6.0.
  • AnythingLLM bundles Electron 31.7.7.
  • Issue appears specific to native Wayland + Electron globalShortcut handling.

LLM Provider & Model (if applicable)

Not applicable

Embedder Provider & Model (if applicable)

Not applicable

Originally created by @basiphobe on GitHub (May 27, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5714 ### How are you running AnythingLLM? Normally: AppImage launched directly under KDE Plasma 6 Wayland. Tested launch commands: Native Wayland (fails to register global shortcuts): ./AnythingLLMDesktop.AppImage --enable-features=UseOzonePlatform,GlobalShortcutsPortal --ozone-platform=wayland XWayland (global shortcuts work correctly): ./AnythingLLMDesktop.AppImage --ozone-platform=x11 Desktop file: Exec=./AnythingLLMDesktop.AppImage ### What happened? Environment: * KDE Plasma 6 * Wayland session * Ubuntu Questing * AnythingLLM Desktop AppImage * Electron 31.7.7 (bundled) Observed behavior: * Desktop Assistant global shortcut fails to register for every Ctrl+key. * UI always reports: "Failed to register Ctrl+<key>. It may conflict with another shortcut." Verified: * KDE global shortcuts work normally. * 1Password KDE global shortcut works. * Discord global shortcuts work under Electron 37.6.0. * No conflicting KDE shortcut exists. * AnythingLLM creates no KDE kglobalaccel component when registration fails. * AnythingLLM creates no GlobalShortcuts portal session. * AnythingLLM source code uses Electron globalShortcut.register(). Critical test: * Launching AnythingLLM with: --ozone-platform=x11 makes global shortcuts work immediately. Conclusion: * Failure appears specific to native Wayland + Electron 31 globalShortcut handling. * XWayland is a functional workaround. ### Are there known steps to reproduce? Steps to reproduce: 1. Run KDE Plasma 6 under a native Wayland session on Linux. 2. Launch the AnythingLLM Desktop AppImage normally. 3. Open: Settings → Desktop Assistant 4. Attempt to set any assistant shortcut such as: Ctrl+J Ctrl+K Ctrl+/ 5. Observe: "Failed to register Ctrl+<key>. It may conflict with another shortcut." 6. Verify there are no KDE shortcut conflicts. 7. Quit AnythingLLM completely. 8. Relaunch using XWayland: ./AnythingLLMDesktop.AppImage --ozone-platform=x11 9. Repeat the same shortcut registration attempt. 10. Observe: Shortcut registration succeeds and the Desktop Assistant hotkey works normally. Additional notes: * KDE global shortcuts work correctly for other applications. * Discord global shortcuts work under Electron 37.6.0. * AnythingLLM bundles Electron 31.7.7. * Issue appears specific to native Wayland + Electron globalShortcut handling. ### LLM Provider & Model (if applicable) Not applicable ### Embedder Provider & Model (if applicable) Not applicable
yindo added the bugDesktopOS: Linux labels 2026-06-05 14:52:56 -04:00
yindo closed this issue 2026-06-05 14:52:56 -04:00
Author
Owner

@timothycarambat commented on GitHub (May 27, 2026):

This is unfortunately correct - it is due to a current limitation of Electrons GlobalShortcutRegister on Linux
Related:
#5150
#5155

Super annoying and the fix would only cover Wayland and nobody else :/

<!-- gh-comment-id:4557604346 --> @timothycarambat commented on GitHub (May 27, 2026): This is unfortunately correct - it is due to a current limitation of Electrons GlobalShortcutRegister on Linux Related: #5150 #5155 Super annoying and the fix would only cover Wayland and nobody else :/
Author
Owner

@basiphobe commented on GitHub (May 27, 2026):

Thanks, that makes sense.

For what it’s worth, launching the AppImage with:

./AnythingLLMDesktop.AppImage --ozone-platform=x11

does make the shortcut registration work on my KDE/Wayland system, so XWayland is a usable workaround for now.

I’ll stick with that unless/until Electron’s Linux global shortcut behavior improves. Closing this since it's a duplicate.

<!-- gh-comment-id:4557727366 --> @basiphobe commented on GitHub (May 27, 2026): Thanks, that makes sense. For what it’s worth, launching the AppImage with: ./AnythingLLMDesktop.AppImage --ozone-platform=x11 does make the shortcut registration work on my KDE/Wayland system, so XWayland is a usable workaround for now. I’ll stick with that unless/until Electron’s Linux global shortcut behavior improves. Closing this since it's a duplicate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5251