Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
libinput doesn't recognise any devices
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
zinstack
n00b
n00b


Joined: 08 Nov 2017
Posts: 12
Location: Moscow

PostPosted: Thu Nov 09, 2017 6:16 am    Post subject: libinput doesn't recognise any devices Reply with quote

So my problem is I want to use libinput, but libinput-list-devices shows none and libinput-debug-events shows "Expected device added events on startup but got none. Maybe you don't have the right permissions?". But, in fact, i use root with all these commands. All the devices show up in dmesg and, using cat, I managed to find needed devices in /dev/input/event*, and currently I have keyboard mapped to /dev/input/event5 and touchpad mapped to /dev/input/event9. GPM works just perfectly. I have a synaptics touchpad, some "general" ps/2 keyboard, a laptop and a lot of time. I have all drivers incompiled, run without initrd and have absolutely no modules. EVDEV, PS2_SYNAPTICS and PS2_SYNAPTICS_SMBUS were set to yes. Maybe that's because I messed up with use flags? I tried not to edit them and in /etc/portage/make.conf only have alsa and input_devices_libinput. After switching to kde profile it didn't help either (before there was a clean default/linux/amd64/13.0 one). More than that, X doesn't recognise my keyboard. So what am I doing wrong? How do I fix this?
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Thu Nov 09, 2017 7:50 am    Post subject: Reply with quote

Do you have an Xorg log, the best advice I can give you is to include in your post some of the basic troubleshooting information and then let someone help steer you over to victory! For what you described, I would think that an X log should show an error regarding the keyboard. Also, depending on the Xorg configuration file, kernel settings, etc. there's a lot of potential things that could be an issue so it is helpful to see the output from your system.

If you like post back using wgetpaste or similar pastebin tool with emerge --info, and any relevant logs (the Xorg.log is important) that are stored in the folder /var/log and you should be able to catch the attention of some good answers from adding some more of that type of information here to the picture!
Back to top
View user's profile Send private message
zinstack
n00b
n00b


Joined: 08 Nov 2017
Posts: 12
Location: Moscow

PostPosted: Thu Nov 09, 2017 12:10 pm    Post subject: Reply with quote

[url=https://1drv.ms/f/s!As_1mBvrdwF7hKcnhthvDMZ7cYXdjw]Here[/url] are my settings and logs. The problem is not in Xorg, its libinput. And, I think the keyboard problem has the same cause as a touchpad, so it will probably be easy to solve, just as we know why doesn't libinput work as intended.
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 455

PostPosted: Thu Nov 09, 2017 5:25 pm    Post subject: Reply with quote

You don't have even anything related to libinput in logs.
Something like:
Code:
(II) LoadModule: "libinput"
(II) Loading /usr/lib64/xorg/modules/input/libinput_drv.so
(II) Module libinput: vendor="X.Org Foundation
(II) Using input driver 'libinput' for 'Keyboard0'
(II) Using input driver 'libinput' for 'Mouse0'
"


Have u configured xorg.conf ?
Have u added libinput to INPUT_DEVICES in make.conf ?
_________________
Sent from Windows
Back to top
View user's profile Send private message
zinstack
n00b
n00b


Joined: 08 Nov 2017
Posts: 12
Location: Moscow

PostPosted: Fri Nov 10, 2017 8:09 pm    Post subject: Reply with quote

mir3x wrote:

Have u configured xorg.conf ?
Have u added libinput to INPUT_DEVICES in make.conf ?

libinput has been added to input devices, but no effect, as expected, haven't touched xorg.conf though (haven't found that yet, do you mean xorg.conf.d, if yes, then of cource i did), but, as I already said, the problem is not that xorg doesn't read libinput, it is that libinput doesn't read devices. I guess it has something to do with the daemons or rc.


Last edited by zinstack on Fri Nov 10, 2017 8:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 455

PostPosted: Fri Nov 10, 2017 8:11 pm    Post subject: Reply with quote

Your problem is xorg doesnt even try to use libinput.
And I meant xorg.conf
_________________
Sent from Windows
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Fri Nov 10, 2017 8:43 pm    Post subject: Reply with quote

For what it's worth, I've this file in /etc/X11/xorg.conf.d/40-libinput.conf

Code:
# Match on all types of devices but tablet devices and joysticks
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection


I guess that's the one which makes it all work fine ? I didn't had to write it
_________________
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Sat Nov 11, 2017 1:34 am    Post subject: Reply with quote

