heckelson / i3-and-kde-plasma

How to install the i3 window manager on KDE
GNU General Public License v3.0
868 stars 34 forks source link

Plasma 6 issues #54

Open wcrabtree9 opened 8 months ago

wcrabtree9 commented 8 months ago

My computer updated to Plasma 6 last night and I noticed a few things so far.

  1. Plasma now defaults to Wayland over X11. I've been on X11, so I had to check that as I log in.

  2. Some keyboard shortcuts aren't working. Not sure how widespread that issue is, but I know Meta+Shift+E isn't working anymore. I'll test more when I get home tonight, I updated before going to bed and didn't have the chance then. EDIT: Forgot to mention that I can press the physical power button on my PC to bring up the sleep/reboot/shutdown menu instead, but none of the options will work. It just goes back to the desktop.

wcrabtree9 commented 8 months ago

So changed my line in the i3 config file for using the Plasma logout screen to this:

bindsym $mod+Shift+e exec --no-startup-id qdbus-qt5 org.kde.LogoutPrompt /LogoutPrompt org.kde.LogoutPrompt.promptLogout

Based on this post: https://discuss.kde.org/t/what-command-to-display-the-sddm-shutdown-screen-on-plasma-6/11382 Meta+Shift+E now opens the screen, but still none of the options work.

Reload-Reboot commented 8 months ago

So changed my line in the i3 config file for using the Plasma logout screen to this:

bindsym $mod+Shift+e exec --no-startup-id qdbus-qt5 org.kde.LogoutPrompt /LogoutPrompt org.kde.LogoutPrompt.promptLogout

Based on this post: https://discuss.kde.org/t/what-command-to-display-the-sddm-shutdown-screen-on-plasma-6/11382 Meta+Shift+E now opens the screen, but still none of the options work.

I noticed this issue aswell when I upgraded a few hours ago. It seems that when you call the logout process on KDE 6 it attempts to invoke KWin for the different processes such as shutdown and logoff, but this is a problem considering we are replacing KWin with i3, so KWin can't be active at the same time as i3. I honestly have no idea if there is an alternative way to bypass KWin to logout anymore considering that plasma 5 used the ksmserver to invoke logging out previously and that worked fine, but now that's changed.

2024-03-09-003622_1244x109_scrot

Reload-Reboot commented 8 months ago

Okay, so I'm a moron and I did some more digging and realized it's not KWin's fault, and it is actually the polkit authenticator agent, which is disconnected for some reason. Ignore the scuffed screenshot for the second image it's scrot acting strange, but the culprit appears to be polkit and it's authenticator agent not connecting properly when kde launches with i3. 2024-03-09-171046_1979x102_scrot 2024-03-09-195708_2222x562_scrot

browser-bug commented 8 months ago

Sorry for the intrusion but since this issue could become a general discussion place for Plasma 6 integration, could I ask if you found the need to have some different configuration with respect to the original? Aside from what you've already discussed.

wcrabtree9 commented 8 months ago

Sorry for the intrusion but since this issue could become a general discussion place for Plasma 6 integration, could I ask if you found the need to have some different configuration with respect to the original? Aside from what you've already discussed.

Just this line change, but I'm wondering if it will change again on the next Plasma update. And there may be a better solution than this, I just posted the first thing I got to work. bindsym $mod+Shift+e exec --no-startup-id qdbus-qt5 org.kde.LogoutPrompt /LogoutPrompt org.kde.LogoutPrompt.promptLogout

browser-bug commented 8 months ago

Sorry for the intrusion but since this issue could become a general discussion place for Plasma 6 integration, could I ask if you found the need to have some different configuration with respect to the original? Aside from what you've already discussed.

Just this line change, but I'm wondering if it will change again on the next Plasma update. And there may be a better solution than this, I just posted the first thing I got to work. bindsym $mod+Shift+e exec --no-startup-id qdbus-qt5 org.kde.LogoutPrompt /LogoutPrompt org.kde.LogoutPrompt.promptLogout

