Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
reconfiguring the keyboard and mouse to evdev
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
bagas
Apprentice
Apprentice


Joined: 29 Jun 2018
Posts: 213

PostPosted: Fri May 08, 2020 8:27 am    Post subject: reconfiguring the keyboard and mouse to evdev Reply with quote

Hello.
Reconfiguring the keyboard and mouse to evdev.
Code:
egrep evdev /etc/make.conf
INPUT_DEVICES="evdev"

Code:
cat /etc/X11/xorg.conf.d/10-keyboard.conf
Section "InputClass"
    Identifier     "Keyboard0"
    Driver         "evdev"
    Option         "AutoRepeat" "500 30"
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc104"
    Option         "XkbLayout" "us,ru(winkeys)"
    Option         "XkbVariant" "nodeadkeys"
    Option         "XkbOptions" "grp:ctrl_shift_toggle,grp_led:caps,ctrl:nocaps"
EndSection


Added support in the core.

Code:
Device Drivers  --->
    Input device support  --->
        <*>   Event interface
        [*]   Mice  --->
              <*>   PS/2 mouse
        -*-   Keyboards  --->
              <*>   AT keyboard


Code:
Device Drivers  --->
    HID support  --->
        <*> HID bus support
        <*> Generic HID driver
            USB HID support  --->
                <*> USB HID transport layer


Code:
Device Drivers  --->
    [*] USB support  --->
        [*]   Improved Transaction Translator scheduling

Code:
emerge xorg-server xorg-drivers -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-base/xorg-server-1.20.7:0/1.20.7::gentoo  USE="elogind suid udev xorg -debug -dmx -doc -ipv6 -kdrive -libglvnd -libressl -minimal (-selinux) -static-libs -systemd -unwind -wayland -xcsecurity -xephyr -xnest -xvfb" 0 KiB
[ebuild   R    ] x11-base/xorg-drivers-1.20-r2::gentoo  INPUT_DEVICES="evdev -elographics -joystick -libinput -synaptics -vmmouse -void -wacom" VIDEO_CARDS="nvidia -amdgpu -ast -dummy -fbdev (-freedreno) (-geode) -glint -i915 -i965 -intel -mga -nouveau -nv (-omap) -qxl -r128 -radeon -radeonsi -siliconmotion (-tegra) (-vc4) -vesa -via -virtualbox -vmware" 0 KiB

recompiled emerge @x11-module-rebuild
Code:
qlist -IUv | grep xf86
x11-apps/xf86dga-1.0.3
x11-drivers/xf86-input-evdev-2.10.6
x11-libs/libXxf86dga-1.1.5 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_ppc_32 -abi_ppc_64 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc -static-libs
x11-libs/libXxf86vm-1.1.4-r1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_ppc_32 -abi_ppc_64 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs

I reboot the computer, there is no support for evdev.
Eempty.
grep evdev /var/log/Xorg.0.log
What to do, what else to rebuild?
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Fri May 08, 2020 9:29 am    Post subject: Reply with quote

Here's my evdev conf
Code:
/etc/X11/xorg.conf.d/97-evdev.conf
Section "InputClass"
   Identifier "mouse-all"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "AutoServerLayout" "on"
EndSection

Section "InputClass"
        Identifier "keyboard-all"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "XkbLayout" "fr"
        Option "XkbRules"  "xorg"
        Option "XkbModel"  "pc105"
        Option "AutoServerLayout" "on"
EndSection

try, the main difference is the MatchDevicePath entry
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Fri May 08, 2020 9:36 am    Post subject: Re: reconfiguring the keyboard and mouse to evdev Reply with quote

bagas wrote:
Reconfiguring the keyboard and mouse to evdev.

Is there a certain reason for not using libinput?
Back to top
View user's profile Send private message
bagas
Apprentice
Apprentice


Joined: 29 Jun 2018
Posts: 213

PostPosted: Fri May 08, 2020 9:45 am    Post subject: Re: reconfiguring the keyboard and mouse to evdev Reply with quote

charles17 wrote:
bagas wrote:
Reconfiguring the keyboard and mouse to evdev.

Is there a certain reason for not using libinput?

I want the same configs on computers.
To use evdev.
I want to understand why it does not work.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Fri May 08, 2020 9:59 am    Post subject: Re: reconfiguring the keyboard and mouse to evdev Reply with quote