Something I just realized about my own similar issue with using libinput on my laptop as a replacemet for evdev and synaptics, is that while the wiki says the following:

Quote:
It is a drop-in replacement for the slowly deprecating evdev and synaptics input drivers


This isn't actually totally agreed on, and with other distributions that is not the advice always. Also note that might depend on a few different things, such as desktop versus laptop hardware and also the Desktop environment in use.


Last edited by LIsLinuxIsSogood on Sat Nov 11, 2017 1:44 am; edited 1 time in total
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Sat Nov 11, 2017 1:43 am    Post subject: Reply with quote

If you are sticking with libinput as your driver (not sure if that's a good idea), but here is what the wiki desribesto make sure that X can be aware of libinput.
In other words, it is not enough to simply compile it with the use flag, but you actually have to go the extra step of configuring, as mentioned in the wiki here:
Code:
root #ln -s /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/


Explanation: The reason for this to me is not totally clear, but I think because there may not have been a chance to remove previous software (by running an emerge --depclean at this point, after installing libinput) that X can easily get confused about what drivers to attempt to load, and this provides the answer to that. Another way would be just copy past the information provided in the previous post for the file, after opening a new file in /etc/X11/xorg.conf.d/ with the name 40-libinput.conf

Or just wait until libinput and Xorg find a more seemless way for your particular system to get upgraded...that is what I'm hopeful about later. At this point, I'm not sure your rush to get onto libinput (since I doubt it will make any noticeable difference) unless you are an application programmer or something like that, I would just change it back and then maybe later figure it out.
Back to top
View user's profile Send private message
zinstack
n00b
n00b


Joined: 08 Nov 2017
Posts: 12
Location: Moscow

PostPosted: Sat Nov 11, 2017 10:12 am    Post subject: Reply with quote

Do you even guys read my messages? Even with 40-libinput.conf in xorg.conf.d and libinput in INPUT_DEVICES, xorg won't use the keyboard or touchpad, because if libinput doesn't have a basic idea of input devices in my system, the xorg won't as well. I'm telling again: the main problem is in libinput, not xorg, if xorg doesn't use libinput it's just another story and has a very easy fix of editing some config files and maybe recompiling xserver, but, mainly I was surprised by that libinput doesn't recognise any devices. It's no surprise that xinput won't show anything useful. Yes, I had problems with X not using libinput, but this is just above the water. As I already texted in my latest message, I already have everything set up, just as needed, but neither the keybord, nor the touchpad are having no effect, though in logs it does show that it loads libinput.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Nov 11, 2017 8:50 pm    Post subject: Reply with quote

You're right, this isn't anything to do with Xorg (so far). Besides, most of the suggestions above to change xorg.conf are wrong and misleading. Xorg loads files from /usr/share/X11/xorg.conf.d automatically, copying or linking things from there does nothing at best and more likely makes things worse. But that can wait until later.


It would help to figure out what's going on if we could see the full output from the following:
Code:
# emerge -pv dev-libs/libinput x11-drivers/xf86-input-libinput /etc/udev
# ls -l /dev/input
# libinput-list-devices
# strace libinput-list-devices 2>&1 1>/dev/null    # (if it's not too long)
Back to top
View user's profile Send private message
zinstack
n00b
n00b


Joined: 08 Nov 2017
Posts: 12
Location: Moscow

PostPosted: Sun Nov 12, 2017 2:12 pm    Post subject: Reply with quote

Ant P. wrote:
You're right, this isn't anything to do with Xorg (so far). Besides, most of the suggestions above to change xorg.conf are wrong and misleading. Xorg loads files from /usr/share/X11/xorg.conf.d automatically, copying or linking things from there does nothing at best and more likely makes things worse. But that can wait until later.


It would help to figure out what's going on if we could see the full output from the following:
Code:
# emerge -pv dev-libs/libinput x11-drivers/xf86-input-libinput /etc/udev
# ls -l /dev/input
# libinput-list-devices
# strace libinput-list-devices 2>&1 1>/dev/null    # (if it's not too long)


Thanks for the reply!
Here is emerge's output:
Code:
These are the packages that would be merged, in order:

Calculating dependencies  ........ done!
[ebuild   R    ] sys-fs/eudev-3.1.5::gentoo  USE="hwdb introspection kmod -rule-generator (-selinux) -static-libs {-test}" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild   R    ] dev-libs/libinput-1.7.3:0/10::gentoo  USE="{-test}" INPUT_DEVICES="-wacom" 0 KiB
[ebuild   R    ] x11-drivers/xf86-input-libinput-0.25.1::gentoo  0 KiB