The prompt is showing up but I guess the real issue is with the KWin / polkit authenticator agent which showed @ChodyFlims . Hope to get solutions and support for that.

varad-kadam commented 7 months ago

Facing the same, I'd also like to add the task bar has has lost all cosmetics. It's still fully functional, but more like a black bar across the screen.

DMaroo commented 7 months ago

Hi everyone, I have figured out a solution for this. If we check the journalctl log, we find that no response from KWin is actually the reason behind the shut down not going through. The ksmserver (KDE session manager) requests KWin to close all wayland windows through a DBus method. Since we are not running KWin when using i3, this request does not go through and the shutdown is aborted.

Hence, I have written a fake KWin DBus service (< 30 lines) which, when run, makes sure that the shutdown/logout/restart does not hang up. Here is the code: https://github.com/DMaroo/fakwin. There are build instructions and links to the relevant KDE code in the readme.

Hi-Angel commented 7 months ago

Hi everyone, I have figured out a solution for this. If we check the journalctl log, we find that no response from KWin is actually the reason behind the shut down not going through. The ksmserver (KDE session manager) requests KWin to close all wayland windows through a DBus method. Since we are not running KWin when using i3, this request does not go through and the shutdown is aborted.

Hence, I have written a fake KWin DBus service (< 30 lines) which, when run, makes sure that the shutdown/logout/restart does not hang up. Here is the code: https://github.com/DMaroo/fakwin. There are build instructions and links to the relevant KDE code in the readme.

Looks amazing! Did you consider though changing the ksmserver instead, so when the request reports an error it is ignored and the service proceeds with shutting down?

DMaroo commented 7 months ago

Changing ksmserver would require patching the /usr/bin/plasma-shutdown binary, which would not be a particularly stable/reliable/robust way to go about it. I feel that having a fake service makes it easy to change the behavior of KDE in the least intrusive way.

Hi-Angel commented 7 months ago

could I ask if you found the need to have some different configuration with respect to the original? Aside from what you've already discussed.

On Archlinux I did, but it looks like some Arch packaging bug rather than something to do with KDE6. The file /usr/share/xsessions/plasma-i3.desktop disappeared and I had to re-create it.

varad-kadam commented 7 months ago

On Archlinux I did, but it looks like some Arch packaging bug rather than something to do with KDE6. The file /usr/share/xsessions/plasma-i3.desktop disappeared and I had to re-create it.

Could you please explain how you got i3 to work with plasma? For Option 1 I changed systemctl mask plasma-kwin_x11.service --user to systemctl mask plasma-kwin_wayland.service --user but I just get a blank black screen with no cursor when logging in.

Tried Option 2, changed Exec=env KDEWM=/usr/bin/i3 /usr/bin/startplasma-x11 to Exec=env KDEWM=/usr/bin/i3 /usr/bin/startplasma-wayland, still no luck however.

Hi-Angel commented 7 months ago

Could you please explain how you got i3 to work with plasma? For Option 1 I changed systemctl mask plasma-kwin_x11.service --user to systemctl mask plasma-kwin_wayland.service --user but I just get a blank black screen with no cursor when logging in.

Why did you change it? I didn't touch kwin_wayland at all, I only had to mask kwin_x11.service.

Did you create'n'enable plasma-i3 user service?

