Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Solved - Sway on GenToo - Keyboard hiccups with Wayland
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Mon Sep 06, 2021 5:07 pm    Post subject: Solved - Sway on GenToo - Keyboard hiccups with Wayland Reply with quote

edit:

this has nothing to do with elogind !

that's why i changed the subject (if it's ok) :roll:

hello,

want to try out sway (AMD RX 590), after getting some informations beforehand, it worked fine at first, but after changing some settings the keyboard surprisingly failed - no keyboard input anymore.

even though i put the correct settings in sway-config and didn't change :

Code:
input "type:keyboard" {
    xkb_layout de(nodeadkeys),
}


and .xsession-errors is getting spammed with following (non)errors:

Code:
Warning:          Could not resolve keysym XF86BrightnessAuto
Warning:          Could not resolve keysym XF86DisplayOff
Warning:          Could not resolve keysym XF86Info
Warning:          Could not resolve keysym XF86AspectRatio
Warning:          Could not resolve keysym XF86DVD
Warning:          Could not resolve keysym XF86Audio
Warning:          Could not resolve keysym XF86ChannelUp
Warning:          Could not resolve keysym XF86ChannelDown
Warning:          Could not resolve keysym XF86Break
Warning:          Could not resolve keysym XF86VideoPhone
.... and so on


.xsession-errors goes up to 12 - 15MB after a while.

tried out new EndeavourOS and or Garuda and it's working fine, but with systemd - .xsession-errors problem exists here,too.

is someone using sway with elogind and can give me some tips.

which ebuilds and configurations are necessary and or useful ?

thx
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "


Last edited by CooSee on Sat Sep 18, 2021 9:58 am; edited 5 times in total
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1166
Location: /run/user/1000

PostPosted: Mon Sep 06, 2021 10:55 pm    Post subject: Reply with quote

Using stock gentoo ebuilds, works fine here , amd as well, don't have anything keyboard related in the sway config

Code:
[root:~] # equery uses sway
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for gui-wm/sway-1.6.1-r1:
 U I
 + + X          : Enable support for X11 applications (XWayland)
 + + man        : Build and install man pages
 + + swaybar    : Install 'swaybar': sway's status bar component
 + + swaybg     : Install 'swaybg': allows to set a desktop background image
 - - swayidle   : Install 'swayidle': idle manager to run commands when user is inactive
 - - swaylock   : Install 'swaylock': sway's screen locker
 + + swaymsg    : Install 'swaymsg': tool for communicating with a running sway instance
 + + swaynag    : Install 'swaynag': shows a message with buttons
 - - tray       : Enable support for StatusNotifierItem tray specification
 - - wallpapers : Install sway's default wallpaper image
[root:~] # equery uses elogind
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for sys-auth/elogind-246.10-r1:
 U I
 + + acl       : Add support for Access Control Lists
 - - audit     : Enable support for Linux audit subsystem using sys-process/audit
 - - debug     : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 - - doc       : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
 + + pam       : Add support for PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip
 + + policykit : Enable PolicyKit (polkit) authentication support
[root:~] #
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1166
Location: /run/user/1000

PostPosted: Mon Sep 06, 2021 10:58 pm    Post subject: Reply with quote

Maybe try in sway config

Code:
input * xkb_layout "de(nodeadkeys)"

instead of what you had there
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Tue Sep 07, 2021 1:03 am    Post subject: Reply with quote

The Main Man wrote:
Maybe try in sway config

Code:
input * xkb_layout "de(nodeadkeys)"

instead of what you had there


thx for reply :D

it's not working :cry:

but the same input config is working on endeavour os without problems :!: :?:

and it's weird that if i open dmenu via mouse and press many keys at once, some keys are showing up, but very delayed.

as i mentioned, it worked before with the keyboard config above.

i use evdev should i switch to libinput ?

here's my swaymsg -t get_inputs:

