Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mouse and keyboard not working with mdev[solved]
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
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1555

PostPosted: Wed Dec 04, 2024 12:05 pm    Post subject: mouse and keyboard not working with mdev[solved] Reply with quote

I have siwtched from udev to mdev on my virtual machine(on kvm, virtio graphics card)
I then installed xorg-driver and dwm,:
Code:
[ebuild   R    ] x11-wm/dwm-6.5::gentoo  USE="-savedconfig -xinerama" 0 KiB
[ebuild   R    ] x11-base/xorg-drivers-21.1-r2::gentoo  INPUT_DEVICES="synaptics vmmouse -elographics -evdev -joystick -libinput -void -wacom*" VIDEO_CARDS="-amdgpu -ast -dummy -fbdev (-freedreno) (-geode) -i915 -intel -mga -nouveau (-nvidia) (-omap) -qxl -r128 -radeon -radeonsi -siliconmotion (-tegra) (-vc4) -vesa (-via) (-virtualbox) -vmware" 0 KiB
[ebuild   R    ] x11-base/xorg-server-21.1.14:0/21.1.14::gentoo  USE="minimal xorg -debug -elogind (-selinux) -suid (-systemd) -test -udev -unwind -xcsecurity -xephyr -xnest -xvfb" 0 KiB


additionally I'm using a startup script I had written:
Code:
#!/bin/sh
mount /dev/vda1 /
mount -t proc proc /proc
mount -t sysfs sysfs /sys
echo /sbin/mdev > /proc/sys/kernel/hotplug
mdev -s
mount -o remount,rw,noatime /
mkdir /dev/pts
ln -sf /proc/self/fd /dev/fd
mount -t devpts /dev/pts
ifconfig eth0 192.168.122.15/24
route add default gw 192.168.122.1
/etc/startup/ssh
/etc/startup/env
export alias reboot="busybox reboot -f"
exec /bin/busybox init



when i started dwm using startx /usr/bin/dwm I have no mouse and no keyboard, any help would be appreciated.

thanks


Last edited by Adel Ahmed on Sun Dec 08, 2024 8:54 am; edited 1 time in total
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1763
Location: South America

PostPosted: Wed Dec 04, 2024 12:56 pm    Post subject: Reply with quote

Adel Ahmed wrote:
Code:
[ebuild   R    ] x11-base/xorg-server-21.1.14:0/21.1.14::gentoo  USE="minimal xorg -debug -elogind (-selinux) -suid (-systemd) -test -udev -unwind -xcsecurity -xephyr -xnest -xvfb" 0 KiB

Xorg uses udev for autodetecting the input devices and drivers that it should use. Since you are using mdev, you can't use this feature, so you must explicitly tell all that to Xorg with an xorg.conf file.

See man xorg.conf.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1555

PostPosted: Wed Dec 04, 2024 4:10 pm    Post subject: Reply with quote

I'm drawing a complete blank on how this should be done

I created thsi config file:
Code:
Section "InputDevice"
Identifier "Keyboard0"
Driver "inputtest"
Option "Device" "/dev/input/event1"
EndSection

Section "InputDevice"
Identifier "mouse"
Driver "synaptics"
Option "Protocol" "auto"
Option "Device" "/dev/input/event2"
Option "ZAxisMapping" "4 5 6 7"
EndSection


xorg log:

[ 12.382] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 12.382] (==) |-->Input Device "Keyboard0"
[ 12.382] (==) |-->Input Device "Keyboard0"
[ 12.382] (==) No Layout section. Using the first mouse device.
[ 12.382] (==) No Layout section. Using the first keyboard device.
Code:


then it seems no driver can be loaded:
[code][    12.405] (II) LoadModule: "evdev"
[    12.405] (WW) Warning, couldn't open module evdev
[    12.405] (EE) Failed to load module "evdev" (module does not exist, 0)
[    12.405] (EE) No input driver matching `evdev'
[    12.405] (II) Falling back to input driver `libinput'
[    12.405] (II) LoadModule: "libinput"
[    12.405] (WW) Warning, couldn't open module libinput
[    12.405] (EE) Failed to load module "libinput" (module does not exist, 0)
[    12.405] (II) LoadModule: "kbd"
[    12.405] (WW) Warning, couldn't open module kbd
[    12.405] (EE) Failed to load module "kbd" (module does not exist, 0)
[    12.405] (EE) No input driver matching `kbd'
[    12.405] (II) Falling back to input driver `libinput'
[    12.405] (II) LoadModule: "libinput"
[    12.405] (WW) Warning, couldn't open module libinput
[    12.405] (EE) Failed to load module "libinput" (module does not exist, 0)[/code]
I cannot use libinput or evdev, as they require the udev flag in xorg-server
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1763
Location: South America

PostPosted: Wed Dec 04, 2024 4:42 pm    Post subject: Reply with quote

What input devices does KVM emulate and what should the corresponding X11 input drivers be? I should have made that my first question.