(worth noting though, I've used i3 + KDE before they migrated to systemd user services, so I have had an XSession file that starts i3, which I've been using till now. However, now that you commented I tested running the usual "KDE X11" session and it starts i3 + KDE for me as well, so you don't have to create an XSession file).

Tried Option 2

Option 2 I didn't test as I don't want to disable systemd support in KDE.

varad-kadam commented 7 months ago

Why did you change it? I didn't touch kwin_wayland at all, I only had to mask kwin_x11.service.

Are you still logging in with X11? I'm using SDDM, and I have an option to sign in with either X11 or Wayland after the update. If I didn't change the name, it would only apply with signing in with X11.

Yes, I have all the files (along with correct permissions and settings I'm assuming) as I was using i3 + KDE before the update just fine.

Funny thing is after I went back and followed the instructions again, it always starts with kwin no matter what I try to disable or mask.

Hi-Angel commented 7 months ago

Why did you change it? I didn't touch kwin_wayland at all, I only had to mask kwin_x11.service.

Are you still logging in with X11? I'm using SDDM, and I have an option to sign in with either X11 or Wayland after the update. If I didn't change the name, it would only apply with signing in with X11.

Yes, I log in with X11. i3 is an X11 thing, it's not applicable to Wayland.

If you want KDE with tiling in Wayland, you might have to try built-in tiling in kwin that they added an year ago and should be part of KDE6. Checking it out has been on my todo list for a long time but I still haven't gotten to it. You might try it if you feel motivated 😊

Funny thing is after I went back and followed the instructions again, it always starts with kwin no matter what I try to disable or mask.

Just to be clear: among other things that you tried, did you try masking out kwin_x11, enabling plasma-i3, and then logging into KDE X11 session?

varad-kadam commented 7 months ago

Just to be clear: among other things that you tried, did you try masking out kwin_x11, enabling plasma-i3, and then logging into KDE X11 session?

Yep:

systemctl status plasma-kwin_x11.service --user
β—‹ plasma-kwin_x11.service
     Loaded: masked (Reason: Unit plasma-kwin_x11.service is masked.)
     Active: inactive (dead)
systemctl status plasma-kwin_wayland.service --user
β—‹ plasma-kwin_wayland.service
     Loaded: masked (Reason: Unit plasma-kwin_wayland.service is masked.)
     Active: inactive (dead)
systemctl status plasma-i3.service --user
β—‹ plasma-i3.service - Launch Plasma with i3
     Loaded: loaded (/home/XXX/.config/systemd/user/plasma-i3.service; enabled; preset: enabled)
     Active: inactive (dead)

It's still loading kwin somehow thereby not allowing i3 to take over.

Side note :- I've tried out the in-built tiling, It's defiantly not bad, and a great place for a beginner to get a taste of tiling windows. Unfortunately it's nowhere near the experience provided by the true tiling manager

Hi-Angel commented 7 months ago

It's still loading kwin somehow thereby not allowing i3 to take over.

Interesting. Can you perhaps with all above being masked log into KDE x11 session, post systemctl --user status and a systemctl --user status plasma-i3?

Side note :- I've tried out the in-built tiling, It's defiantly not bad, and a great place for a beginner to get a taste of tiling windows. Unfortunately it's nowhere near the experience provided by the true tiling manager

I'm sure as the userbase of the in-built tiling increases, so will the quality of the implementation.

varad-kadam commented 7 months ago

Sure:

systemctl --user status
● NotAPC
    State: degraded
    Units: 270 loaded (incl. loaded aliases)
     Jobs: 0 queued
   Failed: 1 units
    Since: Sun 2024-03-31 01:36:05 IST; 16min ago
  systemd: 255.4-2-arch
   CGroup: /user.slice/user-1000.slice/user@1000.service
           β”œβ”€app.slice
           β”‚ β”œβ”€app-aw\x2dqt-483f5cb48e844294953aa2aed0fa8728.scope
           β”‚ β”‚ └─2127 /opt/activitywatch/aw-server/aw-server
           β”‚ β”œβ”€app-baloo_file-7954520f37fa4175bed161c6804be235.scope
           β”‚ β”‚ └─7209 /usr/lib/kf6/baloo_file
           β”‚ β”œβ”€app-dbus\x2d:1.42\x2dorg.a11y.atspi.Registry.slice
           β”‚ β”‚ └─dbus-:1.42-org.a11y.atspi.Registry@0.service
           β”‚ β”‚   └─2432 /usr/lib/at-spi2-registryd --use-gnome-session
           β”‚ β”œβ”€app-geoclue\x2ddemo\x2dagent-1287b40ad4e2426690e0440237c5eac7.scope
           β”‚ β”‚ └─7274 /usr/lib/geoclue-2.0/demos/agent
           β”‚ β”œβ”€app-gmenudbusmenuproxy-3ce47b14af9342da8a00cd57049b934f.scope
           β”‚ β”‚ └─7266 /usr/bin/gmenudbusmenuproxy
           β”‚ β”œβ”€app-kaccess-a514b160477d45cd85079344ec4881ce.scope
           β”‚ β”‚ └─7207 /usr/bin/kaccess
           β”‚ β”œβ”€app-org.kde.kdeconnect.daemon-54be6a75168a4727ae68d87f92b47f52.scope
           β”‚ β”‚ └─7265 /usr/lib/kdeconnectd
           β”‚ β”œβ”€app-org.kde.konsole-c299a0a9d7734f428c1eb48338fd93fe.scope
           β”‚ β”‚ β”œβ”€7823 /usr/bin/konsole
           β”‚ β”‚ β”œβ”€7858 /bin/bash
           β”‚ β”‚ β”œβ”€9608 systemctl --user status
           β”‚ β”‚ └─9609 less
           β”‚ β”œβ”€app-org.kde.plasmashell-1845ea1f50764529890d5d08989fa136.scope
           β”‚ β”‚ β”œβ”€7204 /usr/bin/plasmashell
           β”‚ β”‚ β”œβ”€7673 /usr/lib/kf6/kioworker /usr/lib/qt6/plugins/kf6/kio/desktop.so desktop "" local:/run/user/1000/plasmashellYuOvlg.1.kioworker.socket
           β”‚ β”‚ β”œβ”€7787 /usr/lib/kf6/kioworker /usr/lib/qt6/plugins/kf6/kio/tags.so tags "" local:/run/user/1000/plasmashellYCvxWD.2.kioworker.socket
           β”‚ β”‚ └─9474 /usr/lib/kf6/kioworker /usr/lib/qt6/plugins/kf6/kio/tags.so tags "" local:/run/user/1000/plasmashellSBFYVK.6.kioworker.socket
           β”‚ β”œβ”€app-polkit\x2dkde\x2dauthentication\x2dagent\x2d1-9eb2ede9680148c9bbf38b7182dcc131.scope
           β”‚ β”‚ └─7205 /usr/lib/polkit-kde-authentication-agent-1
           β”‚ β”œβ”€app-powerdevil-54dbeaf0a7b743b085ea0f8d42ec5271.scope
           β”‚ β”‚ └─7206 /usr/lib/org_kde_powerdevil
           β”‚ β”œβ”€app-xdm\x2dapp-01e0ccc6cdf44d6e8d0d7ff895a00e32.scope
           β”‚ β”‚ └─7282 /opt/xdman/xdm-app --background
           β”‚ β”œβ”€app-xembedsniproxy-25de89b9678f443ab251b74959536c00.scope
           β”‚ β”‚ └─7210 /usr/bin/xembedsniproxy
           β”‚ └─dconf.service
           β”‚   └─1824 /usr/lib/dconf-service
           β”œβ”€background.slice
           β”‚ β”œβ”€plasma-baloorunner.service
           β”‚ β”‚ └─9475 /usr/lib/baloorunner
           β”‚ └─plasma-kactivitymanagerd.service
           β”‚   └─7169 /usr/lib/kactivitymanagerd
           β”œβ”€init.scope
           β”‚ β”œβ”€1510 /usr/lib/systemd/systemd --user
           β”‚ └─1512 "(sd-pam)"
           └─session.slice
             β”œβ”€at-spi-dbus-bus.service
             β”‚ β”œβ”€2222 /usr/lib/at-spi-bus-launcher
             β”‚ β”œβ”€2255 /usr/bin/dbus-broker-launch --config-file=/usr/share/defaults/at-spi2/accessibility.conf --scope user
             β”‚ └─2256 dbus-broker --log 4 --controller 9 --machine-id c3dfddf660ea4463831ee12055f90ca5 --max-bytes 100000000000000 --max-fds 6400000 --max-matches 5000000000
             β”œβ”€dbus-broker.service
             β”‚ β”œβ”€1541 /usr/bin/dbus-broker-launch --scope user
             β”‚ └─1542 dbus-broker --log 4 --controller 10 --machine-id c3dfddf660ea4463831ee12055f90ca5 --max-bytes 100000000000000 --max-fds 25000000000000 --max-matches 5000000000
             β”œβ”€pipewire-pulse.service
             β”‚ └─1534 /usr/bin/pipewire-pulse
             β”œβ”€pipewire.service
             β”‚ └─1532 /usr/bin/pipewire
             β”œβ”€plasma-xdg-desktop-portal-kde.service
             β”‚ └─7600 /usr/lib/xdg-desktop-portal-kde
             β”œβ”€wireplumber.service
             β”‚ └─1533 /usr/bin/wireplumber
             β”œβ”€xdg-desktop-portal.service
             β”‚ └─1693 /usr/lib/xdg-desktop-portal
             β”œβ”€xdg-document-portal.service
             β”‚ β”œβ”€1699 /usr/lib/xdg-document-portal
             β”‚ └─1710 fusermount3 -o rw,nosuid,nodev,fsname=portal,auto_unmount,subtype=portal -- /run/user/1000/doc
             └─xdg-permission-store.service
               └─1703 /usr/lib/xdg-permission-store
systemctl --user status plasma-i3
β—‹ plasma-i3.service - Launch Plasma with i3
     Loaded: loaded (/home/XXX/.config/systemd/user/plasma-i3.service; enabled; preset: enabled)
     Active: inactive (dead)

Journal logs of systemctl restart plasma-i3 --user

Started Launch Plasma with i3.
β–‘β–‘ Subject: A start job for unit UNIT has finished successfully
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ 
β–‘β–‘ A start job for unit UNIT has finished successfully.
β–‘β–‘ 
β–‘β–‘ The job identifier is 936.
Mar 31 01:54:43 NotAPC i3[11146]: 03/31/2024 01:54:43 AM - ERROR: PCRE regular expression compilation failed at 4: quantifier does not follow a repeatable item
Mar 31 01:54:43 NotAPC i3[11146]: 03/31/2024 01:54:43 AM - ERROR: Match is empty, ignoring this for_window statement
Mar 31 01:54:43 NotAPC i3[11146]: 03/31/2024 01:54:43 AM - ERROR: Another window manager is already running (WM_Sn is owned)
Mar 31 01:54:43 NotAPC systemd[1510]: plasma-i3.service: Main process exited, code=exited, status=1/FAILURE
β–‘β–‘ Subject: Unit process exited
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ 
β–‘β–‘ An ExecStart= process belonging to unit UNIT has exited.
β–‘β–‘ 
β–‘β–‘ The process' exit code is 'exited' and its exit status is 1.
Mar 31 01:54:43 NotAPC systemd[1510]: plasma-i3.service: Failed with result 'exit-code'.
β–‘β–‘ Subject: Unit failed
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ 
β–‘β–‘ The unit UNIT has entered the 'failed' state with result 'exit-code'.
Hi-Angel commented 7 months ago

@varad-kadam can you perhaps look at systemsettings β†’ Session β†’ Desktop Session and make Session Restore option to have Start with empty session value and see if that helps.

varad-kadam commented 7 months ago

Start with empty session

That's what it's always been set to, made sure to re-set and check... but same thing

Hi-Angel commented 7 months ago

@varad-kadam Okay, so, one suspicious thing is that I can not see kwin word in your systemctl --user status at all. I think you might have disabled systemd in KDE while trying out Option 2. Please enable it back and see if that changes anything.

Another thing I just noticed on my laptop: I was trying a Wayland session just to see if I have kwin infix in the systemctl user output there, and afterwards I was getting all sort of issues on X11 session: black screen, infinite load… I was trying to log out, to restart sddm, to kill kwin, to stop user session… To no avail: the only thing that helped is full reboot.

I'm saying that because I saw you mentioned black screen before and that you were tinkering with Wayland session. Well, just so you know: you'll have to do a full reboot if you're experimenting and for whatever reason logged into a Wayland session. Otherwise it's just not gonna work properly.

varad-kadam commented 7 months ago

@Hi-Angel for the longest time I couldn't figure out what you meant by disabling systemd, was thinking if it had been disabled I would be seeing a lot more problems.

Good news, yes, enabling allowed x11 / wayland service to actually be stopped and i3 to take over. I can't login to wayland if plasma-kwin_wayland.service is masked, just end up on the SDDM screen even after repeated attempts, however X11 works just fine. Thank you very much for helping debug this.

It does circle around to my initial observation; my taskbar / bottom panel being completely blank, and all taskbar widgets (battery, notifications, internet settings volume, etc.) also lacking any theming, just a solid black background.

Since no one else has mentioned it, is this an issue on your end as well caused by the update, or something else? I thought i3 couldn't hand the floating and translucent effects, so I've tried disabling those, but that doesn't seem to change anything.

Hi-Angel commented 7 months ago

@Hi-Angel for the longest time I couldn't figure out what you meant by disabling systemd, was thinking if it had been disabled I would be seeing a lot more problems.

Yeah, sorry about that, I was talking about KDE using systemd-based startup, which might be disabled with systemdBoot false.

Good news, yes, enabling allowed x11 / wayland service to actually be stopped and i3 to take over. I can't login to wayland if plasma-kwin_wayland.service is masked, just end up on the SDDM screen even after repeated attempts, however X11 works just fine. Thank you very much for helping debug this.

No problem. Just to clarify: you don't have to mask kwin_wayland. i3 is an X11-only thing, and you can additionally have KDE Wayland if you want to try some stuff there. It works for me, as you can see by my prev. comment I have both.

It does circle around to my initial observation; my taskbar / bottom panel being completely blank, and all taskbar widgets (battery, notifications, internet settings volume, etc.) also lacking any theming, just a solid black background.

Since no one else has mentioned it, is this an issue on your end as well caused by the update, or something else? I thought i3 couldn't hand the floating and translucent effects, so I've tried disabling those, but that doesn't seem to change anything.

That I don't know by what could be caused. For me everything seems to work fine, here's a screenshot just as I'm typing the message

Screenshot ![Screenshot_20240331_011221](https://github.com/heckelson/i3-and-kde-plasma/assets/7935057/a2bb77e9-7727-4d8f-8315-2516e02e7f9f)

KDE version: 6.0.2, Distro: Archlinux

varad-kadam commented 7 months ago

Ahh, I see, hopefully it's just something minor, I'll play around with it a bit see if anything changes, thanks again!

varad-kadam commented 7 months ago

Just leaving it here in case anyone runs into the same, transparency effects don't work very well on plasma 6 with i3. This usually results in black panels, menus, and whatever else is trying to use the same.

Changing themes or to solid colors works much better.

Hi-Angel commented 7 months ago

Just leaving it here in case anyone runs into the same, transparency effects don't work very well on plasma 6 with i3. This usually results in black panels, menus, and whatever else is trying to use the same.

Transparency works fine for me on KDE6 + i3 + Picom. What compositor are you using for transparency effect?

varad-kadam commented 7 months ago

I take that back, @ds196 issue #55 fixes it for me, picom-git used to fail / not implement proper blurring in all scenarios.

wakizu101 commented 6 months ago

nothing happens in first workspace except the wallapaper, I can see alacritty windows from 2nd workspace on workspace navigator thing on panel

ImGGAAVVIINN commented 2 months ago

My setup on Plasma 6 have been crashing randomly on login and sending me back to display manager, can somebody help?

Hi-Angel commented 2 months ago

My setup on Plasma 6 have been crashing randomly on login and sending me back to display manager, can somebody help?

You can see crashdumps with coredumpctl list and run gdb on one of them with coredumpctl debug <PID>. That should give you stacktrace, although if you don't have debug packages the stacktrace may lack line numbers. Though depending on your distro, gdb may be able to download debug information itself.

Also, make sure to look at journalctl -r just before the crash, you may find some hints into what caused the crash there.

Once you get stack with line numbers, you may be able to report the bug upstream (or debug yourself). Ideally with steps-to-reproduce if you find them and the relevant logs.