[SDDM] Touchpad tap to select
MERGE REQUEST
Full discussion at https://github.com/prasanthrangan/hyprdots/issues/1081
For laptop/touchpad users:
- tap to select an option
Here's the list added to the xorg.conf.d/
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "Tapping" "on"
Option "NaturalScrolling" "on"
Option "MiddleEmulation" "on"
Option "DisableWhileTyping" "on"
It looks good. I believe that libinput is already a dependency for something else in Hyprdots, so this should do it.
is this only valid for x11?? what if you set it to wayland, will this be necessary??
@prasanthrangan
Yes it's only valid for X11 For wayland there's a different way to solve it. I haven't done enough reading on it to know exactly how to solve for wayland.
This issue was brought up in sddm repo here. Apparently it's the wayland compositor that is supposed to deal with it.
Trying wayland, the touchpad tap to select is not enable by default. Can't find anything to enable it
[General]
DisplayServer=wayland-user
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell
[Wayland]
CompositorCommand=Hyprland
[!Important] This layer shell is included in layer-shell-qt and layer-shell-qt5. The latter package is needed until SDDM drops Qt5, otherwise you will get a black screen. [6]
https://github.com/hyprwm/Hyprland/issues/820 To be able to use sddm on wayland we needed a wayland compositor. Hyprland do not yet support this https://github.com/hyprwm/Hyprland/issues/820.
Unfortunately even if Hyprland by default has tap-to-click by default it did not work.
UPDATE:
[Wayland] CompositorCommand=Hyprland
This part is useless
@kRHYME7 There are 2 compositors:
- Hyprland: It does not run until sddm tells it to. Therefore it cannot be the compositor managing sddm.
- Weston: I believe is the compositor that is running before sddm and manages sddm.
I found this out when I clicked on the WM selector on sddm.
By default DisplayServer=wayland attempts to use weston, 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 SDDM#KDE / KWin, see also sddm.conf(5) for more.
- Yeah I think Hyprland soon would have it's own DM so this won't be posible
- We should find an option for weston to have tap-to-click.
Tested weston, tap to click is enabled by default. But I don't think
Maybe my configuration is wrong ?
[General]
DisplayServer=wayland-user
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell
[Wayland]
CompositorCommand=weston
One more
Can we add some kde settings, should sddm respects that?
Wayland Solution FOUND
EDIT: I had put in the wrong sddm.conf EDIT 2: wrong one again. (I just can't copy to clipboard from nvim)
I used weston as the compositor. It is the default wayland compositor set in sddm.
All I had to do is add /etc/xdg/weston/weston.ini and then populated it with the following contents found at this arch wiki on weston
[core]
# xwayland support
xwayland=true
[libinput]
enable-tap=true
[input]
touchpad_tap_to_click=true
[shell]
#background-image=/usr/share/backgrounds/gnome/Aqua.jpg
background-type=scale-crop
background-color=0xff000000
#background-color=0xff002244
#panel-color=0x90ff0000
panel-color=0x00ffffff
panel-position=bottom
#clock-format=none
#animation=zoom
#startup-animation=none
close-animation=none
focus-animation=dim-layer
#binding-modifier=ctrl
num-workspaces=6
locking=false
cursor-theme=Adwaita
cursor-size=24
# tablet options
#lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png
#lockscreen=/usr/share/backgrounds/gnome/Garden.jpg
#homescreen=/usr/share/backgrounds/gnome/Blinds.jpg
#animation=fade
# for Laptop displays
[output]
name=LVDS1
mode=preferred
#mode=1680x1050
#transform=rotate-90
#[output]
#name=VGA1
# The following sets the mode with a modeline, you can get modelines for your preffered resolutions using the cvt utility
#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
#transform=flipped
#[output]
#name=X1
#mode=1024x768
#transform=flipped-rotate-270
# on screen keyboard input method
#[input-method]
#path=/usr/lib/weston/weston-keyboard
[keyboard]
keymap_rules=evdev
#keymap_layout=us,de
#keymap_variant=colemak,
#keymap_options=grp:shifts_toggle
#keymap_options=caps:ctrl_modifier,shift:both_capslock_cancel
repeat-rate=30
repeat-delay=300
# keymap_options from /usr/share/X11/xkb/rules/base.lst
#numlock-on=true
[terminal]
font=monospace
font-size=18
[launcher]
icon=/usr/share/weston/icon_flower.png
path=/usr/bin/weston-flower
[launcher]
icon=/usr/share/icons/gnome/32x32/apps/utilities-terminal.png
path=/usr/bin/weston-terminal --shell=/usr/bin/bash
#[launcher]
#icon=/usr/share/icons/gnome/32x32/apps/utilities-terminal.png
#path=/usr/bin/gnome-terminal
[launcher]
icon=/usr/share/icons/hicolor/32x32/apps/firefox.png
path=MOZ_ENABLE_WAYLAND=1 /usr/bin/firefox
#[launcher]
#icon=/usr/share/icons/Adwaita/32x32/apps/multimedia-volume-control.png
#path=/usr/bin/st alsamixer -c0
Sddm.conf
Here's what my /etc/sddm.conf.d/sddm.conf looks like:
[Autologin]
# Whether sddm should automatically log back into sessions when they exit
Relogin=false
# Name of session file for autologin session (if empty try last logged in)
Session=
# Username for autologin session
User=
[General]
# Which display server should be used.
# Valid values are: x11, x11-user, wayland. Wayland support is experimental
# DisplayServer=x11
DisplayServer=wayland
# Comma-separated list of environment variables to be set
GreeterEnvironment=
# Halt command
HaltCommand=/usr/bin/systemctl poweroff
# Input method module
InputMethod=qtvirtualkeyboard
# Comma-separated list of Linux namespaces for user session to enter
Namespaces=
# Initial NumLock state. Can be on, off or none.
# If property is set to none, numlock won't be changed
# NOTE: Currently ignored if autologin is enabled.
Numlock=none
# Reboot command
RebootCommand=/usr/bin/systemctl reboot
[Theme]
# Current theme name
Current=
# Cursor size used in the greeter
CursorSize=
# Cursor theme used in the greeter
CursorTheme=
# Number of users to use as threshold
# above which avatars are disabled
# unless explicitly enabled with EnableAvatars
DisableAvatarsThreshold=7
# Enable display of custom user avatars
EnableAvatars=true
# Global directory for user avatars
# The files should be named <username>.face.icon
FacesDir=/usr/share/sddm/faces
# Font used in the greeter
Font=
# Theme directory path
ThemeDir=/usr/share/sddm/themes
[Users]
# Default $PATH for logged in users
DefaultPath=/usr/local/bin:/usr/bin:/bin
# Comma-separated list of shells.
# Users with these shells as their default won't be listed
HideShells=
# Comma-separated list of users that should not be listed
HideUsers=
# Maximum user id for displayed users
MaximumUid=60513
# Minimum user id for displayed users
MinimumUid=1000
# Remember the session of the last successfully logged in user
RememberLastSession=true
# Remember the last successfully logged in user
RememberLastUser=true
# When logging in as the same user twice, restore the original session, rather than create a new one
ReuseSession=true
[Wayland]
# Path of the Wayland compositor to execute when starting the greeter
CompositorCommand=weston --shell=kiosk
# Enable Qt's automatic high-DPI scaling
EnableHiDPI=true
# Path to a script to execute when starting the desktop session
SessionCommand=/usr/share/sddm/scripts/wayland-session
# Comma-separated list of directories containing available Wayland sessions
SessionDir=/usr/local/share/wayland-sessions,/usr/share/wayland-sessions
# Path to the user session log file
SessionLogFile=.local/share/sddm/wayland-session.log
[X11]
# Path to a script to execute when starting the display server
DisplayCommand=/usr/share/sddm/scripts/Xsetup
# Path to a script to execute when stopping the display server
DisplayStopCommand=/usr/share/sddm/scripts/Xstop
# Enable Qt's automatic high-DPI scaling
EnableHiDPI=true
# Arguments passed to the X server invocation
ServerArguments=-nolisten tcp
# Path to X server binary
ServerPath=/usr/bin/X
# Path to a script to execute when starting the desktop session
SessionCommand=/usr/share/sddm/scripts/Xsession
# Comma-separated list of directories containing available X sessions
SessionDir=/usr/local/share/xsessions,/usr/share/xsessions
# Path to the user session log file
SessionLogFile=.local/share/sddm/xorg-session.log
# Path to Xephyr binary
XephyrPath=/usr/bin/Xephyr
TLDR
Basically, the only change I made is add /etc/xdg/weston/weston.ini and then changed the DisplayServer option in sddm from DisplayServer=x11 to DisplayServer=wayland
Cool! Only problem we might face is if weston is not present by default How did you get your weston? i have 2 machines, my other one do not have weston.
paru -Qi weston
Also, should it be fine if we added weston as dependency so that we can composite sddm on wayland?
@kRHYME7 I didn't install weston myself. I think it's a dependency of something in Hyprdots. Lemme setup a VM to see if it's installed by Hyprdots.
Try to run pacman -Qi weston maybe it give you lead to why this is installed
@kRHYME7
Here is the result of yay -Qi weston
Name : weston
Version : 13.0.0-1
Description : Reference implementation of a Wayland compositor
Architecture : x86_64
URL : https://wayland.freedesktop.org/
Licenses : MIT
Groups : None
Provides : None
Depends On : glibc wayland libxkbcommon libinput libunwind pixman libdrm pam systemd-libs cairo libpng libjpeg-turbo libwebp mesa
libegl libgles glib2 pango lcms2 mtdev libx11 libxcb dbus libva libxcursor colord seatd gstreamer
gst-plugins-base-libs
Optional Deps : xorg-xwayland: support x11 backend [installed]
libpipewire: support pipewire backend [installed]
freerdp: support rdp backend
neatvnc: support vnc backend
Required By : None
Optional For : xwayland-run-git
Conflicts With : None
Replaces : None
Installed Size : 5.92 MiB
Packager : Sébastien Luttringer <[email protected]>
Build Date : Sun 17 Dec 2023 01:57:38 PM EAT
Install Date : Wed 21 Feb 2024 08:18:01 AM EAT
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
I had a fresh install of hyprdots and weston is not present.
same here, weston is not installed by default... but for some reason setting sddm DisplayServer to wayland still works.... which is strange.....
same here, weston is not installed by default... but for some reason setting sddm DisplayServer to wayland still works.... which is strange.....
Maybe on fallback mode? Or hyprland now can manage sddm layer?
Draft this as sddm actually can recognize hyprland in test-mode
@sandeng1440 Hi!
This time we can manage to render sddm on Hyprland
see comments below https://github.com/hyprwm/Hyprland/issues/820
The only issue we might get is sddm only renders on a single monitor. Can be solved if we mirror them with some caveats
Will be Adding the config in this discussion for now, someone might refactor/refine it.
@kRHYME7 I've read the comments and I understand that hyprland desktop appears first, followed by sddm. Isn't this behavior a problem?
I've read the comments and I understand that hyprland desktop appears first, followed by sddm. Isn't this behavior a problem?
Well, not really. The only issue I can think of is we will have 2 Hyprland sessions. 1 is for sddm (after login, sddm will be the parent session) and 1 for the User. Which roughly consumes around 240 mb of memory for sddm. I do not know how much memory weston/cage will consume when running sddm though.
@sandeng1440 I'm totally wrong. Only a single Hyprland instance is active after loging in from sddm using hyprland.
Only Issue I got is when I plug in a monitor, sddm will create a new window then now we have 2 windows inside a single monitor instead of this windows should be on the new monitor. Can be solved with scripting and IPC.
Sorry for being too enthusiastic with using hyprland as compositor for sddm lol.
@kRHYME7 no worries. This seems to be a harder issue than I first thought.