bagas wrote:
Code:
cat /etc/X11/xorg.conf.d/10-keyboard.conf
Section "InputClass"
    Identifier     "Keyboard0"
    Driver         "evdev"
    Option         "AutoRepeat" "500 30"
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc104"
    Option         "XkbLayout" "us,ru(winkeys)"
    Option         "XkbVariant" "nodeadkeys"
    Option         "XkbOptions" "grp:ctrl_shift_toggle,grp_led:caps,ctrl:nocaps"
EndSection

Compare to https://wiki.gentoo.org/wiki/Evdev#Keyboard_layout
Back to top
View user's profile Send private message
bagas
Apprentice
Apprentice


Joined: 29 Jun 2018
Posts: 213

PostPosted: Fri May 08, 2020 10:06 am    Post subject: Re: reconfiguring the keyboard and mouse to evdev Reply with quote

charles17 wrote:
bagas wrote:
Code:
cat /etc/X11/xorg.conf.d/10-keyboard.conf
Section "InputClass"
    Identifier     "Keyboard0"
    Driver         "evdev"
    Option         "AutoRepeat" "500 30"
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc104"
    Option         "XkbLayout" "us,ru(winkeys)"
    Option         "XkbVariant" "nodeadkeys"
    Option         "XkbOptions" "grp:ctrl_shift_toggle,grp_led:caps,ctrl:nocaps"
EndSection

Compare to https://wiki.gentoo.org/wiki/Evdev#Keyboard_layout

What's wrong with the config?
Back to top
View user's profile Send private message
ipic
Guru
Guru


Joined: 29 Dec 2003
Posts: 432
Location: UK

PostPosted: Fri May 08, 2020 10:11 am    Post subject: Re: reconfiguring the keyboard and mouse to evdev Reply with quote

bagas wrote:
charles17 wrote:
bagas wrote:
Reconfiguring the keyboard and mouse to evdev.

Is there a certain reason for not using libinput?

I want the same configs on computers.
To use evdev.
I want to understand why it does not work.


Did you see this news article (eselect news list to find it):
Code:
2020-04-03-deprecation-of-legacy-x11-input-drivers
  Title                     Deprecation of legacy X11 input drivers
  Author                    Piotr Karbowski <slashbeast@gentoo.org>
  Posted                    2020-04-03
  Revision                  2

The Gentoo X11 Team is announcing the deprecation and future removal of
the legacy X11 input drivers x11-drivers/xf86-input-mouse and
x11-drivers/xf86-input-keyboard. As of 2020-05-01 those input drivers
will be masked for removal.

These drivers have been deprecated for many years, first by
xf86-input-evdev and then by xf86-input-libinput.
 etc...
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Fri May 08, 2020 10:16 am    Post subject: Reply with quote

Please wgetpaste your /var/log/Xorg.0.log so we could see what's in the errors.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Fri May 08, 2020 10:17 am    Post subject: Re: reconfiguring the keyboard and mouse to evdev Reply with quote

bagas wrote:
What's wrong with the config?

I think it show in the wiki the keyword xkb_layout
I can tell you my xorg is running azerty and as such that the keyword XkbLayout is working fine
My conclusion is the wiki is bad saying that, without checking the validity of xkb_layout, all keywords used by xorg have for years been in the form of XkbSomething (like XkbModel, XkbVariant...)
oh i see, it use that keyword inside xorg.log
Code:
[   131.389] (**) Option "xkb_rules" "evdev"
[   131.389] (**) Option "xkb_model" "pc105"
[   131.389] (**) Option "xkb_layout" "fr"
Back to top
View user's profile Send private message
bagas
Apprentice
Apprentice


Joined: 29 Jun 2018
Posts: 213

PostPosted: Fri May 08, 2020 2:09 pm    Post subject: Reply with quote

charles17 wrote:
Please wgetpaste your /var/log/Xorg.0.log so we could see what's in the errors.

/var/log/Xorg.0.log
https://pastebin.com/GnV3RrnH

Why is this config ignored? /etc/X11/xorg.conf.d/10-keyboard.conf
/etc/X11/xorg.conf
Code:
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
EndSection

Section "Files"
    FontPath        "/usr/share/fonts/corefonts/"
    FontPath        "/usr/share/fonts/misc/"
    FontPath        "/usr/share/fonts/100dri/"
    FontPath        "/usr/share/fonts/75dri/"
    FontPath        "/usr/share/fonts/Type1/"
    FontPath        "/usr/share/fonts/default/ghostscript"
    FontPath        "/usr/share/fonts/encodings/"
    FontPath        "/usr/share/fonts/ttf-bitstream-vera/"
    FontPath        "/usr/share/fonts/util/"
    FontPath        "/usr/share/fonts/cyrillic/"
EndSection