Code:
[
  {
    "identifier": "0:0:virtual_keyboard",
    "name": "virtual keyboard",
    "vendor": 0,
    "product": 0,
    "type": "keyboard",
    "xkb_layout_names": [
      "English (US)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "English (US)"
  },
  {
    "identifier": "1133:49733:Logitech_Gaming_Mouse_G400",
    "name": "Logitech Gaming Mouse G400",
    "vendor": 1133,
    "product": 49733,
    "type": "pointer",
    "libinput": {
      "send_events": "enabled",
      "accel_speed": 0.0,
      "accel_profile": "adaptive",
      "natural_scroll": "disabled",
      "left_handed": "disabled",
      "middle_emulation": "disabled",
      "scroll_method": "none",
      "scroll_button": 274
    }
  },
  {
    "identifier": "3468:261:C-Media_Electronics_Inc._USB_Multimedia_Audio_Device",
    "name": "C-Media Electronics Inc. USB Multimedia Audio Device",
    "vendor": 3468,
    "product": 261,
    "type": "keyboard",
    "xkb_layout_names": [
      "German (no dead keys)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "German (no dead keys)",
    "libinput": {
      "send_events": "enabled"
    }
  },
  {
    "identifier": "2385:5905:Kingston_HyperX_Alloy_Elite_2",
    "name": "Kingston HyperX Alloy Elite 2",
    "vendor": 2385,
    "product": 5905,
    "type": "keyboard",
    "xkb_layout_names": [
      "German (no dead keys)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "German (no dead keys)",
    "libinput": {
      "send_events": "enabled"
    }
  },
  {
    "identifier": "2385:5905:Kingston_HyperX_Alloy_Elite_2_Consumer_Control",
    "name": "Kingston HyperX Alloy Elite 2 Consumer Control",
    "vendor": 2385,
    "product": 5905,
    "type": "pointer",
    "libinput": {
      "send_events": "enabled",
      "natural_scroll": "disabled"
    }
  },
  {
    "identifier": "2385:5905:Kingston_HyperX_Alloy_Elite_2_Consumer_Control",
    "name": "Kingston HyperX Alloy Elite 2 Consumer Control",
    "vendor": 2385,
    "product": 5905,
    "type": "keyboard",
    "xkb_layout_names": [
      "German (no dead keys)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "German (no dead keys)",
    "libinput": {
      "send_events": "enabled",
      "natural_scroll": "disabled"
    }
  },
  {
    "identifier": "2385:5905:Kingston_HyperX_Alloy_Elite_2_System_Control",
    "name": "Kingston HyperX Alloy Elite 2 System Control",
    "vendor": 2385,
    "product": 5905,
    "type": "keyboard",
    "xkb_layout_names": [
      "German (no dead keys)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "German (no dead keys)",
    "libinput": {
      "send_events": "enabled"
    }
  }
]


edit:

i switched to libinput but no luck :!:

my keyboard on sway is bedevilled :twisted:

if i press iopsdf keys at same time then i can use and write, like a normal keyboard :lol:

what is going on here :?: 8O :roll:
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "


Last edited by CooSee on Tue Sep 07, 2021 2:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Tue Sep 07, 2021 3:02 am    Post subject: Reply with quote

CooSee wrote:
The Main Man wrote:
Maybe try in sway config

Code:
input * xkb_layout "de(nodeadkeys)"

instead of what you had there


thx for reply :D

it's not working :cry:

but the same input config is working on endeavour os without problems :!: :?:

and it's weird that if i open dmenu via mouse and press many keys at once, some keys are showing up, but very delayed.

as i mentioned, it worked before with the keyboard config above.

i use evdev should i switch to libinput ?

here's my swaymsg -t get_inputs:

Code:
[
    {
    "identifier": "1133:49733:Logitech_Gaming_Mouse_G400",
    "name": "Logitech Gaming Mouse G400",
    "vendor": 1133,
    "product": 49733,
    "type": "pointer",
    "libinput": {
      "send_events": "enabled",
      "accel_speed": 0.0,
      "accel_profile": "adaptive",
      "natural_scroll": "disabled",
      "left_handed": "disabled",
      "middle_emulation": "disabled",
      "scroll_method": "none",
      "scroll_button": 274
    }
  },
  {
    "identifier": "3468:261:C-Media_Electronics_Inc._USB_Multimedia_Audio_Device",
    "name": "C-Media Electronics Inc. USB Multimedia Audio Device",
    "vendor": 3468,
    "product": 261,
    "type": "keyboard",
    "xkb_layout_names": [
      "German (no dead keys)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "German (no dead keys)",
    "libinput": {
      "send_events": "enabled"
    }
  },
  {
    "identifier": "2385:5905:Kingston_HyperX_Alloy_Elite_2",
    "name": "Kingston HyperX Alloy Elite 2",
    "vendor": 2385,
    "product": 5905,
    "type": "keyboard",
    "xkb_layout_names": [
      "German (no dead keys)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "German (no dead keys)",
    "libinput": {
      "send_events": "enabled"
    }
  },
  {
    "identifier": "2385:5905:Kingston_HyperX_Alloy_Elite_2_Consumer_Control",
    "name": "Kingston HyperX Alloy Elite 2 Consumer Control",
    "vendor": 2385,
    "product": 5905,
    "type": "pointer",
    "libinput": {
      "send_events": "enabled",
      "natural_scroll": "disabled"
    }
  },
  {
    "identifier": "2385:5905:Kingston_HyperX_Alloy_Elite_2_Consumer_Control",
    "name": "Kingston HyperX Alloy Elite 2 Consumer Control",
    "vendor": 2385,
    "product": 5905,
    "type": "keyboard",
    "xkb_layout_names": [
      "German (no dead keys)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "German (no dead keys)",
    "libinput": {
      "send_events": "enabled",
      "natural_scroll": "disabled"
    }
  },
  {
    "identifier": "2385:5905:Kingston_HyperX_Alloy_Elite_2_System_Control",
    "name": "Kingston HyperX Alloy Elite 2 System Control",
    "vendor": 2385,
    "product": 5905,
    "type": "keyboard",
    "xkb_layout_names": [
      "German (no dead keys)"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "German (no dead keys)",
    "libinput": {
      "send_events": "enabled"
    }
  }
]


edit:

i switched to libinput but no luck :!:

my keyboard on sway is bedevilled :twisted:

if i press iopsdf keys at the same time then i can use and write like a normal keyboard :lol:

what is going on here :?: 8O :roll:

_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Tue Sep 07, 2021 2:53 pm    Post subject: Reply with quote

this is really weird, today i started my pc and sway is working great, no problems so far with the keyboard.

all apps working, e.g. ungoogled-chromium and or all other apps which runs with
Code:
x11-base/xwayland


even with
Code:
Exec=dbus-run-session sway
in
Code:
/usr/share/wayland-sessions/sway.desktop


i adapted some of the settings for sway and waybar from endeavour os :roll:
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Tue Sep 07, 2021 4:26 pm    Post subject: Reply with quote

sadly, the keyboard problem on wayland came back.

it turns out that the keyboard sometimes don't work after cold restart.

unplugging and repluggind solved the issue, the keyboard is back on swaywm.

with mate never got problems at all.

what is the difference between xorg and wayland regarding keyboard input :?:

i also get these messages in .xsession-errors:

Code:
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.


Code:
00:04:20.628 [ERROR] [wlr] [libinput] event1  - Kingston HyperX Alloy Elite 2: client bug: event processing lagging behind by 13ms, your system is too slow


including this spamming:

Code:
> Warning:          Could not resolve keysym XF86BrightnessAuto
> Warning:          Could not resolve keysym XF86DisplayOff
> Warning:          Could not resolve keysym XF86Info
> Warning:          Could not resolve keysym XF86AspectRatio
> Warning:          Could not resolve keysym XF86DVD
> Warning:          Could not resolve keysym XF86Audio
> Warning:          Could not resolve keysym XF86ChannelUp
> Warning:          Could not resolve keysym XF86ChannelDown
> Warning:          Could not resolve keysym XF86Break
> Warning:          Could not resolve keysym XF86VideoPhone
> Warning:          Could not resolve keysym XF86ZoomReset
> Warning:          Could not resolve keysym XF86Editor
> Warning:          Could not resolve keysym XF86GraphicsEditor
> Warning:          Could not resolve keysym XF86Presentation....and so on


is it possible to add more Info about my input devices in sway or waybar config files, to get rid of these above messages :?:

thx
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Mon Sep 13, 2021 10:22 pm    Post subject: Reply with quote

it was my systems fault - USB issues somehow, but only with wayland !

switched to i3 and everything's fine.

will try sway (wayland) at later time again, maybe :wink:
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1166
Location: /run/user/1000

PostPosted: Tue Sep 14, 2021 12:05 am    Post subject: Reply with quote

Ah, one of those things, too bad, well like you said, you can try it again some time later :)
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Sat Sep 18, 2021 9:54 am    Post subject: Reply with quote

libinput bugged me so much in sway, so i tried many things 8O

lastly, i removed 40-libinput.conf in /etc/x11/xorg.conf.d and my keyboard switched to EN at lightdm login, but this is unbelievable my keyboard including right settings (de / nodeadkeys) working (again) in sway.

this finally solved it for me 8)

edit:

not really solved (i put 40-libinput.conf back) , because sometimes after restart or cold start, it won't work, only with sway and sometimes it just works great :twisted:

i can live with it anyway - i love problems - it's fun to search for solutions :lol:

maybe, my system have problems providing enough juice for my Kingston HyperX Alloy Elite 2 keyboard and connected Logitech 400 Mouse,

or it's going into USB sleep mode, to soon.
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Sat Oct 09, 2021 10:10 pm    Post subject: Reply with quote

i installed gentoo on a separate disk and this time, sway only.

and all the problems i had before have not emerged at all.

i love gentoo and sway :oops: :D

greetings (... programs)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "


Last edited by CooSee on Sat Oct 09, 2021 10:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1166
Location: /run/user/1000

PostPosted: Sat Oct 09, 2021 10:24 pm    Post subject: Reply with quote

Gentoo and Sway is awesome :D
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Sun Oct 10, 2021 12:42 am    Post subject: Reply with quote

i also could get rid of this awful .xsession-errors spam regarding keyboard:

Code:
Warning:          Could not resolve keysym XF86BrightnessAuto
Warning:          Could not resolve keysym XF86DisplayOff
Warning:          Could not resolve keysym XF86Info
Warning:          Could not resolve keysym XF86AspectRatio
Warning:          Could not resolve keysym XF86DVD
Warning:          Could not resolve keysym XF86Audio
Warning:          Could not resolve keysym XF86ChannelUp
Warning:          Could not resolve keysym XF86ChannelDown
Warning:          Could not resolve keysym XF86Break
Warning:          Could not resolve keysym XF86VideoPhone
.... and so on


by using a patch from the developers of libX11:

Code:
diff --git a/src/util/makekeys.c b/src/util/makekeys.c
index e847ef4c6c87e291d5e6862e0973c847a51fa912..4896cc5398a854c20b185fa2762ff7ed01f9e9a7 100644
--- a/src/util/makekeys.c
+++ b/src/util/makekeys.c
@@ -78,6 +78,18 @@ parse_line(const char *buf, char *key, KeySym *val, char *prefix)
         return 1;
     }

+    /* See if we can parse one of the _EVDEVK symbols */
+    i = sscanf(buf, "#define %127s _EVDEVK(0x%lx)", key, val);
+    if (i == 2 && (tmp = strstr(key, "XK_"))) {
+        memcpy(prefix, key, (size_t)(tmp - key));
+        prefix[tmp - key] = '\0';
+        tmp += 3;
+        memmove(key, tmp, strlen(tmp) + 1);
+
+        *val += 0x10081000;
+        return 1;
+    }
+
     /* Now try to catch alias (XK_foo XK_bar) definitions, and resolve them
      * immediately: if the target is in the form XF86XK_foo, we need to
      * canonicalise this to XF86foo before we do the lookup. */


just add this to /etc/portage/patches/x11-libs/libX11/libX11_EVDEVK_symbols.patch

and re-emerge libX11.

8) :D
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
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