Open Gerhard404 opened 9 months ago
my current machine uses KDE, whereas the other one used Gnome; but this can't be the reason.
I am not saying it is the reason, but it is certainly possible. Markdown preview uses webkit2gtk which uses a lot of the G[^1] infrastructure. By its nature that isn't a focus of a KDE distro, so its possible that there are interactions between the G libraries and the KDE display server. Are you using a Wayland or X11 session?
[^1]: G* == GTK GIO Glib etc
Thank you for the response.
geany --version
geany 1.38 (kompiliert am Oct 14 2021 mit GTK 3.24.30, GLib 2.68.4)
Geany says, it's been compiled using GTK 3.24. I checked webkit2gtk on my system, and the package management reports that I have libwebkit2gtk installed with versions 4.0-37 and 4.1-0.
Could this be a reason, there being no libwebkit2gtk version 3.something?
The markdown plugin uses libwebkit2gtk 4.0 so that should be ok.
Also 1.38 is two years old, if you can build Geany and plugins maybe try Geany 2.0 because I'm not sure when the plugin was switched to that version of libwebkit2gtk, but I suspect it might have been after 1.38.
Edit: no it was changed to 4.0 6 years ago, my, doesn't time fly.
I now have compiled geany from sources, however the Markdown plug-in doesn't appear to be included. Since geany-plugins is a separate repo, do I need to compile the plug-ins separately? If yes, where do I put them, and how do I tell geany about them?
Sorry, if the questions are very basic.
Simply compiling the plug-ins made them appear next time I launched gedit.
The markdown plugin is there, but still doesn't show anything.
17:38:54.655003: GLib-GIO DEBUG : _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
17:38:54.660132: GLib-GIO DEBUG : _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
17:38:54.682639: Geany INFO : Geany 2.0, unknown
17:38:54.682672: Geany INFO : GTK 3.24.33, GLib 2.72.4
17:38:54.682751: Geany INFO : OS: Ubuntu 22.04.3 LTS (jammy)
17:38:54.682759: Geany INFO : System data dir: /usr/local/share/geany
17:38:54.682769: Geany INFO : User config dir: /home/gerhard/.config/geany
17:38:54.838228: Geany INFO : Loaded GTK+ CSS theme '/usr/local/share/geany/geany.css'
17:38:54.842630: Geany INFO : System plugin path: /usr/local/lib/geany
17:38:54.849375: Geany INFO : Added filetype JSON (65).
17:38:54.849393: Geany INFO : Added filetype Nim (66).
17:38:54.849401: Geany INFO : Added filetype Clojure (67).
17:38:54.849407: Geany INFO : Added filetype Swift (68).
17:38:54.849415: Geany INFO : Added filetype Meson (69).
17:38:54.849426: Geany INFO : Added filetype CUDA (70).
17:38:54.849433: Geany INFO : Added filetype Genie (71).
17:38:54.849439: Geany INFO : Added filetype Kotlin (72).
17:38:54.849445: Geany INFO : Added filetype TypeScript (73).
17:38:54.849451: Geany INFO : Added filetype Groovy (74).
17:38:54.849457: Geany INFO : Added filetype Arduino (75).
17:38:54.849463: Geany INFO : Added filetype Graphviz (76).
17:38:54.849468: Geany INFO : Added filetype Cython (77).
17:38:54.849475: Geany INFO : Added filetype Scala (78).
17:38:54.894323: Geany INFO : Loaded libvte from libvte-2.91.so.0
17:38:54.915870: Geany INFO : /home/gerhard/myGitRepos/Gerhard404/DEM/ReadMe.md : Markdown (UTF-8)
17:38:55.039709: (null) DEBUG : Name com.canonical.AppMenu.Registrar does not exist on the session bus
17:38:58.619106: Geany INFO : Added 40 plugin(s) in '/usr/local/lib/geany'.
17:38:58.636006: Gtk CRITICAL : gtk_widget_get_preferred_width_for_height: assertion 'height >= 0' failed
17:39:03.976488: Geany INFO : Loaded: /usr/local/lib/geany/markdown.so (Markdown)
If I lauch geany from the command line, I see some errors:
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung
Failed to create GBM buffer of size 801x536: Keine Berechtigung
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung
Failed to create GBM buffer of size 801x536: Keine Berechtigung
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung
Failed to create GBM buffer of size 801x536: Keine Berechtigung
Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1
Any ideas what they could mean? "Keine Berechtigung" means no permission.
Google says DRM_IOCTL_MODE_CREATE_DUMB failed
messages are a bug in webkit2gtk that is fixed in a newer version (4.0-41 googling webkit bugzilla), so I guess you may need to wait for that to get into your distro. Interestingly it works here with 4.0-37 but on Cinnamon not KDE.
Just to confirm those messages are from markdown, first launch Geany from the command line with default configuration by geany -c /tmp/does_not_exist
and see what messages show, then enable only the markdown plugin and see what messages show[^1], then open a markdown file and see that the DRM_IOCTL_MODE_CREATE_DUMB
messages show.
Also you could see if the webhelper plugin has the same issues, it uses webkit2gtk as well.
[^1]: ignore the raft of messages when the plugin manager is opened, they are harmless and due to GTK ignoring its own stability guarantees.
I opened geany geany -c /tmp/foo
, with foo not existing. I created a new markdown file, saved it and then opened the markdown-plugin. The error messages do indeed pop up, when the markdown plugin is active.
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung
Failed to create GBM buffer of size 378x479: Keine Berechtigung
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung
Failed to create GBM buffer of size 378x479: Keine Berechtigung
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung
Failed to create GBM buffer of size 378x479: Keine Berechtigung
Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1
Yes, webhelper also produced those error messages.
(geany:7774): WebHelper-WARNING **: 12:59:01.995: Failed to load configuration: Datei oder Verzeichnis nicht gefunden
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung
Failed to create GBM buffer of size 1321x260: Keine Berechtigung
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung
Failed to create GBM buffer of size 1321x260: Keine Berechtigung
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung
Failed to create GBM buffer of size 1321x260: Keine Berechtigung
Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1
Ok, that indeed looks like its the webkit2gtk bug. So you only need to wait for your distro to provide the fixed version.
Until they fix webkit.
WEBKIT_DISABLE_DMABUF_RENDERER=1 geany ...
or use export
From https://github.com/wailsapp/wails/issues/2977#issuecomment-1761765185 Oct 13, 2023
Ok, that indeed looks like its the webkit2gtk bug. So you only need to wait for your distro to provide the fixed version.
Debian-based distros may not be so lucky until this RC bug is resolved: https://bugs.debian.org/1061406
Basically what @jbicha said already, but now the autoremoval clock is ticking for geany-plugins.
The situation is summarised here, and the current status is:
As Geany-plugins is a collection, each plugin individually enables or disables based on availability of its dependencies during configure, so Debian should not have to do anything to have those plugins not build as above.
It should be noted that those on LTS distros (like me) do not have Libsoup3 available, and therefore not Webkit 4.1, so we can't test #1295 or provide any other PRs, but I really doubt that all geany contributors are on LTS distros, so until "somebody" contributes the patches those plugins will not get distributed, and maybe that will trigger contributions.
@elextr Which distro version are you using? If your distro doesn't have libsoup3, then it probably does not have a version of webkitgtk that gets security updates. :(
For Ubuntu (click the diff link), I wrote a simple patch to switch Markdown to webkitgtk 4.1, added the proposed webhelper webkit 4.1 patch, and disabled the other 2 plugins.
@jbicha Ubuntu says 20.04 LTS has standard support until April 2025, so users would expect security updates, but for webkit2gtk they may not come from upstream if its not supporting it anymore.
Edit: although webkit2gtk 4.1 is API compatible with webkit2gtk 4.0, libsoup3 is not API compatible with libsoup2, so LTS precludes it replacing libsoup2 since it would require updating all dependent software, so that precludes wibkit2gtk 4.1 which uses libsoup3.
Ubuntu 20.04 LTS no longer is supported by the webkitgtk project. Ubuntu Security also does not offer security support for webkitgtk for Ubuntu 20.04 LTS.
I suggest adding a configure option for webkitgtk 4.0 / 4.1 defaulting to the 4.1 option. If 4.1 is selected, then it disables the plugins that are not supported yet.
I wouldn't worry too much about the geany-plugins autoremoval warning in Debian. If the Maintainer does not act in time, I can do a non-maintainer upload to apply the same adjustments I did for Ubuntu.
It would be better to make PRs here so its available to all distros, not just specific ones. As I said it needs somebody to test it who has libsoup3/webkit 4.1 and somebody who has the old version to check that still falls back if the distro does not have the newer versions.
I have installed geany-1.38 and the markdown-plugin from Ubuntu-22.04's package repository.
The markdown preview does nothing, at first I thought there's some error with images or something. However, even the most trivial file produces no output.
On another computer, also running Ubuntu-22.04, I was using geany with markdown-preview regularly without any issues. The one major difference is that my current machine uses KDE, whereas the other one used Gnome; but this can't be the reason.
The screenshot below shows the file plus the preview along with the debug messages for good measure. I see nothing that would give me some hints. The preview remains solidly grey.
Here are the debug messages as text
That's the template.html file, that the plug-in uses. I have done nothing to it.