View previous topic :: View next topic |
Author |
Message |
nagmat84 Apprentice
Joined: 27 Mar 2007 Posts: 290
|
Posted: Fri Aug 16, 2024 4:10 pm Post subject: [SOLVED]How to completely migrate to Wayland w/o starting X? |
|
|
With the advent of KDE 6 I thought it has been time to start experimenting with Wayland. I am running a pure KDE enviroment with SDDM as the display manager.
I can start X (X.org) which in turn starts SDDM which gives me an option to either start KDE on X11 or as a Wayland session. However, I am wondering how a full migration to Wayland would look like (even if it might not be the right time yet and a task for the far future). I understand that with Wayland, there is no dedicated display server like X, but KWin takes over the role of an integrated Wayland server and compositor. There are basically two question spinning around in my head:
Question 1: How to start SDDM as a login screen on top of KWin without Xorg?
Currently, first the X server is started which then starts SDDM and after a successful login SDDM starts KWin on top of the X server. When X will be totally gone, how do I tell SDDM that it should run on top of KWin? Or do I have to start KWin which then starts SDDM? Which systemd service units need to be changed in what way?
Currently. /usr/lib/systemd/system/sddm.service is installed and enabled as /etc/systemd/system/display-manager.service.
Question 2: How to migrate system-wide graphical default settings from X.org to Wayland (or KWin for that matter)?
Currently, I have a couple of drop-in configuration files for X.org which set the default monitor resolution, pixel density, monitor arrangement and keyboard layout. In particular, monitor arrangement and pixel density are important so that office and graphic programs correctly scale 100% paper width according to the actual physical size. However, these configuration files are specific for X.org. What is their Wayland/Kwin replacement?
Code: | # cat /etc/X11/xorg.conf.d/00-keyboard.conf
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "de"
Option "XkbModel" "pc105"
Option "XkbVariant" "deadgraveacute"
Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection |
Code: | # cat /etc/X11/xorg.conf.d/20-amdgpu.conf
Section "Device"
Identifier "AMD RX 6600 (Navi23 Dimgrey Cavefish Family)"
Driver "amdgpu"
Option "AccelMethod" "glamor"
Option "DRI" "3"
#
# See: https://www.x.org/releases/current/doc/man/man5/xorg.conf.5.xhtml#heading12
#
# With RandR 1.2-enabled drivers, monitor sections may be tied to specific outputs
# of the video card.
# Using the name of the output defined by the video driver plus the identifier of
# a monitor section, one associates a monitor section with an output by adding an
# option to the Device section in the following format:
#
# Option "Monitor-outputname" "monitorsection"
#
Option "Monitor-DisplayPort-0" "EIZO-0"
Option "Monitor-DisplayPort-1" "EIZO-1"
Option "Monitor-DisplayPort-2" "EIZO-2"
Option "Monitor-HDMI-A-0" "HDMI"
EndSection |
Code: | # cat /etc/X11/xorg.conf.d/40-eizo.conf
Section "Monitor"
Identifier "EIZO-0"
DisplaySize 520 325
Option "PreferredMode" "1920x1200"
Option "Position" "3120 720"
Option "DPI" "94"
EndSection
Section "Monitor"
Identifier "EIZO-1"
DisplaySize 520 325
Option "Primary" "yes"
Option "PreferredMode" "1920x1200"
Option "Position" "1200 720"
Option "DPI" "94"
EndSection
Section "Monitor"
Identifier "EIZO-2"
DisplaySize 520 325
Option "PreferredMode" "1920x1200"
Option "Rotate" "left"
Option "Position" "0 0"
Option "DPI" "94"
EndSection |
Code: | # cat /usr/share/sddm/scripts/Xsetup
#!/bin/sh
# Xsetup - run as root before the login dialog appears
echo 'Xft.dpi: 94' | xrdb -override
echo 'Xft.antialias: true' | xrdb -override
echo 'Xft.rgba: rgb' | xrdb -override
echo 'Xft.hinting: true' | xrdb -override
echo 'Xft.hintstyle: hintslight' | xrdb -override
echo 'Xcursor.size: 24' | xrdb -override
echo 'Xcursor.theme: Breeze_Snow' | xrdb -override
export LANG="de_DE.utf8"
export GDM_LANG="de_DE.utf8"
export LANGUAGE="de:en" |
Last edited by nagmat84 on Sun Oct 13, 2024 10:11 am; edited 1 time in total |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 443
|
Posted: Fri Aug 16, 2024 7:12 pm Post subject: |
|
|
Quote: | How to start SDDM as a login screen on top of KWin without Xorg? |
You wouldn't do that. Kwin does not actually start until you are logged into the desktop and KDE Plasma session loads.
SDDM runs in X. If you want to run it in Wayland instead, that is your choice. It runs better in my opinion on X. Once SDDM greeter loads, you can choose to either run an X or Wayland session. This is good for troubleshooting (in case you have issues) or games run better under X than Wayland for example.
None of those X related files that you mention will be used when you log into a Wayland session. Your monitor settings, mouse, keyboard settings can then be done under System Settings.
If you have everything installed correctly, you can simply choose Wayland in the session drop-down box when logging into KDE Plasma.
For the future, just do like you have done up until this point, read the wiki and set it up. If you have questions, then at that point you would post and ask questions for clarification, not before.
https://wiki.gentoo.org/wiki/Wayland
https://wiki.gentoo.org/wiki/SDDM
PER:
https://wiki.gentoo.org/wiki/SDDM#override.conf_and_wayland_mode
" Warning
Running SDDM in Wayland mode is highly experimental " |
|
Back to top |
|
|
nagmat84 Apprentice
Joined: 27 Mar 2007 Posts: 290
|
Posted: Sat Aug 17, 2024 12:25 pm Post subject: |
|
|
Your post doesn't answer the question. Your post repeats the status quo which I am aware of and which you could know if you had read my post carefully.
The question specifically addressed the question how the situation is supposed to be in the future (maybe even far future) and what the long-term solution is supposed to look like after X will have been gone.
The entire idea of Wayland is to get rid of X one day. I know that we are not there yet and that the current default is to still run SDDM on X and then log into a Wayland session. But that wasn't the question.
There are more or less four possible answers to my question:
a) There is simply no plan yet. Nobody has ever spent a thought on how to login in a Wayland-based desktop session without running a screen manager like SDDM on X first. We will still need X for decades to come for the login process. (I hope this option is not the answer).
b) There have been some preliminary ideas on how the login process could run on Wayland, but nothing has really been settled nor implemented yet.
c) There is on-going, active, upstream development and it already runs in some kind of alpha-state, but it is not yet packaged into Gentoo. However, the principle road ahead is clear.
d) There is an solution which is considered ready for productive use from the upstream perspective and it is included in testing stage in Gentoo. If one is adventurous and wants to give it a try, the following steps needs to be followed. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5232 Location: Bavaria
|
Posted: Sat Aug 17, 2024 2:53 pm Post subject: |
|
|
nagmat84,
the answer is:
e) It depends ...
Quote: | Running SDDM in Wayland mode is highly experimental |
(you have seen it in our Wiki)
Quote: | SDDM considers its Wayland support experimental. |
(-> https://wiki.archlinux.org/title/SDDM )
This means: Stability depends on:
1. your used graphics card -> NVIDIA (no, nein, njet, ) Intel, AMD, or even e.g. a hybrid cards UHD Graphics 620 + AMD GPU Radeon 540/540X/550/550 (https://bugs.kde.org/show_bug.cgi?id=483804)
2. your used Compositor (take kwin_wayland)
3. your used plasma version (no strong development on stable package kde-plasma/kwin-5.27.11-r1; on-going, active, upstream development for 6.1.x; => use plasma6) _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2185
|
Posted: Sat Aug 17, 2024 11:25 pm Post subject: |
|
|
The answer to Q1 is that this is a pointless question. Why should SDDM run on Kwin? SDDM runs before the end user is logged in, and therefore runs under its own userid in its own process, completely separate from the eventual end-user KDE process. What, if any, screen driver it uses is up to the SDDM developers. That might point them in the KDE direction, but arguably having SDDM require starting its own copy of part of the Qt and KDE stack just to ask you to type in a password on a pretty screen is perhaps a bit overkill. You could consider one of the several other display managers (most of which in my view are pretty ugly, and that includes SDDM.)
FWIW, and I guess that's nothing, I don't bother with SDDM. I use a getty screen and reply to the, admittedly less than pretty, default Linux login userid and password prompt, and one of my profile scripts (off hand I forget which) runs a programs to start (in my case) either a simple command shell, KDE using Wayland or KDE using X, depending on which tty. That way I can select the session I get easily, and I can at the moment still fall back to X if Wayland gets particularly annoying.
I use Wayland virtually all the time. The main gripes are:
a) Every so often the KDE desktop vanishes, though open windows remain, and Alt F2 gets a command line (to enter Logoff usually) and moving the mouse to the TLH corner of the screen gets me a choice of windows.
b) Zoom won't let me share my screen properly - I been told this is fixable more than once, but as it's so minor I still haven't fixed it.
I'm not sure why you're even asking Q1 here. It's one for the SDDM devs. This is Gentoo...
Q2, I suspect with a post-it note and careful use of the KDE System Settings application, but I wouldn't know, as I just let X do its default thing and everything works for my very simple setup. Certainly monitor arrangement and resolution is covered in KDE "Configure Display Settings" (at least as much as I need, e.g. when plugging in an external monitor on my laptop) which is part of System Settings. _________________ Greybeard |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 443
|
Posted: Sun Aug 18, 2024 6:04 pm Post subject: |
|
|
I am sorry you feel that your post was not read "carefully enough."
nagmat84 wrote: |
The question specifically addressed the question how the situation is supposed to be in the future (maybe even far future) and what the long-term solution is supposed to look like after X will have been gone.
|
Maybe a crystal ball is needed to see that far into the future. Another option is to contact a psychic medium to find out what plans, if any, the SDDM devs have in store for the future. Otherwise, you could head on over to the development branch:
https://github.com/sddm/sddm
and ask there. Hopefully they will read your questions carefully. |
|
Back to top |
|
|
nagmat84 Apprentice
Joined: 27 Mar 2007 Posts: 290
|
Posted: Sun Oct 13, 2024 10:28 am Post subject: |
|
|
I did it. SDDM now also uses KWin as the display server and (Wayland) compositor. Wayland support for SDDM is considered experimental. However, on my desktop PC with an AMD GPU and my laptop with an Intel GPU it works without any noticeable problem. I even believe that the new setup is faster and smoother than before. (Maybe because SDDM does not start an X11 server first and when I log in KWin is already running.)
I followed the guides atThe latter also contains the instructions I was looking for. KWin stores the monitor layout in the file "kwinoutputconfig.json". This file must reside in the ".config" dir of the user who is running KWin. The easiest way to create that file is to log in as a user, set the monitor layout as desired and then copy that file from the user to the correct location within the home directory of the user sddm which runs KWin for SDDM.
/etc/sddm.conf.d/02-wayland.conf Code: | # Source: https://wiki.archlinux.org/title/SDDM
[General]
Numlock=on
# Adding the following lines to your configuration file
# sets the Wayland compositor to KWin and enables the wlr_layer_shell
# Wayland protocol extension.
# This requires layer-shell-qt and layer-shell-qt5 for SDDM themes
# using Qt6 and Qt5, respectively.
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell
[Theme]
CursorTheme=Breeze_Snow
EnableAvatars=true
FacesDir=/usr/share/sddm/faces
ThemeDir=/usr/share/sddm/themes
[Wayland]
# By default DisplayServer=wayland attempts to use the weston compositor,
# even if it's not installed, to use a different Wayland compositor,
# enter the program and relevant arguments to the CompositorCommand option
# as described in #KDE Plasma / KWin, see also sddm.conf(5) for more.
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1 |
~sddm/.config/kwinoutputconfig.json Code: | [
{
"data": [
{
"autoRotation": "InTabletMode",
"brightness": 1,
"colorProfileSource": "sRGB",
"connectorName": "DP-1",
"edidHash": "f60d70d8dd4fb0aa40047ae054d49ea2",
"edidIdentifier": "ENC 9092 16843009 21 2013 0",
"highDynamicRange": false,
"iccProfilePath": "",
"mode": {
"height": 1200,
"refreshRate": 59950,
"width": 1920
},
"overscan": 0,
"rgbRange": "Automatic",
"scale": 1,
"sdrBrightness": 200,
"sdrGamutWideness": 0,
"transform": "Normal",
"vrrPolicy": "Automatic",
"wideColorGamut": false
},
{
"autoRotation": "InTabletMode",
"brightness": 1,
"colorProfileSource": "sRGB",
"connectorName": "DP-2",
"edidHash": "465cf91286f3bab7512834d79ef5d0db",
"edidIdentifier": "ENC 9092 16843009 25 2013 0",
"highDynamicRange": false,
"iccProfilePath": "",
"mode": {
"height": 1200,
"refreshRate": 59950,
"width": 1920
},
"overscan": 0,
"rgbRange": "Automatic",
"scale": 1,
"sdrBrightness": 200,
"sdrGamutWideness": 0,
"transform": "Normal",
"vrrPolicy": "Automatic",
"wideColorGamut": false
},
{
"autoRotation": "InTabletMode",
"brightness": 1,
"colorProfileSource": "sRGB",
"connectorName": "DP-3",
"edidHash": "1fed5d819d3ed124d8e6a25d2e40b3cd",
"edidIdentifier": "ENC 9092 16843009 21 2013 0",
"highDynamicRange": false,
"iccProfilePath": "",
"mode": {
"height": 1200,
"refreshRate": 59950,
"width": 1920
},
"overscan": 0,
"rgbRange": "Automatic",
"scale": 1,
"sdrBrightness": 200,
"sdrGamutWideness": 0,
"transform": "Rotated90",
"vrrPolicy": "Automatic",
"wideColorGamut": false
}
],
"name": "outputs"
},
{
"data": [
{
"lidClosed": false,
"outputs": [
{
"enabled": true,
"outputIndex": 0,
"position": {
"x": 3120,
"y": 720
},
"priority": 1
},
{
"enabled": true,
"outputIndex": 1,
"position": {
"x": 1200,
"y": 720
},
"priority": 0
},
{
"enabled": true,
"outputIndex": 2,
"position": {
"x": 0,
"y": 0
},
"priority": 2
}
]
}
],
"name": "setups"
}
] |
|
|
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
|
|