View previous topic :: View next topic |
Author |
Message |
cruzki123 Apprentice
Joined: 16 May 2008 Posts: 265
|
Posted: Sat Nov 02, 2024 5:12 pm Post subject: Proper way to start a KDE wayland session from console? |
|
|
Hi,
I am trying to fully remove X from my world file. Th last package to use it is sddm which is kind of bummer. If I use the regular way from sddm to log in in kde wayland I get the usual desktop. I am having some problems with saving the session at restart but the rest of the things seems to be working as expected. But if I enable wayland sddm and try to log in to a plasma wayland session the only think I get is a black screen with a cursor. If I press alt+f2 I get krunner and from that I can lounch plasmashell and gentoo-pipewire-launcher to get a relastive functional KDE environment. At this point I was considering that the sddm wayland is too experimental but when I tried to start KDE directly from the console throght
Code: |
cruzki@semiorka ~ $ XDG_SESSION_TYPE=wayland exec dbus-run-session startplasma-wayland
|
I get the exact same thing (!!!!). Now I am starting to think I have something miconfigured somewhere in the plasma kde start-up scripts but I am not sure where to start. The content of
Code: |
cruzki@semiorka ~ $ cat /etc/sddm.conf.d/*
[General]
# Remove qtvirtualkeyboard as InputMethod default
InputMethod=
[Autologin]
Relogin=false
Session=
User=
[General]
HaltCommand=/usr/bin/loginctl poweroff
Numlock=on
RebootCommand=/usr/bin/loginctl reboot
[Theme]
Current=breeze
CursorSize=48
CursorTheme=Breeze_Light
Font=Noto Sans,10,-1,0,400,0,0,0,0,0,0,0,0,0,0,1
[Users]
MaximumUid=60000
MinimumUid=1000
[X11]
ServerArguments=-dpi 120
[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell
[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1
#SessionCommand=/etc/sddm/scripts/setup
|
The log for the last try
Code: |
[15:02:55.923] (II) HELPER: [PAM] Closing session
[15:02:56.468] (II) HELPER: [PAM] Ended.
[15:02:56.468] (II) DAEMON: Auth: sddm-helper exited successfully
[15:02:56.468] (II) DAEMON: Socket server stopping...
[15:02:56.468] (II) DAEMON: Socket server stopped.
[15:02:56.468] (II) DAEMON: Removing display SDDM::Display(0x5625860f8b20) ...
[15:02:56.468] (II) DAEMON: Adding new display...
[15:02:56.468] (II) DAEMON: Loaded empty theme configuration
[15:02:56.469] (II) DAEMON: Using VT 1
[15:02:56.469] (II) DAEMON: Display server started.
[15:02:56.469] (II) DAEMON: Socket server starting...
[15:02:56.469] (II) DAEMON: Socket server started.
[15:02:56.469] (II) DAEMON: Loading theme configuration from "/usr/share/sddm/themes/breeze/theme.conf"
[15:02:56.469] (II) DAEMON: Greeter starting...
[15:02:56.474] (II) HELPER: [PAM] Starting...
[15:02:56.474] (II) HELPER: [PAM] Authenticating...
[15:02:56.474] (II) HELPER: [PAM] returning.
[15:02:56.497] (II) HELPER: Jumping to VT 1
[15:02:56.497] (II) HELPER: VT mode didn't need to be fixed
[15:02:56.499] (II) DAEMON: Greeter session started successfully
[15:02:57.185] (II) DAEMON: Message received from greeter: Connect
[15:03:02.243] (WW) DAEMON: Signal received: SIGTERM
[15:03:02.243] (II) DAEMON: Greeter stopping...
[15:03:02.244] (WW) HELPER: Signal received: SIGTERM
[15:03:02.401] (II) HELPER: [PAM] Closing session
[15:03:02.402] (II) HELPER: [PAM] Ended.
[15:03:02.403] (WW) DAEMON: Auth: sddm-helper exited with 255
[15:03:02.403] (II) DAEMON: Greeter stopped. SDDM::Auth::HelperExitStatus(255)
[15:03:02.403] (II) DAEMON: Socket server stopping...
[15:03:02.403] (II) DAEMON: Socket server stopped.
[15:03:02.499] (II) DAEMON: Initializing...
[15:03:02.513] (II) DAEMON: Starting...
[15:03:02.514] (II) DAEMON: Logind interface found
[15:03:02.516] (II) DAEMON: Adding new display...
[15:03:02.516] (II) DAEMON: Loaded empty theme configuration
[15:03:02.520] (II) DAEMON: Using VT 1
[15:03:02.520] (II) DAEMON: Display server started.
[15:03:02.520] (II) DAEMON: Socket server starting...
[15:03:02.520] (II) DAEMON: Socket server started.
[15:03:02.521] (II) DAEMON: Loading theme configuration from "/usr/share/sddm/themes/breeze/theme.conf"
[15:03:02.522] (II) DAEMON: Greeter starting...
[15:03:02.542] (II) HELPER: [PAM] Starting...
[15:03:02.542] (II) HELPER: [PAM] Authenticating...
[15:03:02.542] (II) HELPER: [PAM] returning.
[15:03:02.590] (II) HELPER: Jumping to VT 1
[15:03:02.590] (II) HELPER: VT mode didn't need to be fixed
[15:03:02.592] (II) DAEMON: Greeter session started successfully
[15:03:03.371] (II) DAEMON: Message received from greeter: Connect
[15:03:06.286] (II) DAEMON: Message received from greeter: Login
[15:03:06.286] (II) DAEMON: Reading from "/usr/share/wayland-sessions/plasma.desktop"
[15:03:06.287] (II) DAEMON: Session "/usr/share/wayland-sessions/plasma.desktop" selected, command: "/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland" for VT 7
[15:03:06.293] (II) HELPER: [PAM] Starting...
[15:03:06.293] (II) HELPER: [PAM] Authenticating...
[15:03:06.297] (II) HELPER: [PAM] Preparing to converse...
[15:03:06.297] (II) HELPER: [PAM] Conversation with 1 messages
[15:03:06.303] (II) HELPER: [PAM] returning.
[15:03:06.304] (II) DAEMON: Authentication for user "cruzki" successful
[15:03:06.404] (II) HELPER: Starting Wayland user session: "/etc/sddm/scripts/setup" "/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland"
[15:03:06.404] (II) HELPER: Jumping to VT 7
[15:03:06.404] (II) HELPER: VT mode didn't need to be fixed
[15:03:06.405] (II) DAEMON: Session started true
[15:03:06.433] (II) HELPER: [PAM] Closing session
[15:03:06.918] (II) HELPER: [PAM] Ended.
[15:03:06.920] (II) DAEMON: Auth: sddm-helper exited successfully
[15:03:06.920] (II) DAEMON: Greeter stopped. SDDM::Auth::HELPER_SUCCESS
|
Please note that I have tried to add the workaround I use in "/etc/sddm/scripts/setup" but I has not worked
Code: |
cruzki@semiorka ~ $ cat /etc/sddm/scripts/setup
#!/bin/sh
XDG_SESSION_TYPE=wayland exec dbus-run-session startplasma-wayland
exec plasmashell &
exec gentoo-pipewire-launcher &
|
Any idea of what is being corrupted? any documentation on how to properly set up a kde plasma session?
Thanks in advance |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 431 Location: Naarm/Melbourne, Australia
|
Posted: Sun Nov 03, 2024 12:48 am Post subject: |
|
|
`exec` in the context of shell means "completely replace the currently running process with this other process"; it doesn't just mean "run this program" (unlike, say, `exec` in various non-shell config files, e.g. the config file for Sway). So when you call something with `exec` in a shell script, nothing else after that line in the script gets run - the shell script has been entirely replaced by first program you called via `exec`.
i'm not a Plasma user, but in general:
* Don't use `exec` on the command line, just run the program you want:
Code: | XDG_SESSION_TYPE=wayland dbus-run-session startplasma-wayland |
* Don't use `exec` in shell scripts unless it's the very last command in the script, because nothing else after that in the script will get run. To start programs you want in your GUI session, start them from the GUI's startup file.
When running X, you could put programs in ~/.xinitrc, because by the point that script is run, the X server was running, and everything else was running on top of it. But there's no 'Wayland' server like there is with X; Wayland is just a protocol which individual Wayland compositors implement. Thus, there's no GUI environment available until after your start a compositor (in this context, KWin) - thus the need to start programs after the compositors has started, via the relevant config/startup file. _________________ https://wiki.gentoo.org/wiki/User:Flexibeast |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2175
|
Posted: Sun Nov 03, 2024 12:00 pm Post subject: |
|
|
AFAIR the standard way to start plasma with wayland is
Code: |
export DESKTOP_SESSION=plasma
exec /usr/bin/dbus-launch startplasma-wayland
|
That works for me. I don't think you need XDG_SESSION_TYPE. _________________ Greybeard |
|
Back to top |
|
|
finoderi n00b
Joined: 29 Oct 2021 Posts: 74
|
Posted: Sun Nov 03, 2024 12:39 pm Post subject: |
|
|
DESKTOP_SESSION is a legacy variable and most likely not needed.
Just 'dbus-run-session startplasma-wayland' in .bash_profile would suffice. |
|
Back to top |
|
|
cruzki123 Apprentice
Joined: 16 May 2008 Posts: 265
|
Posted: Tue Nov 05, 2024 12:30 am Post subject: |
|
|
Thanks to all for your answers.
OK, it seems like dbus-run-session startplasma-wayland works the first time I do the thing but after a reboot, I came back to the black screen of death. I am not sure how to get a propoer log of this. Shoudl I run something like
Code: |
$ dbus-run-session startplasma-wayland > log
|
EDIT:
tried and cannot get the log (and I am not sure if it contains something relevant there).
EDIT2:
After several reboots I can confirm that dbus-run-session startplasma-wayland works perfectly the first time I use it after a successfull start from a X11 session of SDDM. The second and successive times I try to open plasma, it simply does not work. Any idea what could be happening? |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2175
|
Posted: Tue Nov 05, 2024 10:54 am Post subject: |
|
|
When you say "first time" and "after a reboot", I take it the difference is a power-off (as compared with booting vs after hibernate or suspend). In which case something appears to be carried over when you reboot that's not the case from a cold start. I can think of two possible scenarios - perhaps someone might come up with others -
1. You're using "kexec" to reboot. This seems unlikely, it's a pretty esoteric thing, and fragile (i.e. I can't get it to work...)
2. You're using the EFI framebuffer after a cold boot, but (as EFI isn't involved) after a reboot your system is trying to use some other video driver - perhaps amdgpu or the Nvidia equivalent - and that's not working. Typically problems of this sort are down to compiling the kernel support as modules or not, and the availability of firmware in the kernel if not a module, or other kernel misconfiguration. _________________ Greybeard |
|
Back to top |
|
|
cruzki123 Apprentice
Joined: 16 May 2008 Posts: 265
|
Posted: Tue Nov 05, 2024 11:54 am Post subject: |
|
|
Goverp wrote: | When you say "first time" and "after a reboot", I take it the difference is a power-off (as compared with booting vs after hibernate or suspend). In which case something appears to be carried over when you reboot that's not the case from a cold start. I can think of two possible scenarios - perhaps someone might come up with others -
1. You're using "kexec" to reboot. This seems unlikely, it's a pretty esoteric thing, and fragile (i.e. I can't get it to work...)
2. You're using the EFI framebuffer after a cold boot, but (as EFI isn't involved) after a reboot your system is trying to use some other video driver - perhaps amdgpu or the Nvidia equivalent - and that's not working. Typically problems of this sort are down to compiling the kernel support as modules or not, and the availability of firmware in the kernel if not a module, or other kernel misconfiguration. |
Yes, I mean a power off.
I think I have not explained correctly. The problem is not the video driver. The screen is black *as it has not finished load plasmashell* (or it has crashed). I have a pointer and can alt+2 to get kruner working (I see that). From there, I can open "things" (like a console, firefox or whenever). For example, If I run plasmashell from krunner, I get a plasma desktop and can work normalish as this session is kind of incomplete (have not loaded gentoo-pipewire-louncher or loaded certain kde deamons, etc.).
It seems like something is "misconfigured" at logout and when I restart, it scrub up the loading of "things". |
|
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
|
|