Total: 3 packages (3 reinstalls), Size of downloads: 0 KiB

 * IMPORTANT: 15 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

Here's the ls's output:
Code:
total 0
crw------- 1 root root 13, 64 nov 12 15:38 event0
crw------- 1 root root 13, 65 nov 12 15:38 event1
crw------- 1 root root 13, 66 nov 12 15:38 event2
crw------- 1 root root 13, 67 nov 12 15:38 event3
crw------- 1 root root 13, 68 nov 12 15:38 event4
crw------- 1 root root 13, 69 nov 12 15:38 event5
crw------- 1 root root 13, 70 nov 12 15:38 event6
crw------- 1 root root 13, 71 nov 12 15:38 event7
crw------- 1 root root 13, 72 nov 12 15:38 event8
crw------- 1 root root 13, 73 nov 12 15:38 event9
crw------- 1 root root 13, 63 nov 12 15:38 mice
crw------- 1 root root 13, 32 nov 12 15:38 mouse0

Never seen "total 0" message on ls, never used it with -l though...
Libinput-list-devices gave no output and strace's message was extremely huge, so I couldn's copy it even from the window term from ssh.
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 455

PostPosted: Sun Nov 12, 2017 3:21 pm    Post subject: Reply with quote

So maybe you installed xorg with 'minimal' flag enabled ? If yes then disable it.

Code:
equery uses xorg-server

_________________
Sent from Windows
Back to top
View user's profile Send private message
zinstack
n00b
n00b


Joined: 08 Nov 2017
Posts: 12
Location: Moscow

PostPosted: Sun Nov 12, 2017 3:36 pm    Post subject: Reply with quote

mir3x wrote:
So maybe you installed xorg with 'minimal' flag enabled ? If yes then disable it.

Code:
equery uses xorg-server

No I didn't. The thread is full of my messages about xorg doing nothing bad. If you have a want to help me, please get aquented with what is already known.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Mon Nov 13, 2017 5:02 am    Post subject: Reply with quote

Edit: I didn't see the response from Ant P. requesting more info, so I retract all of this below.



zinstack, I realize you are frustrated because it is not a quick answer or the one you want, but in fairness to everyone else, since you have not yet posted the result of emerge --info xorg-server or xorg anything-else, not only is it hard to say what may be the problem, but also concerning is you've provided no support to the problem being outside or not within Xorg. Personally, I think if you are not against sharing it, then you should bypass your own beliefs and then share that information about xorg, since that is what is being asked. It seems like a critical component here, since regardless whether you are running Wayland or whatever libinput is a requirement and has to work with both of those systems (or either one). Do you catch my drift?

I will stick to my initial suggestion for you to bypass libinput drivers in favor of the slowly deprecated ones (evdev and synaptics) but that is because you are so concerned with the use of drivers, when in reality it really doesn't matter as long as things work.

But, just so you have some faith in my answer as well, there is no reason to think that evdev is going to be at least any time in the near future an obsolete tool.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Mon Nov 13, 2017 7:01 am    Post subject: Reply with quote

Quote:
strace's message was extremely huge, so I couldn's copy it even from the window term from ssh.


Sorry for the massive confusion, and for not reading posts more careful.

1st of all, I did not realize from the links provided and the messages for the strace being long, you should have already been told about the useful tool for pastebin on the web, there are several options I use wgetpaste.

Code:
emerge --ask app-text/wgetpaste


With that you should be able to include all the output from the strace, and whatever else it was you can't fit in the little box.

Again sorry.

Also, in terms of the following message you are getting, I have never seen it before. Perhaps you could include some further output from dmesg about this?
Quote:
"Expected device added events on startup but got none. Maybe you don't have the right permissions?"
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Mon Nov 13, 2017 10:58 am    Post subject: Re: libinput doesn't recognise any devices Reply with quote

zinstack wrote:
"Expected device added events on startup but got none. Maybe you don't have the right permissions?".

Well, as nearly always, it just point the problem, but you ignore it, it's not your fault, we all do that.

zinstack wrote:
Code:
total 0
crw------- 1 root root 13, 64 nov 12 15:38 event0
crw------- 1 root root 13, 65 nov 12 15:38 event1


And here's mine, note the permissions and the group owner
Code:
crw-rw---- 1 root input 13, 65 Oct 24 10:21 event1
crw-rw---- 1 root input 13, 63 Oct 24 10:21 mice


