Trying to run KDE 6 Plasma with Wayland....

Well, have you tried starting Plasma Wayland from command-line? the plasmawayland.desktop file contains the following command:
/usr/local/lib/libexec/plasma-dbus-run-session-if-needed /usr/local/bin/ck-launch-session /usr/local/bin/startplasma-wayland
I have tried it now. I went to the TTY, stopped SDDM, and then ran this command
Code:
/usr/local/lib/libexec/plasma-dbus-run-session-if-needed /usr/local/bin/ck-launch-session /usr/local/bin/startplasma-wayland
on the TTY as my non-root user that is in the video group (let me know if that's correct). Sadly I only got some wall of text and it didn't launch. I redirected the command output into a file and attached it!

So I guess while the command exists, it doesn't seem to be working right for some reason.
 

Attachments

I have tried it now. I went to the TTY, stopped SDDM, and then ran this command
Code:
/usr/local/lib/libexec/plasma-dbus-run-session-if-needed /usr/local/bin/ck-launch-session /usr/local/bin/startplasma-wayland
on the TTY as my non-root user that is in the video group (let me know if that's correct). Sadly I only got some wall of text and it didn't launch. I redirected the command output into a file and attached it!

So I guess while the command exists, it doesn't seem to be working right for some reason.
Having the non-root user in video group is a correct move in any event.

Off the top of my head, all I can think of is that Plasma Wayland is not playing well with virtualized hardware that the FreeBSD guest can show it. I know for a fact that Plasma/Xorg plays well with that same base setup. This whole thread is about making Plasma Wayland play well with the hardware as FreeBSD can present it. It contains nuggets of useful info, what to pay attention to and fix. And, itstotallyme , your errors do look very similar to the stuff that was discussed earlier (like 2024) in this thread.

Just goes to show that Plasma Wayland is still a rather experimental toy, and not something that is reliably stabilized/automated to the point that RTFMing is all it takes to get it to work right in just about any situation, be it on metal or in a VM.
 
So you think this might e.g. be some problem of it trying to use the real GPU (inaccesible) rather than llvmpipe, inside Qemu?

Interesting. 😮 Thanks for taking a look!
 
So you think this might e.g. be some problem of it trying to use the real GPU (inaccesible) rather than llvmpipe, inside Qemu?

Interesting. 😮 Thanks for taking a look!
I don't have Qemu experience, only VirtualBox. But if a GPU is virtualized, then yeah, it's gonna be llvmpipe.

Also, in a somewhat unrelated matter, I'm beginning to think that maybe a working suspend/resume under FreeBSD is something that Plasma Wayland on FreeBSD would really benefit from.
 
Why are the kde & plasma6-plasma packages not available in latest for -STABLE?

Code:
FreeBSD-ports: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
FreeBSD-ports-kmods: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
FreeBSD-base: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
 
Why are the kde & plasma6-plasma packages not available in latest for -STABLE?

Code:
FreeBSD-ports: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
FreeBSD-ports-kmods: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
FreeBSD-base: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
What does that have to do with making sure the port runs correctly on Wayland? This thread is about addressing papercuts and showstoppers, and which versions they apply to. Packaging issues like this are best addressed in the Forums section titled "Installation and Maintenance of Ports and Packages". You'll find it on the front page of the Forums.
 
Best part? SDDM friggin' works to start Plasma Wayland session! Oh, and the issues with power management that I complained about in November? resolved! Session gets restored, no need to reboot, keyboard connection remains.
How to configure SDDM to start this session?
This
Code:
Exec=/usr/local/lib/libexec/plasma-dbus-run-session-if-needed /usr/local/bin/ck-launch-session /usr/local/bin/startplasma-wayland
does not work.
 
plasmashell is spiking at 99% CPU usage ever since I upgraded to 6.6.2 (FreeBSD 15). Anybody hitting the same?
I'm experiencing the same. But not only plasmashell, sddm too: according to truss output both seems to be in a loop executing fstatat() on four files (happens with both Xorg and Wayland session):
  • /etc/TZ
  • /etc/localtime
  • /etc/timezone
  • /var/db/zoneinfo
After a while sddm stops this loop, but plasmashell doesn't. I'm attaching the file with the output for plasmashell, just in case this could be useful to someone.

P.S. If in truss output fstatat() doesn't report "No such file or directory" for /etc/TZ and /etc/timezone it's because I tried stop this behaviour creating those file as symlinks that point to the same timezone that /etc/localtime points to.
 

Attachments

plasmashell is spiking at 99% CPU usage ever since I upgraded to 6.6.2 (FreeBSD 15). Anybody hitting the same?

I'm experiencing the same. But not only plasmashell, sddm too: according to truss output both seems to be in a loop executing fstatat() on four files (happens with both Xorg and Wayland session):
  • /etc/TZ
  • /etc/localtime
  • /etc/timezone
  • /var/db/zoneinfo
After a while sddm stops this loop, but plasmashell doesn't. I'm attaching the file with the output for plasmashell, just in case this could be useful to someone.

P.S. If in truss output fstatat() doesn't report "No such file or directory" for /etc/TZ and /etc/timezone it's because I tried stop this behaviour creating those file as symlinks that point to the same timezone that /etc/localtime points to.
Ok, just solved it! :)
As FreshPorts' page for plasma6-plasma-workspace reports for version 6.6.0, there is a bug (PR 293368) that causes this loop. The workaround is to set the Clock widget to never show seconds.
More infos on the commit: https://cgit.freebsd.org/ports/commit/?id=a9f8378e37f45046ee91f0f9ad660d8fb2b77663.
 
How to configure SDDM to start this session?
This
Code:
Exec=/usr/local/lib/libexec/plasma-dbus-run-session-if-needed /usr/local/bin/ck-launch-session /usr/local/bin/startplasma-wayland
does not work.
The sequence is incorrect here... the /usr/local/bin/ck-launch-session comes first, and then the /usr/local/lib/libexec/plasma-dbus-run-session-if-needed... At least that was the case last time I tried to run Plasma Wayland from command-line. You also gotta have the following folder: /usr/local/share/wayland-sessions, readable by SDDM.
 
You also gotta have the following folder: /usr/local/share/wayland-sessions, readable by SDDM.

I have this folder and one file in it with that same exact sequence, but it is not seen by SDDM at all. If I copy that file to /usr/local/share/xsessions, it is seen, but does not work.
 
Update: Plasma 6.6.2 is now in official Ports Collection. I compiled my way into a usable KDE desktop. And:

1. SDDM and lockscreen work fine. The trick is to never let the system sleep, be it on battery/low battery or ac power. That's because the sleep function doesn't work properly on FreeBSD. Sleep has been a problem under Xorg, as well, so I know it's NOT Wayland-related. You can turn off sleep by going to KDE's System Settings app -> Power Management.
2. Konqueror still crashes under a Wayland session. This is a paper cut, not a showstopper. If someone has the time to generate a patch with ChatGPT or Claude Code, that would be nice. I can post the error messages (which are only visible if Konqueror is launched from command-line, like Konsole) a bit later. Point here being, Konqueror will spit out error messages (indicating that it was not ported to Wayland properly), and dump core into $HOME directory.
3. Yeah, KDE is a RAM hog, but even then, I don't think it should show that all 40 GB of RAM on my laptop is full. Especially when considering that the laptop is actually surprisingly responsive. The top(1) output shows that 18GB of my RAM are actually free. That means that KDE's System Monitor applet is not displaying correct info for me. And this is a papercut, not a showstopper.

Overall, my take is, Plasma Wayland on FreeBSD is progressing very nicely, and will be in good shape by the time KDE makes Plasma a Wayland-only thing for Plasma 6.7/6.8...
😁
 
3. Yeah, KDE is a RAM hog, but even then, I don't think it should show that all 40 GB of RAM on my laptop is full. Especially when considering that the laptop is actually surprisingly responsive. The top(1) output shows that 18GB of my RAM are actually free. That means that KDE's System Monitor applet is not displaying correct info for me. And this is a papercut, not a showstopper.
I had this problem too, I solved it thank to AlfredoLlaquet who wrote a how-to:
How to Get RAM and Swap Usage Widgets to Work on Plasma
The only difference is that I choose to show the amount in digits instead of the percentage. Works beautilfully. :)
Overall, my take is, Plasma Wayland on FreeBSD is progressing very nicely, and will be in good shape by the time KDE makes Plasma a Wayland-only thing for Plasma 6.7/6.8...
I agree. I was reclutant to try the Wayland session, but had to say that things are going pretty well.