If you want to stay in a supported configuration, and the correct drivers would be either evdev or libinput (likely), then you are out of luck: both require libudev, so you wouldn't be able to have both mdev and a GUI.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1555

PostPosted: Wed Dec 04, 2024 6:04 pm    Post subject: Reply with quote

keyboard is a ps2 keyboard
ps2 mouse & evtouch usb graphics tablet
I do not mind not being in a supported configuration
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1763
Location: South America

PostPosted: Wed Dec 04, 2024 7:51 pm    Post subject: Reply with quote

My preferred unsupported configuration would probably be installing libudev-zero, which is not in Gentoo's repository, reinstalling x11-base/xorg-server-21.1.14 with the udev USE flag set (even if you don't actually have udev), setting INPUT_DEVICES=evdev in /etc/portage/make.conf, and reinstalling affected packages with --changed-use. Which will include x11-base/xorg-drivers.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1555

PostPosted: Thu Dec 05, 2024 11:35 am    Post subject: Reply with quote

I've emerged xorg-server with the dev flag, tried to get udev running again:
Code:
root@(none) $ /usr/lib/systemd/systemd-udevd
Using default interface naming scheme 'v253'.
Assertion 'path_is_absolute(p)' failed at src/basic/chase.c:628, function chase(). Aborting.
Aborted


I also tried the config files in mdev like a boss but I get the same result, no mouse or keyboard in icewm
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1763
Location: South America

PostPosted: Thu Dec 05, 2024 12:36 pm    Post subject: Reply with quote

But you shouldn't have /usr/lib/systemd/systemd-udevd since you don't have udev, what are we looking at?
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1555

PostPosted: Thu Dec 05, 2024 1:13 pm    Post subject: Reply with quote

I'm trying to get either working, udev or mdev
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1763
Location: South America

PostPosted: Thu Dec 05, 2024 1:45 pm    Post subject: Reply with quote

You had mdev working when you made your first post, didn't you? Do you not remember what you changed since then, so that you can revert it?
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1555

PostPosted: Thu Dec 05, 2024 1:53 pm    Post subject: Reply with quote

I have 2 snapshots of this vm, once with mdev working, one with my attempt at getting udev to work, we can go either way
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22818

PostPosted: Thu Dec 05, 2024 2:27 pm    Post subject: Reply with quote

Which way would you like to go?

As an aside, I thought you would need to go through the init system to start udevd. Starting it directly may not work. At the very least, that is an unusual way of starting it.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1555

PostPosted: Thu Dec 05, 2024 3:02 pm    Post subject: Reply with quote

I would love to do it with mdev, I would also be quite happy with doing it with udev.
yes it's not the regular way to do this I understand, but I'm working on installing gentoo on a 256MB machine and every megabytes is gonna count, if necessary I will re-install openrc.
I would also appreciate any document anyone as on reducing memory footprint, I have this so far:
Code:
root@(none) $ smem
  PID User     Command                         Swap      USS      PSS      RSS
  204 root     dropbear                           0       36      223      740
    1 root     /bin/busybox init                  0       72      307     1000
  205 root     /bin/sh                            0       80      379     1192
21691 root     -sh                                0      116      439     1276
21690 root     dropbear                           0      536      723     1240
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1763
Location: South America

PostPosted: Thu Dec 05, 2024 4:25 pm    Post subject: Reply with quote

If you must put a GUI on it, and want to keep things easy (i. e. deal with the minimum amount of problems you'd have to solve), throw away mdev and call it a day.

If you must keep mdev, be prepared to either do away with a GUI, or maintain a nonstandard Gentoo with an unsupported setup.

I don't think there's a third alternative.

I'm not sure that you can do much with 256MB these days anyway, if you want to use that as a general purpose computer. As opposed to using it for one single dedicated job. Replacing GNU libc with musl is another resource saver, but also creates an additional problem because a lot of software sucks at being portable.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1555

PostPosted: Thu Dec 05, 2024 5:10 pm    Post subject: Reply with quote

ok let me try and reset things to the way they were with openrc and udev, then I can optimize after I get gui up.
I'm using musl, i was wonder if it would be possible to use dietlibc, and what the benefits in terms of memory consumption would be
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1763
Location: South America

PostPosted: Thu Dec 05, 2024 9:41 pm    Post subject: Reply with quote

Adel Ahmed wrote:
I'm using musl, i was wonder if it would be possible to use dietlibc, and what the benefits in terms of memory consumption would be

Well, Gentoo does package dietlibc —it's dev-libs/dietlibc— but a) currently it doesn't have a maintainer, and worse, b) it doesn't satisfy virtual package virtual/libc, so you wouldn't be able to use it as the system libc anyway, unless, again, you enter unsupported setup territory.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1555

PostPosted: Sun Dec 08, 2024 7:38 am    Post subject: Reply with quote

I have re-installed with udev running as normal and wasa able to startx, thanks for your help I will try switching to mdev now.
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