OpenBSD KDE Status Report 2022
# 27 Dec 2022A lot has happened since the last OpenBSD KDE Status Report in 2021. Let’s split the report in four areas the good, the bad, the plasma and libinput.
% The good
We welcome Qt6 into OpenBSD! Our Telegram client port (net/tdesktop) depends on it and kn@ is actively maintaining the client. tdesktop always quickly goes with the latest Qt6 version. So there is always some pressure for us to keep Qt6 up-to-date. I think this will pay off when KDE switches to Qt6. Besides tdesktop security/qdigidoc4 and net/wireshark also use Qt6 by now.
I have enabled devel/libinotify support in most of the KDE applications and libraries. It brings support for recursive file watching. Some KDE applications are fairly hungry for file descriptors and the default limits may be insufficient.
When crashes occur, it is advisable to increase your file descriptor limits for your $USER. Checkout login.conf(5) and don’t forget to rebuild the login.conf.db file (if necessary):
[ -f /etc/login.conf.db ] && cap_mkdb /etc/login.conf
Note that in addition to ulimits, there is a kernel-level file descriptor limit which may also need to be adjusted. This limit is managed through the kern.maxfiles sysctl(8).
Many cases known to me have happened with net/nextcloudclient. Of course, depending on your file count to sync.
- Qt 6.4.1
- Qt 5.15.7
- Qt Creator 8.0.2
- KDE Frameworks 5.101.0
- NEW: KQuickCharts, KCalendarCore, KWayland (Only for dependencies)
- REMOVED: kdewebkit and kjsembed. This are “KDE Porting Aids” ports, that means it provides code and tilities to ease the transition from kdelibs 4 to KDE Frameworks 5.
- KDE Applications 22.12.0
- NEW: KAccounts, kipi-plugins, kirigami-gallery, kontrast, kopeninghours
- NEW in the KDE Gear familia
- KDevelop (devel/kdevelop)
- KDevelop (productivity/kalenda)
- KDE Connect (net/kdeconnect-kde)
- Skanlite (graphics/skanlite)
- KMyMoney 5.1.2
- digiKam (graphics/digikam) 7.9.0
- Krita (graphics/krita) 5.1.4 + krita-gmic-plugin 3.1.6.1
Besides the list above, many many small and large bugfixes have been made.
% The bad
For a long time there has been a really annoying crash in all KDE applications. For example:
- You will just copy/paste a file in dolphin file browser.
- “Save as” in Okular - Universal Document Viewer.
Example trace
#0 FileProtocol::copy (this=0x982b59a6f80, srcUrl=..., destUrl=..., _mode=-1, _flags=...)
at /usr/ports/pobj/kio-5.101.0/kio-5.101.0/src/ioslaves/file/file_unix.cpp:678
#1 0x00000982554ded53 in KIO::SlaveBase::dispatch (this=0x982b59a6f90, command=<optimized out>,
data=...) at /usr/ports/pobj/kio-5.101.0/kio-5.101.0/src/core/slavebase.cpp:1364
#2 0x00000982554d8d05 in KIO::SlaveBase::dispatchLoop (this=0x982b59a6f90)
at /usr/ports/pobj/kio-5.101.0/kio-5.101.0/src/core/slavebase.cpp:339
#3 0x0000098255570803 in KIO::WorkerThread::run (this=0x9832384ca40)
at /usr/ports/pobj/kio-5.101.0/kio-5.101.0/src/core/workerthread.cpp:62
#4 0x00000982b662028c in QThreadPrivate::start(void*) () from /usr/local/lib/qt5/./libQt5Core.so.4.0
#5 0x00000983214cb0b1 in _rthread_start (v=<optimized out>) at /usr/src/lib/librthread/rthread.c:96
#6 0x00000982d7ad5f6a in __tfork_thread () at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:84
cad/qcad core dumped at start time and devel/qbs at build time.
However, the bug hunting continues.
% The Plasma
This will come as a surprise to some, but I was able to port (almost) all KDE Plasma components to OpenBSD. You can find all my work on GitHub in the sizeofvoid/wip-ports repository, branch kde-plasma-wip, directory x11/kde-plasma. I’ve been working on it for a very long time. At some point I was so frustrated that we don’t have UDev and libInput. Read more here: OpenBSD and Wayland @robert fixed the UDev problem for me by import libudev-openbsd; a udev compatible library based.
% libinput - fake it until you make it.
I started to fake lib(open)input a fork of https://gitlab.freedesktop.org/libinput/libinput. It is an attempt to extend libinput so that it works with wscons(4) and kqueue(2) and thus on OpenBSD. For now it’s a stubbed, libinput-1.17.0 compatible API, which is okay since we only need it in conjunction with Wayland which is currently default off.
The good so far, it already starts:
Still more broken than useful but it goes forward! #KDE #Plasma Desktop on #OpenBSD. Thanks to those who support me: https://t.co/yx2xzCte75 pic.twitter.com/Ga0TDHNu4x
— Rafael Sadowski (@sizeofvoid) October 30, 2022
To build WIP kde-plasma you have to clone the repository and build the port:
git clone -b kde-plasma-wip git@github.com:sizeofvoid/wip-ports.git
cd wip-ports/x11/kde-plasma
# Adjust PORTSDIR in /etc/mk.conf
# Example PORTSDIR_PATH=/usr/ports/mystuff/wip-ports:$(PORTSDIR)
make install
To start KDE Plasma I use the following ~/.xsession
. Do not
forget to start DBus rcctl enable messagebus && rcctl start messagebus
. Everything communicates via DBus.
# Set to 1 to debug plugins
export QT_DEBUG_PLUGINS=0
# Lets be noisy
export QT_LOGGING_RULES="*.debug=true;qt.*=false"
export XDG_SESSION_TYPE="x11"
export QT_QPA_PLATFORM="xcb"
export QT_QPA_PLATFORMTHEME=KDE
export XDG_CURRENT_DESKTOP=KDE
export KSCREEN_BACKEND=QScreen
export KDE_FULL_SESSION=1
export KDE_SESSION_VERSION=5
# See https://github.com/sizeofvoid/wip-ports/commit/13d490ffca9447788b568c3fb486de1b20c6b026
export QT_OPENBSD_SHM_MODE=1
# If your users intend to develop applications against this build,
# ensure that the IDEs they use either set QT_FORCE_STDERR_LOGGING to 1
export QT_FORCE_STDERR_LOGGING=1
# Start KDE Plasma Shell
exec /usr/local/bin/plasmashell --replace > ~/plasma.log 2>&1
Currently it looks like KDE Plasma and applications lose the connection to our X11 server. Applications that start in KDE Plasma starts without a window frame.
Here are the logs for the issue.
Nov 17 18:40:42 fuckup plasmashell: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup kactivitymanagerd: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup kglobalaccel5: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup kglobalaccel5: The X11 connection broke: I/O error (code 1)
Nov 17 18:40:42 fuckup kded5: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup kscreen_backend_launcher: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup akonadi_contacts_resource: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup akonadi_control: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup akonadi_maildir_resource: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup akonadi_migration_agent: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup akonadi_akonotes_resource: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup akonadi_maildispatcher_agent: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup akonadiserver: org.kde.pim.akonadiserver: Control process died, committing suicide!
Nov 17 18:40:42 fuckup akonadi_birthdays_resource: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup baloorunner: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup akonadi_ical_resource: The X11 connection broke (error 1). Did the X11 server die?
Nov 17 18:40:42 fuckup akonadi_newmailnotifier_agent: The X11 connection broke (error 1). Did the X11 server die?
Anyway, troubleshooting continues here as well.
I hope this blog post could give you a good insight about the current KDE status on OpenBSD. Thanks kn@ for the English proofreading!
As you can imagine, working on such a large number of ports is very time consuming. I am happy about any feedback and of course about any kind of support.
Is anyone willing to support an x11/qt5/qtwebengine update to the latest version? RStudio, Digikam KDE Gear, Seartellarium, qutebrowser, Calibre, Anki and many more would profit from it. #OpenBSDhttps://t.co/yx2xzCte75
— Rafael Sadowski (@sizeofvoid) December 27, 2022
UPDATE
The “copy & paste” and “save as” issues in Okular and Dolphin are fixed with kio-5.101.0p0 Committed here: https://marc.info/?l=openbsd-ports-cvs&m=167286456813105&w=2