Bug 473276 - mathematica palettes not working in kde/wayland whereas they work on kde/X and on gnome/wayland
Summary: mathematica palettes not working in kde/wayland whereas they work on kde/X a...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.7
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-11 09:00 UTC by fakbill
Modified: 2023-08-13 15:34 UTC (History)
2 users (show)

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


Attachments
run with WAYLAND_DEBUG=1 (306.76 KB, text/plain)
2023-08-12 18:04 UTC, fakbill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fakbill 2023-08-11 09:00:39 UTC
SUMMARY
***
mathematica palettes not working in kde/wayland whereas they work on kde/X  and on gnome/wayland
***


STEPS TO REPRODUCE
1. install mathematica on kde/wayland 
2. Click on mathematica palettes (https://reference.wolfram.com/language/howto/UsePalettes.html) to enter some equations into the mathematica notebook.

OBSERVED RESULT
Nothing happens. No text appears in the mathematica notebook. 

EXPECTED RESULT
Text should appear in the mathematica notebook.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
The mathematica palettes do not work in kde/wayland but they do work on kde/X .
I also installed mathematica in a gnome/wayland virtualbox : The palettes work fine.
How could I provide you with more information to debug this problem?? Is there a way to see what's happening when I click on a palette ?
Comment 1 Nate Graham 2023-08-12 13:48:40 UTC
Can you run Mathematica with the WAYLAND_DEBUG=1 environment variable applied? For example, open a terminal window and enter `WAYLAND_DEBUG=1 [command used to launch Mathematica]`

Then reproduce the bug and attach a file with the full output of that command (it will be very long) to this bug report. Thanks!
Comment 2 fakbill 2023-08-12 18:04:36 UTC
Created attachment 160925 [details]
run with WAYLAND_DEBUG=1

Each time I click on the palette, a sequence like this one is logged : 
[2647067.295]  -> wl_surface@52.frame(new id wl_callback@46)
[2647067.345]  -> wl_surface@52.attach(wl_buffer@60, 0, 0)
[2647067.363]  -> wl_surface@52.damage_buffer(340, 0, 10, 452)
[2647067.376]  -> wl_surface@52.commit()
[2647068.930] wl_display@1.delete_id(46)
[2647068.980] wl_buffer@38.release()
[2647068.995] wl_callback@46.done(30374742)

but no input appears on the main window.

Do you want me to sent you the log using gnome in the virtualbox (no bug in this case) ?
Comment 3 fakbill 2023-08-12 18:05:52 UTC
I clicked many times on the palette, therefore it should be easy to correlate these clicks with the log.
Comment 4 fakbill 2023-08-13 09:41:00 UTC
I found out that mathematica under gnome is using xwayland !

When I force mathematica to use wayland under gnome the bug is back.
DISPLAY='' /usr/local/Wolfram/Mathematica/13.3/Executables/mathematica 

At least, I can workaround the bug to use mathematica under kde with:
QT_QPA_PLATFORM=xcb /usr/local/bin/mathematica 

The net result may be that mathematica is not ready for wayland, even if it is based on QT5?
Comment 5 Nate Graham 2023-08-13 12:53:48 UTC
Yep, that would suggest that the bug is in Mathematica itself. I'd recommend reporting it to the app's developers.
Comment 6 fakbill 2023-08-13 15:23:37 UTC
OK then, sorry for the noise and thanks for the swift answers!
Comment 7 Nate Graham 2023-08-13 15:24:14 UTC
No problem, my pleasure!