Even sysutils/plasma6-kinfocenter has been patched to don't depend on Linux programs: Network interfaces info are shown, and sysutils/fwupd and vermaden's sysutils/sensors are used to show firmware security and sensors info respectively. :)
 
Well, wow. Now that most papercuts have been mostly taken care of, there's a huge and really frustrating showstopper: Interacting with the amdgpu driver!

This is relevant to KDE Wayland, because that's the combination that seems to trigger the bug in the amdgpu driver - the PSR (Panel Self Refresh) bug.

This bug has at least 3 open tickets on gitlab.freedesktop.org:
The bugs are Linux-related, but as a reminder, FreeBSD's graphics/drm-kmod gets its drivers from Linux. And it looks like I've been hit by that showstopper bug.

Reading up on the bug, it seems to be related to race conditions present in how the amdgpu firmware drivers operate.

There is a patch mentioned that supposedly helps (https://lists.freedesktop.org/archives/amd-gfx/2026-February/138842.html). Not sure how long before it makes its way to FreeBSD...

Also, a Phoronix commenter mentioned a couple ENV variables that helped him on Linux:
Code:
KWIN_DRM_NO_AMS=1
KWIN_DRM_NO_DIRECT_SCANOUT=1

Gotta do some research to figure out how to use those ENV variables in FreeBSD, and figure out if they help me or not.

Man, if this doesn't help, I may end up needing Intel hardware.
 
Gotta do some research to figure out how to use those ENV variables in FreeBSD, and figure out if they help me or not.
Setting them in your .profile should work, since various shells configuration files are sourced at login, but if you want something more "plasma-specific" create a file with .sh extension in $HOME/.config/plasma-workspace/env and export those variables there.
I use a file named env.sh to make GTK programs use KDE file picker instead of the GTK one this way:
Bash:
export GTK_USE_PORTAL=1
I also made it executable, but I don't know if it is needed.

EDIT.
I tried, there is no need to have them executable.
 
As an update, I needed to set those ENV variables in /etc/profiles so that they get set and stick. ~/.profile did not work for me. The lines I had to use: export KWIN_DRM_NO_AMS=1 and export KWIN_DRM_NO_DIRECT_SCANOUT=1...

But even then, that did not work for me on my Thinkbook laptop with Green Sardine AMD graphics. I do get SDDM there, the full KDE Plasma Wayland experience, but I can't leave it alone. Graphics stack still freezes, crashes, requiring a hard reboot.

On Asus ROG Zephyrus AMD Advantage, I can't start Xorg to see if the GPU (dimgrey_cavefish and yellow_carp ) works, and I can't start Plasma Wayland, either. But Wayfire works fine, and virtually all the KDE apps (Dolphin, Konsole, you name it) can be started within Wayfire. And I can leave Wayfire alone, and not worry about graphics stack crashing while I'm AFK, like asleep or at my $JOB.

My complaint about the Zephyrus laptop is that copy-paste doesn't work properly between KDE apps and non-KDE apps. And sound is messed up, too - I get sound, but don't have a good way to direct it to headphones.

Currently trying to see if my desktop rig with Ryzen 7600 (which has Raphael iGPU) will work properly after I compile my way into KDE Wayland.
 
I did not pay to much attention during pkg upgrade and broke my nvidia wayland setup.
All drivers except graphics/nvidia-drm-66-kmod where upgraded from 585 to 595, but nvidia-drm-66-kmod currently obviously does not build.
So CAUTION if you are nvidia user I would skip the nvidia driver upgrade at the moment.

Workaround if the upgrade already happend: Downgrade to the nvidia-*-580 driver versions.
 
Following up on this proved fruitful.

The ticket does have new posts on it.

A post from April 27, 2026 linked to a recent discussion of the issue on Linux Kernel Mailing List.

It looks like AMD sockets older than FP7 have issues with instant on/off expected by the recent versions of the amdgpu firmware. In concrete terms, this is probably why my Thinkbook (with Ryzen 7 5825U) keeps having graphics problems pretty much no matter what version of DRM-kmod I use (Tried 6.6, 6.1, and latest).

By contrast, my Zephyrus (with Ryzen 9 6900 HS) seems immune to the issues that are plaguing the Thinkbook.

Those issues with instant on/off are most plausibly what's causing the race conditions and the page_flip_timeout bug. One proposed workaround to avoid race conditions is to have the amdgpu driver to check the hardware version and enforce a delay.

Well, our version of amdgpu.ko (as supplied by graphics/drm-kmod) apparently already does the hardware checks (and loads the appropriate firmware), but apparently does NOT enforce a delay. And that's what's leading to the graphics crashes on the older hardware.

And yeah, that is definitely a showstopper for KDE on Wayland on FreeBSD... (until someone figures out how to use llvmpipe to have a KDE Wayland session on FreeBSD on metal).
 
.... aand, uh-oh.

The discussion I linked to in my previous post - it's got issues. Namely: Participants in that discussion seem to be mixing NVidia and AMD references!
From: Leo Li <sunpeng.li@amd.com>

[Why]

Rapid vblank off is causing flip-done timeouts for NV3x and newer
family of GPUs that support more idle optimization features.

A proper fix requires further investigation. In lieu of it, let's
workaround it for now.

[How]

For NV3x and newer family of DGPUs, restore the old 5s vblank off timer.

NV3x is NVidia stuff! so I don't understand why they immediately switch to talking about patching code for the AMD drivers! Talking about problems observed on NVidia hardware, but patching AMD's code???
😲

For reference, when NVidia was releasing NV3x GPUs (2003), the corresponding competitor at the time was ATI Radeon 300/400 series (R300/400), and AMD did not have a GPU division at the time!

There very well could be something that I missed, this one detail that gets everything in a row and lined up so that this discrepancy starts making sense to me. Because right now, it's not making sense.
 
For NV3x and newer family of DGPUs, restore the old 5s vblank off timer.
I wonder if I happen to workaround stuff like that indirectly by globally doing vblank_mode=0/etc (I need my mouse not slowed down by random GPU stuff, but cool if it also avoids vsync driver issues :p)

I kind-of wonder why vblank is sought as a optimization too; I do all this GNOME 50 Wayland and don't see tearing, but actually get X-era good framerates and mouse latency, while having low GPU use/single-digit GPU MHz:

Code:
export CLUTTER_PAINT=disable-dynamic-max-render-time
export CLUTTER_VBLANK=none
export vblank_mode=0
export MESA_VK_WSI_PRESENT_MODE=immediate

And GG with mouse cursor realtime stuff (used to have a KMS simple env but gave up on that and just put my mouse to 125Hz like non-gamers apparently using modern DEs expect)
 
Thinking about trying this in live configuration. (While I've never seen it) There are 100 ports with kde or plasma in the name. Is there a official run-dependency list? All level 1 dependencies of the x11/kde metaport?
 
Thinking about trying this in live configuration. (While I've never seen it) There are 100 ports with kde or plasma in the name. Is there a official run-dependency list? All level 1 dependencies of the x11/kde metaport?
Let's stick to the Plasma 6 Wayland on FreeBSD, and related showstoppers in the stack, instead of getting off-topic.

Package dependencies are a few steps removed from the topic of this thread.

Right now, the showstopper is that KDE's implementation of the Wayland protocol is not playing well with some hardware that is pre-2022. Both Linux and BSDs suffer from that. Info is out in the open, but it takes some effort to do the actually relevant research and to post results here.
 
Let's stick to the Plasma 6 Wayland on FreeBSD, and related showstoppers in the stack, instead of getting off-topic.

Package dependencies are a few steps removed from the topic of this thread.

Right now, the showstopper is that KDE's implementation of the Wayland protocol is not playing well with some hardware that is pre-2022. Both Linux and BSDs suffer from that. Info is out in the open, but it takes some effort to do the actually relevant research and to post results here.
I thought everything was made of ports and dependencies. The x11/kde pkg-descr says it's Plasma. It depends on x11/plasma6-plasma... What's offtopic?

Anyway, now trying make it run fully independently of any local installation in a RAM system like I did with Xorg. The kde meta-port needs 63 indirect packages. This is going to take a while of trial and error.
 
I thought everything was made of ports and dependencies. The x11/kde pkg-descr says it's Plasma. It depends on x11/plasma6-plasma... What's offtopic?

Anyway, now trying make it run fully independently of any local installation in a RAM system like I did with Xorg. The kde meta-port needs 63 indirect packages. This is going to take a while of trial and error.
Sometimes, correctly understanding the dependency graph and specifying what should be a dependency and what should NOT be a dependency is in fact the important thing, the theme of the conversation. But this thread is about something else. Something else is the theme of this thread.

Ports and dependencies were an issue long before anyone knew about Wayland.

This thread is about Wayland. All posts are supposed to revolve around Wayland, and the showstoppers that stand in the way of Wayland.

Dependencies and generally running/compiling KDE are NOT of interest in this thread. Therefore, they are off-topic. Please start another thread if you want to talk about dependencies and generally running KDE.

Participants in this conversation already know about dependencies and running KDE, that stuff is already ironed out, and is of no importance to the crowd. The important part is Wayland - and whatever's getting in the way.
 
Back
Top