View previous topic :: View next topic |
Author |
Message |
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2055 Location: United Kingdom
|
Posted: Wed Jul 05, 2023 8:18 pm Post subject: LightDM cannot launch KDE Plasma (Wayland) [Solved] |
|
|
My Compal NBLB2 laptop* runs Gentoo Linux (~amd64) with OpenRC and elogind. It uses SDDM as the display manager, and KDE Plasma as the desktop environment. It can launch a desktop session with either KDE Plasma (X11) or with KDE Plasma (Wayland).
* Intel Core i7-720QM Clarksfield 1st Generation i7 CPU and ATI Mobility Radeon HD 5650 GPU.
My Clevo W230SS laptop** runs Gentoo Linux (amd64) with OpenRC and elogind. It uses the LightDM display manager, and KDE Plasma as the desktop environment. It can only launch a desktop session with KDE Plasma (X11). Trying to launch KDE Plasma (Wayland) results in a blank screen with a blinking cursor in the top left corner.
** Intel Core i7-4810MQ Haswell 4th Generation i7 CPU with Intel HD Graphics 4600 GT2 IGP, and NVIDIA Optimus with NVIDIA GeForce GTX 860M GPU.
I have been investigating the problem with the installation on the Clevo W230SS laptop. I have no need to run Plasma (Wayland); I am just curious as to why LightDM cannot launch a Plasma Wayland session on that laptop. The versions of the relevant packages are as follows:
Code: | # eix -I plasma-meta
[I] kde-plasma/plasma-meta
Available versions: (5) 5.27.5 ~5.27.6
{accessibility bluetooth +browser-integration colord +crash-handler crypt +desktop-portal discover +display-manager +elogind +firewall grub gtk +handbook +kwallet +legacy-systray +networkmanager plymouth pulseaudio +sddm sdk +smart systemd thunderbolt +wallpapers}
Installed versions: 5.27.5(5)(15:05:09 24/06/23)(bluetooth browser-integration crash-handler crypt desktop-portal display-manager elogind gtk handbook kwallet legacy-systray networkmanager pulseaudio smart wallpapers -accessibility -colord -discover -firewall -grub -plymouth -sddm -sdk -systemd -thunderbolt)
Homepage: https://kde.org/plasma-desktop/
Description: Merge this to pull in all Plasma 5 packages |
Code: | # eix -I lightdm
[I] acct-group/lightdm
Available versions: 0-r1
Installed versions: 0-r1(18:50:26 24/05/22)
Description: A group for x11-misc/lightdm
[I] acct-user/lightdm
Available versions: 0
Installed versions: 0(19:14:14 24/05/22)
Description: A user for x11-misc/lightdm
[I] x11-misc/lightdm
Available versions: 1.32.0-r2^t {audit elogind +gnome +gtk +introspection non-root qt5 systemd vala}
Installed versions: 1.32.0-r2^t(03:16:59 04/05/23)(elogind gtk introspection qt5 -audit -gnome -non-root -systemd -vala)
Homepage: https://github.com/canonical/lightdm
Description: A lightweight display manager
[I] x11-misc/lightdm-gtk-greeter
Available versions: 2.0.8-r1 {appindicator branding}
Installed versions: 2.0.8-r1(16:51:33 23/06/23)(-appindicator -branding)
Homepage: https://github.com/Xubuntu/lightdm-gtk-greeter
Description: LightDM GTK+ Greeter
Found 4 matches |
The Desktop Configuration Files are what I would have expected:
Code: | # ls /usr/share/xsessions/
Xsession.desktop plasma.desktop |
Code: | # grep Exec /usr/share/xsessions/plasma.desktop
Exec=/usr/bin/startplasma-x11
TryExec=/usr/bin/startplasma-x11 |
Code: | # ls /usr/share/wayland-sessions/
plasmawayland.desktop |
Code: | # grep Exec /usr/share/wayland-sessions/plasmawayland.desktop
Exec=/usr/lib64/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland
TryExec=/usr/bin/startplasma-wayland |
LightDM uses the plasmawayland.desktop file to (try to) launch the Plasma Wayland session.
LightDM and the LightDM GTK Greeter are currently configured as follows:
Code: | # grep -v "^#\|^$\|^\[" /etc/lightdm/lightdm.conf
greeter-session=lightdm-gtk-greeter
session-wrapper=/etc/lightdm/Xsession |
Code: | # grep -v "^#\|^$\|^\[" /etc/lightdm/lightdm-gtk-greeter.conf
background=/usr/share/wallpapers/larry-the-cow/gentoo-cow-gdm-remake-1920x1080.png
indicators=~host;~spacer;~clock;~spacer;~session;~language;~power |
(Other distributions, such as Debian and Arch Linux, also use an Xsession script as the session wrapper in LightDM, yet those distributions are apparently able to launch a Wayland session.)
If I select 'Plasma (X11)' in the Sessions menu on the LightDM greeter, LightDM can successfully launch a Plasma X11 desktop on VT7. However, if I select 'Plasma (Wayland)' in the Sessions menu on the LightDM greeter, a blank screen with blinking cursor in the top left corner is displayed. (The same type of display occurs on VT7 to VT11).
If I switch to e.g. VT2 (Ctrl+Alt+F2) and login to my user account, I can successfully launch a Plasma Wayland desktop on VT2 by entering the following on the command line:
Code: | $ dbus-launch --exit-with-session startplasma-wayland |
The above command works irrespective of whether or not LightDM is running on VT7 (I can stop LightDM running by using the command 'rc-service display-manager stop' on a VT as root user).
Although LightDM itself uses the X Server, apparently it can still be used to launch a Wayland session, as others have done. See, for example:
https://github.com/canonical/lightdm/issues/63#issuecomment-497987787
Stephane Chauveau wrote: | Remark: If I remember well, Lightdm on Debian starts its Wayland sessions exactly like regular X11 sessions by calling the script /etc/Xsession which itself executes everything in /etc/Xsession.d/* and eventually calls the program specified in the session file. |
See also the Arch Linux Wiki page for LightDM (albeit Arch Linux uses systemd rather than OpenRC): https://wiki.archlinux.org/title/LightDM
Similarly, LightDM in Arch Linux uses a session wrapper script named /etc/lightdm/Xsession.
LightDM in Gentoo Linux also uses a session-wrapper script named /etc/lightdm/Xsession. Although the session wrapper should be generic to cater for both X11 and Wayland, I do not think the existing X11-specific Xsession script is the cause of the problem, especially given what Stephane Chauveau wrote (see quote above). If I remove the Xsession file, selecting 'Plasma (X11)' on the LightDM greeter can still launch a Plasma X11 desktop, but selecting 'Plasma (Wayland)' still results in a blank screen with a blinking cursor.
Below are the contents of the file /var/log/lightdm/lightdm.log immediately after rebooting the laptop and before attempting to login to a 'Plasma (Wayland)' session via the LightDM greeter on VT7:
Code: | [+0.04s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.04s] DEBUG: Starting Light Display Manager 1.32.0, UID=0 PID=3381
[+0.04s] DEBUG: Loading configuration dirs from /etc/eselect/wine/share/lightdm/lightdm.conf.d
[+0.04s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.04s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.04s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.04s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.04s] DEBUG: Registered seat module local
[+0.04s] DEBUG: Registered seat module xremote
[+0.04s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.04s] DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
[+0.04s] DEBUG: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
[+0.42s] DEBUG: Monitoring logind for seats
[+0.42s] DEBUG: New seat added from logind: seat0
[+0.43s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.43s] DEBUG: Seat seat0 has property CanMultiSession=no
[+0.43s] DEBUG: Seat seat0: Starting
[+0.43s] DEBUG: Seat seat0: Creating greeter session
[+0.49s] DEBUG: Seat seat0: Creating display server of type x
[+0.50s] DEBUG: Could not run plymouth --ping: Failed to execute child process “plymouth” (No such file or directory)
[+0.50s] DEBUG: Using VT 7
[+0.50s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.50s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.56s] DEBUG: XServer 0: Writing X server authority to /var/run/lightdm/root/:0
[+0.56s] DEBUG: XServer 0: Launching X Server
[+0.56s] DEBUG: Launching process 3460: /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.56s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.56s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.56s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+1.47s] DEBUG: Loading users from org.freedesktop.Accounts
[+1.47s] DEBUG: User /org/freedesktop/Accounts/User1001 added
[+2.70s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+8.49s] DEBUG: Got signal 10 from process 3460
[+8.49s] DEBUG: XServer 0: Got signal from X server :0
[+8.49s] DEBUG: XServer 0: Connecting to XServer :0
[+8.70s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+8.70s] DEBUG: Session pid=3509: Started with service 'lightdm-greeter', username 'root'
[+8.96s] DEBUG: Session pid=3509: Authentication complete with return value 0: Success
[+8.96s] DEBUG: Seat seat0: Session authenticated, running command
[+8.96s] DEBUG: Session pid=3509: Running command /usr/sbin/lightdm-gtk-greeter
[+8.96s] DEBUG: Creating shared data directory /var/lib/lightdm-data/root
[+8.96s] DEBUG: Session pid=3509: Logging to /var/log/lightdm/seat0-greeter.log
[+9.01s] DEBUG: Activating VT 7
[+9.01s] DEBUG: Activating login1 session 3
[+9.01s] DEBUG: Seat seat0 changes active session to 3
[+9.01s] DEBUG: Session 3 is already active
[+11.12s] DEBUG: Greeter connected version=1.32.0 api=1 resettable=false
[+13.41s] DEBUG: Greeter start authentication for fitzcarraldo
[+13.41s] DEBUG: Session pid=3552: Started with service 'lightdm', username 'fitzcarraldo'
[+13.47s] DEBUG: Session pid=3552: Got 1 message(s) from PAM
[+13.47s] DEBUG: Prompt greeter with 1 message(s)
[+18.17s] DEBUG: Seat seat0 changes active session to
[+24.64s] DEBUG: Seat seat0 changes active session to 4 |
Below are the contents of /var/log/lightdm/lightdm.log after attempting to login to a 'Plasma (Wayland)' session via the LightDM greeter on VT7:
Code: | [+0.04s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.04s] DEBUG: Starting Light Display Manager 1.32.0, UID=0 PID=3381
[+0.04s] DEBUG: Loading configuration dirs from /etc/eselect/wine/share/lightdm/lightdm.conf.d
[+0.04s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.04s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.04s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.04s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.04s] DEBUG: Registered seat module local
[+0.04s] DEBUG: Registered seat module xremote
[+0.04s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.04s] DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
[+0.04s] DEBUG: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
[+0.42s] DEBUG: Monitoring logind for seats
[+0.42s] DEBUG: New seat added from logind: seat0
[+0.43s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.43s] DEBUG: Seat seat0 has property CanMultiSession=no
[+0.43s] DEBUG: Seat seat0: Starting
[+0.43s] DEBUG: Seat seat0: Creating greeter session
[+0.49s] DEBUG: Seat seat0: Creating display server of type x
[+0.50s] DEBUG: Could not run plymouth --ping: Failed to execute child process “plymouth” (No such file or directory)
[+0.50s] DEBUG: Using VT 7
[+0.50s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.50s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.56s] DEBUG: XServer 0: Writing X server authority to /var/run/lightdm/root/:0
[+0.56s] DEBUG: XServer 0: Launching X Server
[+0.56s] DEBUG: Launching process 3460: /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.56s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.56s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.56s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+1.47s] DEBUG: Loading users from org.freedesktop.Accounts
[+1.47s] DEBUG: User /org/freedesktop/Accounts/User1001 added
[+2.70s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+8.49s] DEBUG: Got signal 10 from process 3460
[+8.49s] DEBUG: XServer 0: Got signal from X server :0
[+8.49s] DEBUG: XServer 0: Connecting to XServer :0
[+8.70s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+8.70s] DEBUG: Session pid=3509: Started with service 'lightdm-greeter', username 'root'
[+8.96s] DEBUG: Session pid=3509: Authentication complete with return value 0: Success
[+8.96s] DEBUG: Seat seat0: Session authenticated, running command
[+8.96s] DEBUG: Session pid=3509: Running command /usr/sbin/lightdm-gtk-greeter
[+8.96s] DEBUG: Creating shared data directory /var/lib/lightdm-data/root
[+8.96s] DEBUG: Session pid=3509: Logging to /var/log/lightdm/seat0-greeter.log
[+9.01s] DEBUG: Activating VT 7
[+9.01s] DEBUG: Activating login1 session 3
[+9.01s] DEBUG: Seat seat0 changes active session to 3
[+9.01s] DEBUG: Session 3 is already active
[+11.12s] DEBUG: Greeter connected version=1.32.0 api=1 resettable=false
[+13.41s] DEBUG: Greeter start authentication for fitzcarraldo
[+13.41s] DEBUG: Session pid=3552: Started with service 'lightdm', username 'fitzcarraldo'
[+13.47s] DEBUG: Session pid=3552: Got 1 message(s) from PAM
[+13.47s] DEBUG: Prompt greeter with 1 message(s)
[+18.17s] DEBUG: Seat seat0 changes active session to
[+24.64s] DEBUG: Seat seat0 changes active session to 4
[+277.37s] DEBUG: Seat seat0 changes active session to 3
[+277.69s] DEBUG: Session 3 is already active
[+288.22s] DEBUG: Continue authentication
[+288.28s] DEBUG: Session pid=3552: Authentication complete with return value 0: Success
[+288.28s] DEBUG: Authenticate result for user fitzcarraldo: Success
[+288.28s] DEBUG: User fitzcarraldo authorized
[+288.28s] DEBUG: Greeter sets language en_GB.utf8
[+288.40s] DEBUG: Greeter requests session plasmawayland
[+288.50s] DEBUG: Writing /home/fitzcarraldo/.dmrc
[+288.63s] DEBUG: Seat seat0: Creating display server of type wayland
[+288.63s] DEBUG: Using VT 8
[+288.63s] DEBUG: Seat seat0: Display server ready, running session
[+288.63s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+288.63s] DEBUG: Session pid=3552: Running command /etc/lightdm/Xsession /usr/lib64/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland
[+288.63s] DEBUG: Creating shared data directory /var/lib/lightdm-data/fitzcarraldo
[+288.63s] DEBUG: Session pid=3552: Logging to .xsession-errors
[+288.67s] DEBUG: Activating VT 8
[+288.95s] DEBUG: Seat seat0: Stopping greeter
[+288.95s] DEBUG: Terminating login1 session 3
[+288.95s] DEBUG: Session pid=3509: Sending SIGTERM
[+288.95s] DEBUG: Activating login1 session 6
[+288.97s] DEBUG: Seat seat0 changes active session to 6
[+288.97s] DEBUG: Session 6 is already active
[+289.30s] DEBUG: Greeter closed communication channel
[+289.30s] DEBUG: Session pid=3509: Exited with return value 0
[+289.30s] DEBUG: Seat seat0: Session stopped
[+289.30s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+289.30s] DEBUG: Sending signal 15 to process 3460
[+289.55s] DEBUG: Process 3460 exited with return value 0
[+289.55s] DEBUG: XServer 0: X server stopped
[+289.55s] DEBUG: Releasing VT 7
[+289.55s] DEBUG: XServer 0: Removing X server authority /var/run/lightdm/root/:0
[+289.55s] DEBUG: Seat seat0: Display server stopped
[+299.07s] DEBUG: Seat seat0 changes active session to 4 |
The above output shows that LightDM did run the commands '/etc/lightdm/Xsession' and '/usr/lib64/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland' as expected. It also shows that LightDM attempted to display the Plasma Wayland session on VT8, as I would expect given that the LightDM greeter was displayed on VT7.
Stephane Chauveau in the aforementioned LightDM Issue #63 ('Missing some input devices in wayland session') mentions that he added a delay using 'sleep 1' to allow LightDM to exit before the Wayland compositor starts. I tried doing that as well, but it did not make any apparent difference. By the way, he also stated that it does not matter that LightDM runs under X11:
Stephane Chauveau wrote: | ...running LigthDM under X11 or Wayland probably does not matter here because LightDM terminates its own session before starting Sway in a different VT. |
That appears to be corroborated in the contents of lightdm.log shown above.
Anyway, I'm stumped. Do any of you launch Plasma (Wayland) from LightDM? If so, do you have any idea why my installation cannot do that? (I'm not interested in trying SDDM on that laptop; I would like to find out why LightDM is not able to launch Plasma Wayland). Thanks in advance for any ideas.
Edit 2023-07-12: Added '[Solved]' to Subject. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog
Last edited by Fitzcarraldo on Wed Jul 12, 2023 11:05 am; edited 1 time in total |
|
Back to top |
|
|
tomtom69 Apprentice
Joined: 09 Nov 2010 Posts: 253 Location: Bavaria
|
Posted: Mon Jul 10, 2023 7:44 pm Post subject: |
|
|
Hi,
I am facing the same problem. Your post encouraged me to look at the login screen options of lightdm and I tried to use wayland - with the same result.
My first assumption was that your problem is related to nvidia, but I am using radeon graphics, so it seems not to be related on graphics card.
I am also able to start a plasma wayland session using
dbus-launch --exit-with-session startplasma-wayland
on my setup, so the issue seems to be related on lightdm.
Sorry for not being able to really help here, but I am also interested in any solution to use lightdm with plasma/wayland
Tom |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2055 Location: United Kingdom
|
Posted: Wed Jul 12, 2023 11:03 am Post subject: |
|
|
Well, after a lot of searching and experimenting, I found a solution that works in my case. Ironically, I found it in a 2020 SDDM bug report ('Plasma 5.20 has Black desktop screen when using wayland in conjunction with SDDM #1335'):
https://github.com/sddm/sddm/issues/1335#issuecomment-743933731
I tried the same approach as SDDM user torokati44; I edited /usr/share/wayland-sessions/plasmawayland.desktop and replaced the line:
Code: | Exec=/usr/lib64/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland |
by:
Code: | Exec=/usr/bin/dbus-run-session /usr/bin/startplasma-wayland |
I then logged out of the Plasma (X11) session, selected Plasma (Wayland) on the LightDM GTK Greeter screen and can now log in to a Plasma (Wayland) session. Konsole confirms that it is a Plasma Wayland session:
Code: | fitzcarraldo@clevow230ss ~ $ echo $XDG_SESSION_TYPE
wayland |
See if that works for you as well, tomtom69. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog |
|
Back to top |
|
|
tomtom69 Apprentice
Joined: 09 Nov 2010 Posts: 253 Location: Bavaria
|
Posted: Thu Jul 13, 2023 10:35 am Post subject: |
|
|
With the modified /usr/share/wayland-sessions/plasmawayland.desktop file it works.
I also looked at the /usr/share/wayland-sessions/plasmawayland.desktop file, but instead of changing the Exec line, I changed into a terminal after boot and entered the command
Code: | /usr/lib64/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland |
manually, which also started a plasma-wayland session just like
Code: | /usr/bin/dbus-run-session /usr/bin/startplasma-wayland |
in the terminal.
So I assumed the command itself to be working which was not the case.
Thank you Fitzcarraldo! :-) |
|
Back to top |
|
|
acmondor n00b
Joined: 08 Aug 2014 Posts: 62 Location: Canadian Prairies
|
Posted: Mon Nov 04, 2024 10:37 pm Post subject: |
|
|
This problem still seems to exist in Plasma6 and the solution presented here works, even though the file was changed to /usr/share/wayland-sessions/plasma.desktop.
Was there ever anything done to find a permanent solution so one does not have to edit that file every time kde-plasma/plasma-workspace is updated or reinstalled? |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2055 Location: United Kingdom
|
Posted: Thu Nov 14, 2024 2:49 pm Post subject: |
|
|
acmondor,
Interesting that the solution I found for Plasma 5 still works for you in Plasma 6, as it no longer works in my case after updating to Plasma 6. I have not yet found a solution. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 9280
|
Posted: Thu Nov 14, 2024 9:56 pm Post subject: |
|
|
Did you look at the content of this file yet? It is really simple:
/usr/libexec/plasma-dbus-run-session-if-needed:
Code: | #!/bin/sh
# Usage: plasma-dbus-run-session-if-needed PROGRAM [ARGUMENTS]
# If the session bus is not available it is spawned and wrapper round our program
# Otherwise we spawn our program directly
drs=
if [ -z "${DBUS_SESSION_BUS_ADDRESS}" ]
then
drs=dbus-run-session
fi
exec ${drs} "$@" |
The real problem in your case would be an empty DBUS_SESSION_BUS_ADDRESS. |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2055 Location: United Kingdom
|
Posted: Sun Nov 17, 2024 12:19 am Post subject: |
|
|
Neither "Exec=/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland" nor "Exec=/usr/bin/dbus-run-session /usr/bin/startplasma-wayland" in /usr/share/wayland-sessions/plasma.desktop worked in my case after upgrading to Plasma 6, so the exec statement in /usr/libexec/plasma-dbus-run-session-if-needed was not helping, even if DBUS_SESSION_BUS_ADDRESS was empty and the exec statement was therefore being expanded to "exec dbus-run-session /usr/bin/startplasma-wayland". However, I then updated the Portage world (I kicked it off on 14 November p.m. and it finally completed on 16 November a.m.):
Code: | Thu Nov 14 15:10:15 2024 >>> sys-firmware/intel-microcode-20241112_p20241103
Thu Nov 14 15:10:30 2024 >>> media-sound/wavpack-5.7.0
Thu Nov 14 15:10:52 2024 >>> app-arch/xz-utils-5.6.3
Thu Nov 14 15:12:32 2024 >>> media-libs/libpng-1.6.44
Thu Nov 14 15:13:31 2024 >>> sys-libs/libseccomp-2.5.5-r2
Thu Nov 14 15:14:12 2024 >>> dev-perl/ExtUtils-Config-0.10.0
Thu Nov 14 15:14:32 2024 >>> dev-perl/Clone-0.470.0
Thu Nov 14 15:15:12 2024 >>> dev-perl/ExtUtils-Helpers-0.28.0
Thu Nov 14 15:15:33 2024 >>> dev-perl/Try-Tiny-0.320.0
Thu Nov 14 15:15:52 2024 >>> dev-perl/Perl-Tidy-20240903.0.0
Thu Nov 14 15:16:38 2024 >>> dev-perl/Module-Build-Tiny-0.51.0
Thu Nov 14 15:16:58 2024 >>> dev-perl/Syntax-Keyword-Try-0.300.0
Thu Nov 14 15:17:18 2024 >>> dev-perl/Mojolicious-9.380.0
Thu Nov 14 15:18:00 2024 >>> dev-perl/HTML-Parser-3.830.0
Thu Nov 14 15:19:48 2024 >>> dev-perl/DateTime-TimeZone-2.630.0
Thu Nov 14 15:20:10 2024 >>> sys-apps/file-5.45-r4
Thu Nov 14 15:22:21 2024 >>> net-misc/rsync-3.3.0-r1
Thu Nov 14 15:31:11 2024 >>> media-libs/libldac-2.0.2.3-r2
Thu Nov 14 15:31:34 2024 >>> net-analyzer/net-snmp-5.9.4-r1
Thu Nov 14 15:32:15 2024 >>> kde-frameworks/extra-cmake-modules-6.7.0
Thu Nov 14 15:33:23 2024 >>> sys-apps/merge-usr-6
Thu Nov 14 15:33:43 2024 >>> media-libs/libebur128-1.2.6-r1
Thu Nov 14 15:34:02 2024 >>> dev-java/java-config-2.3.4
Thu Nov 14 15:34:22 2024 >>> dev-python/trove-classifiers-2024.10.21.16
Thu Nov 14 15:34:42 2024 >>> media-libs/libdisplay-info-0.1.1-r1
Thu Nov 14 15:35:02 2024 >>> media-libs/soxr-0.1.3-r2
Thu Nov 14 15:36:30 2024 >>> dev-python/pyproject-metadata-0.9.0
Thu Nov 14 15:36:50 2024 >>> dev-games/freecell-solver-6.8.0
Thu Nov 14 15:37:05 2024 >>> dev-python/pyyaml-6.0.2
Thu Nov 14 15:52:53 2024 >>> dev-python/meson-python-0.17.1
Thu Nov 14 15:53:12 2024 >>> media-gfx/scour-0.38.2-r1
Thu Nov 14 15:53:33 2024 >>> dev-libs/icu-76.1-r1
Thu Nov 14 15:57:12 2024 >>> dev-libs/libxml2-2.12.8
Thu Nov 14 16:06:53 2024 >>> dev-db/sqlite-3.46.1
Thu Nov 14 16:29:59 2024 >>> dev-libs/boost-1.85.0-r1
Thu Nov 14 16:34:28 2024 >>> dev-libs/libxslt-1.1.39-r1
Thu Nov 14 16:34:54 2024 >>> dev-libs/xerces-c-3.2.5
Thu Nov 14 16:35:35 2024 >>> dev-util/itstool-2.0.7-r2
Thu Nov 14 16:35:54 2024 >>> x11-base/xcb-proto-1.17.0
Thu Nov 14 16:51:02 2024 >>> media-libs/libzmf-0.0.2-r1
Thu Nov 14 16:51:21 2024 >>> app-text/libqxp-0.0.2
Thu Nov 14 16:51:40 2024 >>> app-text/libmspub-0.1.4
Thu Nov 14 16:52:01 2024 >>> media-libs/libcdr-0.1.7
Thu Nov 14 16:52:21 2024 >>> media-libs/libvisio-0.1.7
Thu Nov 14 16:52:41 2024 >>> app-text/libebook-0.1.3-r3
Thu Nov 14 16:53:00 2024 >>> dev-util/glib-utils-2.78.6
Thu Nov 14 16:53:45 2024 >>> net-misc/iputils-20240905
Thu Nov 14 16:54:07 2024 >>> net-libs/libtorrent-rasterbar-2.0.10
Thu Nov 14 16:54:26 2024 >>> dev-util/gdbus-codegen-2.78.6
Thu Nov 14 22:08:22 2024 >>> media-libs/lv2-1.18.10-r1
Thu Nov 14 22:08:40 2024 >>> app-eselect/eselect-repository-14
Thu Nov 14 22:09:01 2024 >>> dev-libs/newt-0.52.24
Thu Nov 14 22:09:21 2024 >>> net-fs/davfs2-1.6.1-r3
Thu Nov 14 22:09:41 2024 >>> app-editors/nano-8.2
Thu Nov 14 22:10:02 2024 >>> sci-libs/libqalculate-5.2.0
Thu Nov 14 22:10:25 2024 >>> app-cdr/cdrtools-3.02_alpha09-r5
Thu Nov 14 22:10:47 2024 >>> sys-apps/iproute2-6.11.0-r2
Thu Nov 14 22:11:09 2024 >>> media-libs/raptor-2.0.16
Thu Nov 14 22:11:33 2024 >>> sys-apps/util-linux-2.40.2
Thu Nov 14 22:12:04 2024 >>> net-libs/nodejs-22.4.1-r1
Thu Nov 14 22:18:06 2024 >>> app-admin/eclean-kernel-2.99.8
Thu Nov 14 22:18:26 2024 >>> media-libs/lilv-0.24.24
Thu Nov 14 22:18:46 2024 >>> net-misc/dhcpcd-10.1.0
Thu Nov 14 22:19:05 2024 >>> dev-util/intel_clc-24.2.6
Thu Nov 14 23:03:40 2024 >>> sys-apps/usbutils-017
Thu Nov 14 23:04:04 2024 >>> media-libs/mesa-24.2.6-r2
Thu Nov 14 23:23:36 2024 >>> dev-qt/qtcore-5.15.14
Thu Nov 14 23:27:46 2024 >>> dev-util/gtk-doc-1.33.2-r1
Thu Nov 14 23:28:08 2024 >>> dev-libs/libical-3.0.18
Thu Nov 14 23:28:28 2024 >>> media-libs/libheif-1.18.2-r1
Thu Nov 14 23:29:37 2024 >>> app-text/yelp-tools-42.1
Thu Nov 14 23:30:01 2024 >>> sys-auth/polkit-123-r1
Thu Nov 14 23:43:04 2024 >>> media-libs/harfbuzz-9.0.0
Thu Nov 14 23:45:51 2024 >>> sys-power/switcheroo-control-2.6-r2
Thu Nov 14 23:46:58 2024 >>> media-fonts/noto-20240830
Fri Nov 15 00:56:20 2024 >>> dev-perl/Gtk3-ImageView-12.0.0
Fri Nov 15 00:56:43 2024 >>> app-text/gspell-1.12.2
Fri Nov 15 00:57:15 2024 >>> media-gfx/fontforge-20230101-r2
Fri Nov 15 00:57:39 2024 >>> net-analyzer/nmap-7.95
Fri Nov 15 00:58:03 2024 >>> net-fs/samba-4.19.7
Fri Nov 15 00:58:36 2024 >>> dev-qt/qtbase-6.7.3-r2
Fri Nov 15 01:06:45 2024 >>> app-admin/system-config-printer-1.5.18-r2
Fri Nov 15 01:08:30 2024 >>> kde-frameworks/breeze-icons-6.7.0
Fri Nov 15 01:10:29 2024 >>> dev-qt/qt5compat-6.7.3
Fri Nov 15 01:16:09 2024 >>> kde-frameworks/ki18n-6.7.0
Fri Nov 15 01:16:30 2024 >>> kde-frameworks/kquickcharts-6.7.0-r1
Fri Nov 15 01:20:52 2024 >>> kde-frameworks/kcoreaddons-6.7.0
Fri Nov 15 01:24:41 2024 >>> kde-frameworks/kconfig-6.7.0
Fri Nov 15 01:32:25 2024 >>> kde-frameworks/kwidgetsaddons-6.7.0
Fri Nov 15 01:36:43 2024 >>> kde-frameworks/kwindowsystem-6.7.0
Fri Nov 15 01:40:06 2024 >>> kde-frameworks/kguiaddons-6.7.0
Fri Nov 15 01:41:39 2024 >>> kde-frameworks/kdbusaddons-6.7.0
Fri Nov 15 01:48:13 2024 >>> kde-frameworks/kirigami-6.7.0
Fri Nov 15 01:50:01 2024 >>> kde-frameworks/karchive-6.7.0
Fri Nov 15 01:51:35 2024 >>> kde-frameworks/kglobalaccel-6.7.0-r1
Fri Nov 15 01:53:37 2024 >>> kde-frameworks/kcodecs-6.7.0
Fri Nov 15 02:00:44 2024 >>> kde-frameworks/solid-6.7.0-r1
Fri Nov 15 02:02:25 2024 >>> kde-frameworks/kitemviews-6.7.0
Fri Nov 15 02:05:34 2024 >>> kde-frameworks/sonnet-6.7.0
Fri Nov 15 02:41:18 2024 >>> kde-frameworks/kidletime-6.7.0
Fri Nov 15 02:41:38 2024 >>> kde-frameworks/kholidays-6.7.0
Fri Nov 15 02:41:59 2024 >>> kde-frameworks/kdnssd-6.7.0
Fri Nov 15 02:42:20 2024 >>> kde-frameworks/kitemmodels-6.7.0
Fri Nov 15 02:42:40 2024 >>> kde-frameworks/syntax-highlighting-6.7.0
Fri Nov 15 02:43:00 2024 >>> kde-frameworks/attica-6.7.0
Fri Nov 15 02:43:21 2024 >>> kde-frameworks/bluez-qt-6.7.0
Fri Nov 15 02:43:43 2024 >>> kde-frameworks/kcalendarcore-6.7.0
Fri Nov 15 02:44:02 2024 >>> kde-frameworks/ktexttemplate-6.7.0
Fri Nov 15 02:44:22 2024 >>> kde-frameworks/modemmanager-qt-6.7.0
Fri Nov 15 02:44:42 2024 >>> kde-frameworks/kplotting-6.7.0
Fri Nov 15 02:45:02 2024 >>> kde-frameworks/kcrash-6.7.0
Fri Nov 15 02:45:23 2024 >>> kde-frameworks/threadweaver-6.7.0
Fri Nov 15 02:47:00 2024 >>> kde-frameworks/kdoctools-6.7.0
Fri Nov 15 02:48:10 2024 >>> kde-frameworks/kcolorscheme-6.7.0
Fri Nov 15 02:49:44 2024 >>> kde-frameworks/kcompletion-6.7.0
Fri Nov 15 02:51:26 2024 >>> kde-frameworks/kpackage-6.7.0
Fri Nov 15 03:03:38 2024 >>> kde-frameworks/kpty-6.7.0
Fri Nov 15 03:03:58 2024 >>> kde-frameworks/krunner-6.7.0
Fri Nov 15 03:04:18 2024 >>> kde-frameworks/kstatusnotifieritem-6.7.0
Fri Nov 15 03:04:36 2024 >>> kde-frameworks/kimageformats-6.7.0
Fri Nov 15 03:04:56 2024 >>> kde-frameworks/kunitconversion-6.7.0
Fri Nov 15 03:05:17 2024 >>> kde-frameworks/kcontacts-6.7.0
Fri Nov 15 03:05:36 2024 >>> kde-frameworks/syndication-6.7.0
Fri Nov 15 03:08:21 2024 >>> kde-frameworks/kservice-6.7.0
Fri Nov 15 03:10:45 2024 >>> kde-frameworks/kconfigwidgets-6.7.0
Fri Nov 15 03:13:06 2024 >>> kde-frameworks/ksvg-6.7.0
Fri Nov 15 03:18:36 2024 >>> kde-frameworks/kdesu-6.7.0
Fri Nov 15 03:18:56 2024 >>> kde-frameworks/kiconthemes-6.7.0
Fri Nov 15 03:19:16 2024 >>> kde-frameworks/kpeople-6.7.0
Fri Nov 15 03:21:02 2024 >>> kde-frameworks/ktextwidgets-6.7.0
Fri Nov 15 03:22:14 2024 >>> kde-frameworks/kded-6.7.0
Fri Nov 15 03:27:58 2024 >>> kde-frameworks/kdeclarative-6.7.0
Fri Nov 15 03:28:18 2024 >>> kde-frameworks/kxmlgui-6.7.0
Fri Nov 15 03:30:06 2024 >>> kde-frameworks/kbookmarks-6.7.0
Fri Nov 15 11:29:36 2024 >>> kde-frameworks/ki18n-5.116.0
Fri Nov 15 11:29:56 2024 >>> media-sound/sox-14.4.2_p20210509-r2
Fri Nov 15 11:30:18 2024 >>> kde-frameworks/kauth-6.7.0
Fri Nov 15 11:30:37 2024 >>> kde-frameworks/qqc2-desktop-style-6.7.0
Fri Nov 15 11:31:36 2024 >>> app-office/libreoffice-24.2.6.2
Fri Nov 15 11:33:40 2024 >>> kde-frameworks/knotifications-6.7.0
Fri Nov 15 11:35:37 2024 >>> kde-frameworks/kjobwidgets-6.7.0-r1
Fri Nov 15 11:39:22 2024 >>> kde-frameworks/kwallet-6.7.0-r1
Fri Nov 15 12:17:23 2024 >>> kde-frameworks/kio-6.7.0
Fri Nov 15 12:17:44 2024 >>> kde-frameworks/networkmanager-qt-6.7.0
Fri Nov 15 12:21:44 2024 >>> kde-frameworks/kcmutils-6.7.0
Fri Nov 15 21:45:28 2024 >>> kde-frameworks/kparts-6.7.0
Fri Nov 15 21:45:51 2024 >>> kde-frameworks/kfilemetadata-6.7.0
Fri Nov 15 21:46:12 2024 >>> media-video/guvcview-2.1.0
Fri Nov 15 21:46:35 2024 >>> net-misc/freerdp-2.11.7
Fri Nov 15 21:46:56 2024 >>> kde-frameworks/knewstuff-6.7.0-r1
Fri Nov 15 21:47:16 2024 >>> kde-frameworks/knotifyconfig-6.7.0
Fri Nov 15 21:47:37 2024 >>> kde-frameworks/prison-6.7.0
Fri Nov 15 21:55:28 2024 >>> app-text/texlive-core-2023-r10
Fri Nov 15 21:56:04 2024 >>> www-client/firefox-132.0.2
Fri Nov 15 21:56:33 2024 >>> mail-client/thunderbird-128.4.3
Fri Nov 15 22:38:57 2024 >>> kde-frameworks/frameworkintegration-6.7.0
Fri Nov 15 22:39:29 2024 >>> kde-frameworks/purpose-6.7.0
Fri Nov 15 22:39:51 2024 >>> kde-frameworks/baloo-6.7.0
Fri Nov 15 22:40:12 2024 >>> kde-apps/konsole-24.08.1
Fri Nov 15 22:40:44 2024 >>> kde-plasma/kdeplasma-addons-6.1.5
Fri Nov 15 22:41:06 2024 >>> kde-frameworks/ktexteditor-6.7.0-r1
Fri Nov 15 23:48:03 2024 >>> kde-apps/kig-24.08.1
Fri Nov 15 23:48:32 2024 >>> kde-plasma/kwin-6.1.5
Sat Nov 16 01:00:22 2024 >>> media-sound/flacon-11.3.0
Sat Nov 16 01:00:54 2024 >>> kde-plasma/plasma-workspace-6.1.5-r3
Sat Nov 16 01:35:29 2024 >>> kde-apps/dolphin-24.08.1
Sat Nov 16 01:36:00 2024 >>> kde-plasma/plasma-desktop-6.1.5-r1
Sat Nov 16 08:17:17 2024 >>> media-libs/libwmf-0.2.13-r1 |
and now "Exec=/usr/bin/dbus-run-session /usr/bin/startplasma-wayland" in /usr/share/wayland-sessions/plasma.desktop does work again, whereas "Exec=/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland" still does not work. If DBUS_SESSION_BUS_ADDRESS is empty, presumably the final line in /usr/libexec/plasma-dbus-run-session-if-needed should be resolving to:
Code: | exec dbus-run-session "$@" |
in which case "Exec=/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland" would become "Exec=dbus-run-session /usr/bin/startplasma-wayland" wouldn't it? Which is basically what I am doing by editing /usr/share/wayland-sessions/plasma.desktop and changing the Exec= statement to be "Exec=/usr/bin/dbus-run-session /usr/bin/startplasma-wayland". What am I missing? _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1705 Location: South America
|
Posted: Sun Nov 17, 2024 8:18 pm Post subject: |
|
|
I don't think that plasma-dbus-run-session-if-needed receives an empty DBUS_SESSION_BUS_ADDRESS, though. Gentoo's session wrapper script sources all files in /etc/X11/xinit/xinitrc.d, and among them, there is 80-dbus, installed by sys-apps/dbus, that makes the final exec ${command} in the script effectively:
Code: | exec /usr/bin/dbus-launch --exit-with-session "$@" |
Which starts a login session message bus for X11 sessions, and should pass a nonempty DBUS_SESSION_BUS_ADDRESS to the program run by /etc/lightdm/Xsession, so
Code: | /etc/lightdm/Xsession /usr/lib64/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland |
probably ends up being an equivalent of:
Code: | /usr/bin/dbus-launch --exit-with-session /usr/bin/startplasma-wayland |
I think that LightDM killing the X server after it kills the greeter, which I suppose doesn't happen when starting an X11 session, might be terminating the login session message bus started by dbus-launch. If yes, maybe that's the problem? _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2055 Location: United Kingdom
|
Posted: Mon Nov 18, 2024 6:43 pm Post subject: |
|
|
GDH-gentoo,
Thank you for your reply, which makes sense. As the cause does seem to be a LightDM issue, I have implemented a crude work-around using OpenRC's local.d directory to make sure any updates to /usr/share/wayland-sessions/plasma.desktop when merging @world are reverted to use "Exec=/usr/bin/dbus-run-session /usr/share/wayland-sessions/plasma.desktop" instead of "Exec=/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland":
Code: | $ cat /etc/local.d/05-lightdm_wayland.stop
#!/bin/bash
# See https://forums.gentoo.org/viewtopic-p-8795252.html
if `grep -q plasma-dbus-run-session-if-needed /usr/share/wayland-sessions/plasma.desktop`; then
cp /usr/share/wayland-sessions/plasma.desktop /usr/share/wayland-sessions/plasma.desktop.bak
sed -i 's|libexec/plasma-dbus-run-session-if-needed|bin/dbus-run-session|' /usr/share/wayland-sessions/plasma.desktop
fi |
_________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22683
|
Posted: Mon Nov 18, 2024 7:38 pm Post subject: |
|
|
If you don't like what is installed, the right solution would be a user local patch to modify what is installed, rather than a hook script that runs at some later time to edit the installed file. I suggest using /etc/portage/patches for this. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1705 Location: South America
|
Posted: Mon Nov 18, 2024 9:25 pm Post subject: |
|
|
Perhaps it would be best to try a different wrapper script. Despite being used for both X11 and Wayland sessions, /etc/lightdm/Xsession looks quite X11-specific to me.
Calling xrdb, setxkbmap or xmodmap for a Wayland session doesn't seem to be useful, and scripts in /etc/X11/xinit/xinitrc.d would be used by xinit, so I'm not sure that they should be sourced for Wayland sessions either. Reading /etc/profile and ${HOME}/.profile maybe it's OK, and I don't know if /etc/xprofile, ${HOME}/.xprofile or scripts in /etc/X11/Xsession.d would be generic despite their names (do you have anything in the latter?).
Maybe you could try adding:
Code: | if [ "$XDG_SESSION_TYPE" = "wayland" ] ; then
echo "X session wrapper complete (but used for a Wayland session), running session $@"
exec "$@"
fi |
after the for loop that reads /etc/profile and the others, and leaving /usr/share/wayland-sessions/plasma.desktop as the package manager installs it? I'm assuming that LightDM sets XDG_SESSION_TYPE accordingly. I'm hoping this would prevent running /etc/X11/xinit/xinitrc.d/80-dbus for Wayland sessions, and make /usr/libexec/plasma-dbus-run-session-if-needed start the login session message bus by calling dbus-run-session. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|