Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Udev alternatives in Artix (Read 14008 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Udev alternatives in Artix

Hi all!

I want to try to run Artix without udev. As its alternatives i have tried smdev itself (https://git.suckless.org/smdev) and nldev (http://git.r-36.net/nldev). In both cases (i just replaced udev openrc script with simple script starting smdev or nldev) system started normally and i could mount any partition without problems. On the other hand, system then had no network access, no audio and no possibility to start X.
As i found in mdev docs (https://git.busybox.net/busybox/plain/docs/mdev.txt) and morpheus linux init scripts (https://git.2f30.org/fs/file/bin/rc.init.html) one needs to add path to smdev in /proc/sys/kernel/hotplug. Artix does not have this file.
Can this be avoided without kernel rebuld or how kernel should be configured?
ARMtix

Re: Udev alternatives in Artix

Reply #1
Hi all!

I want to try to run Artix without udev. As its alternatives i have tried smdev itself (https://git.suckless.org/smdev) and nldev (http://git.r-36.net/nldev). In both cases (i just replaced udev openrc script with simple script starting smdev or nldev) system started normally and i could mount any partition without problems. On the other hand, system then had no network access, no audio and no possibility to start X.
As i found in mdev docs (https://git.busybox.net/busybox/plain/docs/mdev.txt) and morpheus linux init scripts (https://git.2f30.org/fs/file/bin/rc.init.html) one needs to add path to smdev in /proc/sys/kernel/hotplug. Artix does not have this file.
Can this be avoided without kernel rebuld or how kernel should be configured?
It will require a kernel rebuild. You have to enable "CONFIG_UEVENT_HELPER" in the kernel.
Chris Cromer


Re: Udev alternatives in Artix

Reply #3
After some time of working on using nldev in Artix i see following picture:
1) It is possible to configure smdev to populate /dev almost correct (it looks like all files are detected but not all symlinks. I will try to fix it later)
2) With nldev one doesn't need any special files to start smdev: it just works (but probably one needs a way to respawn nldev as it fails sometimes because of some buffer problems. I use respawn command from ubase for it)
3) The one thing which still misses is to load module once device is detected. Some parts of this task is done: nlmon shows all environment variables for each device, which contains MODALIAS. I wrote a script which finds and loads module by given alias. The problem is to connect one to other:  i cannot make script start until i kill nlmon
ARMtix

Re: Udev alternatives in Artix

Reply #4
Some news on nldev state:
1) all mentioned further works without any manual intervention now
2) I have almost all modules loaded at setup (udev setup has 5 modules more with fuse among them. Other 4 are unclear for me:  ccm, ax25, 8021q, mrp)
3) The system is closer to be able to work: it has working gpm and network connection (but my wlp3s0 interface is shown as wlan0). It is possible to start X session but it has no reaction to keyboard and mouse
4) Links in /dev are still missing: there are no links for input devices and audio (so, cmus doesn't work). /dev/dri links are also missing but graphics itself works OK. Also there is no /dev/mapper but as i don't use LVM on testing machine i can't check if it will work
ARMtix


Re: Udev alternatives in Artix

Reply #6
Hi all!

I want to try to run Artix without udev. As its alternatives i have tried smdev itself (https://git.suckless.org/smdev) and nldev (http://git.r-36.net/nldev). In both cases (i just replaced udev openrc script with simple script starting smdev or nldev) system started normally and i could mount any partition without problems. On the other hand, system then had no network access, no audio and no possibility to start X.


This is probably an ignorant question but why is X affected?

Re: Udev alternatives in Artix

Reply #7

This is probably an ignorant question but why is X affected?
Nldev and smdev themselves don't load modules (so they don't load module for GPU). For mdev and smdev this could be done through configuration file but this case you probably need to know which devices really need modules. I wrote simple script to start smdev and load modules and use it as runpath for nldev. As i mentioned above this works but i still have some things missing
ARMtix

Re: Udev alternatives in Artix

Reply #8
Is there an equivalent of a libudev?
In terms of making it install on artix, the package would have to be a split package into libudev and udev part to swap out eudev.

Re: Udev alternatives in Artix

Reply #9
Is there an equivalent of a libudev?
In terms of making it install on artix, the package would have to be a split package into libudev and udev part to swap out eudev.
By default nldev reads messages from kernel and libudev (unless you tell it to ignore one of them). After your reply i tested nldev only with kernel messages: the only difference is that rtsx_usb_ms and memstick modules are not loaded and ccm module is loaded.
Also i made a mistake in last report: sound works OK, at least cmus and alsamixer work without problems
ARMtix

Re: Udev alternatives in Artix

Reply #10
I have tested nldev on another device which uses LVM. So:
1) nldev may crush with buffer overflow error. It needs some respawning mechanism then. Also you may need to run nltrigger once more
2) LVM works but you need proper initscripts order (as lvm2 runit script running after triggering command). On shutdown this script provides messages "Device /dev/<all block devices> not initialized in udev database even after waiting 10000000 microseconds"
Also i found some info on problem with input in X11 in other distro wikis: Gentoo wiki says that evdev requires udev (but which module is used by gpm?) and Alpine wiki says that xorg might need udev for input devices
ARMtix

Re: Udev alternatives in Artix

Reply #11
Nldev and smdev themselves don't load modules (so they don't load module for GPU). For mdev and smdev this could be done through configuration file but this case you probably need to know which devices really need modules. I wrote simple script to start smdev and load modules and use it as runpath for nldev. As i mentioned above this works but i still have some things missing


but the GPU is loaded by the kernel on boot?

Re: Udev alternatives in Artix

Reply #12

but the GPU is loaded by the kernel on boot?
On my first device (where nldev runs without any crushes) GPU driver is detected on boot (intel). On the second one it is detected after second nltrigger call (amdgpu). In both cases libudev is not required
ARMtix


 

Re: Udev alternatives in Artix

Reply #14
This is a deep dive into what has become a broken X11 system since it has been "deseated" and made to be run out of systemd.

There is no reason why x should not just work with startx