Section "Module"
    Load           "freetype"
    Load           "extmod"
    Load           "glx"
    Load           "dbe"
    Load           "record"
    Load           "xtrap"
    Load           "type1"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    HorizSync       31.5 - 64.3
    VertRefresh     50.0 - 70.0
EndSection

Section "Device"
    Identifier     "Card0"
    Driver         "nvidia"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Card0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Viewport    0 0
        Depth       24
        Modes      "1680x1050" "1152x864" "1024x768" "640x400"
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "Enable"
EndSection

Section "ServerFlags"
  Option "AllowEmptyInput" "False"
  Option  "AutoAddDevices" "False"
EndSection


Code:
# cat /etc/X11/xorg.conf.d/10-keyboard.conf
Section "InputClass"
    Identifier     "Keyboard0"
    Driver         "evdev"
    Option         "AutoRepeat" "500 30"
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc104"
    Option         "XkbLayout" "us,ru(winkeys)"
    Option         "XkbVariant" "nodeadkeys"
    Option         "XkbOptions" "grp:ctrl_shift_toggle,grp_led:scroll,ctrl:nocaps"
EndSection
serv0 ~ # cat /etc/X11/xorg.conf.d/20opengl.conf
Section "Files"
   ModulePath "/usr/lib64/opengl/nvidia"
   ModulePath "/usr/lib64/xorg/modules"
EndSection
Back to top
View user's profile Send private message
ipic
Guru
Guru


Joined: 29 Dec 2003
Posts: 432
Location: UK

PostPosted: Fri May 08, 2020 3:57 pm    Post subject: Reply with quote

Code:
[     9.002] (II) LoadModule: "kbd"
[     9.002] (II) Loading /usr/lib64/xorg/modules/input/kbd_drv.so
This indicates that you have the keyboard driver built. Since you do not explicitly load evdev, I think that the X server is loading kbd, and finding a match. I'm not sure why your choice does not override that, but it would be worth getting rid of the keyboard driver.

On my system, I have use entries in /etc/portage/package.use/10-system as follows:
Code:
*/* INPUT_DEVICES: libinput joystick
*/* INPUT_DEVICES: -keyboard -mouse


I'd suggest creating an entry (in make.conf, or a file in /etc/portage/package.use) that explicitly excludes keyboard. You can check with
Code:
emerge --info
before doing that to show that keyboard is being built (or not).

You could try explicitly loading evdev and see if that works before rebuilding.
Back to top
View user's profile Send private message
ipic
Guru
Guru


Joined: 29 Dec 2003
Posts: 432
Location: UK

PostPosted: Fri May 08, 2020 4:01 pm    Post subject: Reply with quote

Also, try adding this to your evdev config entry:
Code:
MatchIsKeyboard "on"
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri May 08, 2020 4:10 pm    Post subject: Reply with quote

Code:
[    10.195] (**) Option "XkbRules" "base"
[    10.195] (**) Option "XkbModel" "pc105"
[    10.195] (**) Option "XkbLayout" "us"

This is from your log. (**) indicates this is the setting from config file.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
bagas
Apprentice
Apprentice


Joined: 29 Jun 2018
Posts: 213

PostPosted: Fri May 08, 2020 5:10 pm    Post subject: Reply with quote

Jaglover wrote:
Code:
[    10.195] (**) Option "XkbRules" "base"
[    10.195] (**) Option "XkbModel" "pc105"
[    10.195] (**) Option "XkbLayout" "us"

This is from your log. (**) indicates this is the setting from config file.

I saw this, I don’t understand why the config does not want to be applied /etc/X11/xorg.conf.d/10-keyboard.conf
I decided to postpone the configuration for now, leave the kbd driver.
A computer in another city, after I’m in place, I’ll start setting up and bring up this topic.
Thank you all for your help.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri May 08, 2020 5:47 pm    Post subject: Reply with quote

Possibly it is overridden by another config file file which is sourced after 10-keyboard.conf. You can increase Xorg verbosity for further troubleshooting.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
bagas
Apprentice
Apprentice


Joined: 29 Jun 2018
Posts: 213

PostPosted: Fri May 08, 2020 6:02 pm    Post subject: Reply with quote

Jaglover wrote:
Possibly it is overridden by another config file file which is sourced after 10-keyboard.conf. You can increase Xorg verbosity for further troubleshooting.

You can increase Xorg verbosity for further troubleshooting?
I didn't understand.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri May 08, 2020 6:10 pm    Post subject: Reply with quote

Search, search ... how to increase Xorg verbosity. :)
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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