Two different markdown editors: same problems

Hi all, I recently installed (through pkg) the following two markdown editors:
I'm running bspwm (X11) on 15.0-RELEASE-p2 GENERIC amd64, with gfx: NVIDIA GeForce GTX 750 Ti, and cpu: AMD Phenom II X4.

TL/DR: I ran into various problems running these programs, and I propose some solutions in this thread to finally arrive at a problem (PDF exporting through a deprecated package) that I have not been able to fix yet and for which advice is requested.

Problem description​


When I run remarkable, I get the following:
$ remarkable
Failed to create GBM buffer of size 501x528: Invalid argument
The program, however, starts and presents me with a split window editor. Left there is the markdown editor, that works fine. On the right side there's the live preview pane, but nothing is shown, it's completely empty. Exporting to HTML works as intended. Export to PDF fails with the following error:
Remarkable Error: PDF Export Failed!!
Exception: No wkhtmltopdf executable found: "b''"
If this file exists please check that this process can read it or you can pass path to it manually in method call, check README. Otherwise please install wkhtmltopdf - https://github.com/JazzCore/python-pdfkit/wiki/Installing-wkhtmltopdf
Running marker for the first time also threw the GBM buffer. Strangely enough, at the time of writing, I cannot reproduce the GBM buffer error, but I do get the following:
window size loaded from the preferences: 903 x 988
window position loaded from the preferences: 1005, 34
Segmentation fault (core dumped)

Partial solutions​

A few searches on the GBM error pointed me at a potential issue with NVIDIA drivers. Two fixes were proposed.

First attempted solution:
$ __NV_DISABLE_EXPLICIT_SYNC=1 program
For remarkable this still gave the GBM buffer error, and the preview pane was still not functional. For marker the error message changed:
window size loaded from the preferences: 903 x 988
window position loaded from the preferences: 1005, 34

(marker:9448): Gtk-CRITICAL **: 00:26:36.993: _gtk_css_value_compute: assertion 'value != ((void *)0)' failed

(marker:9448): Gtk-CRITICAL **: 00:26:36.994: _gtk_css_value_compute: assertion 'value != ((void *)0)' failed
Bus error (core dumped)

✅ Second solution:
Source: https://github.com/winfunc/opcode/issues/26
$ WEBKIT_DISABLE_DMABUF_RENDERER=1 program
For remarkable, not a single error appeared AND the preview pane was working. It showed the document rendered correctly. And, with this command, marker starts normally, and also the preview pane was working. For both programs, the preview gets updated instantly, and operation is very smooth.

Remaining problem: PDF exports (wkhtmltopdf)​

Exporting / save as PDF in marker works flawlessly. However, in remarkable both Export PDF (Plain) as well as Export PDF (Styled) leads to the wkhtmltopdf error:
Remarkable Error: PDF Export Failed!!
Exception: No wkhtmltopdf executable found: "b''"
If this file exists please check that this process can read it or you can pass path to it manually in method call, check README. Otherwise please install wkhtmltopdf - https://github.com/JazzCore/python-pdfkit/wiki/Installing-wkhtmltopdf
From freshports, it can be seen that wkhtmltopdf has been deleted:
port deleted on 2025-06-02
REASON: Has expired: Upstream abandoned the project
See: https://www.freshports.org/converters/wkhtmltopdf/
And see https://github.com/wkhtmltopdf/wkhtmltopdf ; https://wkhtmltopdf.org/

The discussion dealing with the removal of wkhtmltopdf was interesting to read and it seems there is not really a proper replacement in place. See FreeBSD bug #269313: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269313
My conclusion is that removal of this package breaks the PDF functionality of remarkable (but, it's apparently not an unmet dependency?).

I've tried installing wkhtmltopdf through pip (local user), and that that resulted in its installation in ~/.local/lib/python3.11/site-packages, but this doesn't have any effect on the PDF export functionality.

I don't have enough knowledge to judge if it's save to either copy the wkhtmltopdf folders to the system-wide python3.11 folder; or whether it's better to invoke pip as root to install the package. And then, still, I don't know if this would give me the the right executable as installing the deprecated converters/wkhtmltopdf package... Advice is more than welcome.

This is as far as I could get with the time I invested. Would compiling wkhtmltopdf from source be the way forward? Is there anything else I should try or do?


(Personally, I wouldn't mind trying/using yet other markdown editor with live preview and PDF export functionalities, but, installing packages that cannot be started or have broken features is something worth solving, and I gladly help with that)
 
Back
Top