So you have to dig why your device manager is doing that.
Back to top
View user's profile Send private message
zinstack
n00b
n00b


Joined: 08 Nov 2017
Posts: 12
Location: Moscow

PostPosted: Mon Nov 13, 2017 1:40 pm    Post subject: Re: libinput doesn't recognise any devices Reply with quote

krinn wrote:
zinstack wrote:
"Expected device added events on startup but got none. Maybe you don't have the right permissions?".

Well, as nearly always, it just point the problem, but you ignore it, it's not your fault, we all do that.

zinstack wrote:
Code:
total 0
crw------- 1 root root 13, 64 nov 12 15:38 event0
crw------- 1 root root 13, 65 nov 12 15:38 event1


And here's mine, note the permissions and the group owner
Code:
crw-rw---- 1 root input 13, 65 Oct 24 10:21 event1
crw-rw---- 1 root input 13, 63 Oct 24 10:21 mice


So you have to dig why your device manager is doing that.

That didn't help, but still thanks for a suggestion!

LIsLinuxIsSogood wrote:
Quote:
strace's message was extremely huge, so I couldn's copy it even from the window term from ssh.


Sorry for the massive confusion, and for not reading posts more careful.

1st of all, I did not realize from the links provided and the messages for the strace being long, you should have already been told about the useful tool for pastebin on the web, there are several options I use wgetpaste.

Code:
emerge --ask app-text/wgetpaste


With that you should be able to include all the output from the strace, and whatever else it was you can't fit in the little box.

Again sorry.

Also, in terms of the following message you are getting, I have never seen it before. Perhaps you could include some further output from dmesg about this?
Quote:
"Expected device added events on startup but got none. Maybe you don't have the right permissions?"


Thanks for that, I've got the strace now. Here it is. And here is dmesg.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Mon Nov 13, 2017 6:12 pm    Post subject: Reply with quote

Despite repeated requests there is no emerge --info. Thus we do not know what init system is used and anything else about this system. Anyhow, there is a udev rule responsible for assigning input group, /etc/udev/rules.d/99-dev-input-group.rules.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Mon Nov 13, 2017 6:24 pm    Post subject: Reply with quote

Providing emerge—info dev-libs/libinput and x11-drivers/xf86-input-libinput, please if possible..

Those permission bits as krinn mentioned and as pointed to earlier are probably not right, so lets check into that.
Back to top
View user's profile Send private message
zinstack
n00b
n00b


Joined: 08 Nov 2017
Posts: 12
Location: Moscow

PostPosted: Mon Nov 13, 2017 7:12 pm    Post subject: Reply with quote

Ok, sorry. I always forget. Here is "emerge --info", "emerge --info libinput", and "emerge --info xf86-input-libinput". Oh, and I've found that dhcpcd is also having trouble finding interfaces, even though wlan0 is up and connected. Guess that may be useful.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Mon Nov 13, 2017 7:19 pm    Post subject: Reply with quote

Code:
rc-config show all

Check out if your udev and udev-trigger are started in sysinit runlevel.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
zinstack
n00b
n00b


Joined: 08 Nov 2017
Posts: 12
Location: Moscow

PostPosted: Mon Nov 13, 2017 7:51 pm    Post subject: Reply with quote

Jaglover wrote:
Code:
rc-config show all

Check out if your udev and udev-trigger are started in sysinit runlevel.

Oh my... I thought I've checked that in the very beginning! Everything just started working. Thanks so much to you all for helping me! Never thought I could be THAT dumb.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Tue Nov 21, 2017 9:10 pm    Post subject: Reply with quote

zinstack wrote:
Oh my... I thought I've checked that in the very beginning! Everything just started working. Thanks so much to you all for helping me! Never thought I could be THAT dumb.

Sorry for not replying sooner (my router decided to die last week...) but good to see it got figured out.

The root/root 0600 perms are a dead giveaway that udev failed to start, and everything else stems from that. Don't blame yourself for it, this one bug is pretty common and I've never figured out what causes it. The only reason I didn't mention it initially was I thought it was due to my weird setup and couldn't possibly happen in openrc; guess I was wrong.
Back to top
View user's profile Send private message
Melunlina
n00b
n00b


Joined: 04 Jun 2018
Posts: 2

PostPosted: Thu Mar 31, 2022 5:24 am    Post subject: Reply with quote

Thanks guys, starting the udev and udev-trigger services manually solved the same problem with my new Logitech G413 keyboard. Curious, why these services were stopped.
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
Goto page 1, 2  Next
Page 1 of 2

 
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