1 (edited by tcll 2026-04-01 01:31:47)

Topic: [Linux] Beneficial endeavors to remove udev

This thread is primarily about my endeavors to remove udev from my Artix Linux install, but the outlook is intended to help Hyperbola (among potentially others) achieve similar.
(While I don't intend on installing Hyperbola (primarily because partitionless-EXT4: [mkfs.ext4 -FL Label -b 4096 /dev/sdx] is FAR too reliable for me to attempt anything else), I do have stars in my eyes for the project)

Disclaimer: This thread may occasionally go off topic due to the vast amount of coverage with the sheer knowledge involved with a project like this, and this post may also change (for the better) since I'm just bad at writing. big_smile

Future: I do intend to cover the history and motivations behind my decisions that lead me down such a painful path, but that's it's own can of worms regarding how much Linux has further devolved into a cloud-focused insecure monolithic abomination that's done nothing but abuse me since I started using it in 2012 after my primary WinXP (an OS which I still use to date) install corrupted itself tongue

My personal goal is to have minimal static device configurations within initrd for setting up what udev would otherwise detect and configure, which from what I need really only needs to mount the mouse and network devices (if that) to a common location, as anything else I can mount after login...
(Ultimately I intend to remove my init system (OpenRC) entirely to have nothing at all running as root, but that's a goal for potentially another thread if Hyperbola is interested in providing similar options)

My current solutions to many various issues with this approach is simply just configuration scripts run from a custom user-level service daemon after login... (Although I AM building software to ease the tediousness of everything)
If anything needs root, I'm prompted with a terminal window to grant root to... (at least I know for certain what's running as root and when, unlike with OpenRC which does a ton of stuff behind the scenes you'll only know about via reverse-engineering)
One such example is a custom memory manager that properly clears swap and caches [echo 3 > /proc/sys/vm/drop_caches] to avoid Linux becoming sluggish when disk-cache would fill up the remaining unused RAM...
(I used to clear it every 10 seconds which worked quite nicely, but Wine would have problems finding my nvidia GPU (yet another thing to fix), so I reduced it to every minute as a workaround, which causes tolerable instability)

But regardless, that's getting off topic... tongue

The first major hurdle to removing udev was Xorg and libinput, which was, despite the tediousness, actually quite easy to do...
All you need to do for xorg is remove the extension modules for libinput and libevdev, but additionally ensure you have the extension modules installed for the mouse and keyboard directly
The rest is just ensuring those devices are configured in Xorg.conf

The keyboard is extremely easy to configure, as the extension (if not Xorg itself) primarily gets that from the TTY (via the launch command [Xorg -nolisten tcp :0 vt1 -keeptty ...]):

Section "ServerLayout"
    ...
    
    InputDevice    "Keyboard0" "CoreKeyboard"
    ...

EndSection

...

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

(Bonus info, joystick, wacom, and even hyperpen and wiimote are also supported by Xorg directly with extensions, which not many seem to know about)
The mouse however... what little info I found about mounting the mouse via [mknod /dev/input/mice c 13 63] has failed to work, and I have yet to find any info that does

I assume a similar approach would be used to mount network devices, but I need some help figuring that out as [/sys/class/net/*] is empty without udev... >.>

IMPORTANT: Ensure your perms don't allow the user to freely read mouse/keyboard input, as that's the very reason why very many distros to date still run Xorg as root (ignoring the PE issues from doing so)
(Xorg should be ran as no more than user, or at least some mid-level group swapped to via newgrp, with the device nodes configured to allow Xorg to read them, but not the user, without granting full root access to Xorg)

But anyways, with Xorg out of the way, you should be able to remove udev without much issue...
The only thing that might stand in your way would be any packages depending on udev

dbus for example requires udev through libelogind, which obviously I don't have installed if I can remove udev XD
(The ONLY program I have that requires dbus at all is Nheko, which to make that work, I had to pack dbus into it's AppDir and run it with [dbus-run-session] which loads a shoddy script that runs a notification daemon and keepassxc under that)

So yeah, there ARE hurdles, but nothing too overly complex, especially if you focus on portability like I prefer (I guess it depends on what you prefer though, since I don't use a WM that can't live without dbus for example, heck I don't even use a login manager at this current moment) tongue

I'll save the details of what I run for the history/pain thread, as I think it might already surprise a lot of people I even run Xorg big_smile

2 (edited by tcll 2026-04-01 09:59:29)

Re: [Linux] Beneficial endeavors to remove udev

More detailed info related to the mknod bit for mice
https://mkeys.sourceforge.net/input_setup.html

Localized code blocks just in case the link goes down (I'm tired of finding info that goes nowhere, so best not to add to that 10 years later)

Kernel modules required (compacted from the page):

    input.o - Input core (main driver)
    mousedev.o - If you need mouse support
    keybdev.o - If you need keyboard support (most likely you do)
    usbcore.o - For USB to work
    usb-[uoe]hci.o - USB host controller (either one: UHCI, OHCI, or the newest EHCI)
    hid.o - The HID driver handles all HID devices

    evdev.o - Needed for HIDNode driver to work

Standard devfs files those modules should provide:

    cd /dev
    mkdir input
    mknod input/mice c 13 63 # this is for USB mouse, if you own one

    mknod input/mouse0 c 13 32 # those are for applications that require
    mknod input/mouse1 c 13 33 # PS/2 - style mouse device
    mknod input/mouse2 c 13 34
    mknod input/mouse3 c 13 35 
    ...
    mknod input/mouse30 c 13 62 

    mknod input/event0 c 13 64 # this is for event devices required by HIDNode
    mknod input/event1 c 13 65 
    mknod input/event2 c 13 66
    mknod input/event3 c 13 67

I'll have to play around with these and make sure Xorg finds my mouse, next time I'm able to reboot smile

3 (edited by tcll 2026-04-01 19:41:53)

Re: [Linux] Beneficial endeavors to remove udev

So I've been looking through the network setup code (/etc/init.d/net.lo) a bit more and realized it may not be udev that sets up eth0...

I'm thinking it may actually be OpenRC, but to the point the setup depends on udev to work...

The code behind network setup is such a mess, requiring numerous scripts (in order):
/usr/lib/udev/rules.d/90-network.rules
/usr/lib/udev/net.sh
/etc/init.d/net.lo
/usr/lib/openrc/sh/functions.sh
/usr/lib/netifrc/sh/functions.sh
/usr/lib/artix/functions.sh

I still haven't worked through everything yet, but this is ridiculous

Whoever wrote this certainly didn't want people figuring out how networking works, or there wouldn't be so much bloat (needless code)

It's as if they think obscurity is somehow security, which seems to be a common trend I see amongst coders in many various languages...

Despite the fact so many security experts repeatedly say otherwise, but this is Linux, nobody listens to experts big_smile

EDIT: Ok so it's verified to not be OpenRC at all, at least not through shell scripts anyways...

I've grep-searched my entire /usr/lib/* folder for anything containing "\beth", and the only thing even remotely close (outside of commentary) to something capable of configuring "eth0" was openrc/console/keymap, which obviously wouldn't do anything like that XD

I also grep-searched /etc/* as well, which also was all commentary

So unless udev actually provides the "eth0" name for the scripts to configure, I can't see anything that would configure them otherwise...

There's just too much code I don't have the mental capacity to follow, if anything outside of udev configures this...

4

Re: [Linux] Beneficial endeavors to remove udev

Disclaimer: So some might frown upon me for this, but I promise I'm not using it in any distasteful way...

I've gotten better help from a local AI (ran with llama-server loading a gguf) than I have from anywhere on the internet.
(Don't discredit my efforts just because I'm using AI please, I'm more than aware AI is 99% incorrect, and haven't trusted it since the birth of ML)

What AI told me that the internet couldn't, is allegedly, mounting network devices only requires modprobe and ln, and all you need to do is search sysfs to find the folder ([/sys/devices/pci0000:00/_/_/net/*]) to ln to [/sys/class/net/*]...

Can anyone capable verify kernel modules actually create the [eth#]/[enp#s#] folder for me?

Seriously, how am I supposed to validate an AI isn't hallucinating if the internet isn't even willing to provide information about a particular topic...
It's really annoying there isn't any information about this... XP

5

Re: [Linux] Beneficial endeavors to remove udev

Please do not provide data derived from usage of stochastic algorithms here, in general. Hyperbola clearly does not accept anything resulting from LLM / machine-learning. Read here more: https://www.hyperbola.info/news/hyperbo … ions-done/

So either you would need to find a solution without LLM / machine-learning or you need to do this without documentation here. Sorry, but this is not the way for this community.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

6 (edited by tcll Yesterday 00:32:06)

Re: [Linux] Beneficial endeavors to remove udev

throgh wrote:

Please do not provide data derived from usage of stochastic algorithms here, in general. Hyperbola clearly does not accept anything resulting from LLM / machine-learning. Read here more: https://www.hyperbola.info/news/hyperbo … ions-done/

So either you would need to find a solution without LLM / machine-learning or you need to do this without documentation here. Sorry, but this is not the way for this community.

That's exactly why I promised I'm not using it distastefully.

I get the concerns, and think I've more than spoken my distaste for AI with how inaccurate it is.

That's why I'm verifying, since the internet isn't of any help here.

Like I said in the other thread, it's just a lead.

EDIT: I wish I could react to your post with a 👍 because I absolutely agree, and wish it didn't have to come to this
Just goes to show how much we've fallen that I need to stoop to such levels just to get anywhere with my endeavors... u.u

EDIT2: I should probably add if you're not aware, when I say "local" I mean "offline", as there's no way I'm trusting that S with an internet connection. wink

7

Re: [Linux] Beneficial endeavors to remove udev

Okay, just to be sure as even though llama maybe "open-source(d)": The data is surely not and also it never gets clear where the data for initial training and more would come from. As we had our own very special experience with Meta coming here, scraping and going (and repeat endless daily consuming our traffic): We needed to lock out manually for rsync. Also another reasoning why we got more and more critical not only towards Meta but also rsync in special. And yes, we could only verify that the accessing ip-addreses (IPv4 and IPv6) came from Meta. What they want(ed)? They just scraped on-going for the last year until we ended that.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

8 (edited by tcll Yesterday 12:32:30)

Re: [Linux] Beneficial endeavors to remove udev

Absolutely understandable (may as well have almost been no different from an ADDoS for you (or so I've heard stories of such scraping taking down websites anyways)), yeah Meta is disgusting, just like the rest of them, the only justification at all I see for using these stupid models is the scraped data that's no longer available on the internet, and the half of which that is, I can't even access due to those very restrictions (Anubis doesn't work for me on most sites because I refuse to accept the veil for future JS malware, if it isn't that already)

And that's also where search engines have become so bad (as per the agenda) they don't even list results for your prompt anymore.

regardless, yeah, I'm carefully reviewing what it tells me, which FYI, the particular model I'm using is a distill of GPT-5.2, just for context of where the above info is actually coming from (what you know about where they've scraped).

I really wish I could use something better, but such is the state of the current internet until every last one of these stupid data-centers falls.
And even then, there's no telling if the internet will ever be the same again, now that the damage has already been done... u.u

9 (edited by tcll Today 01:29:30)

Re: [Linux] Beneficial endeavors to remove udev

To restate the lead again in case anyone missed it during the off topic discussion...
(Yes it's important because it shows my feelings toward what I had to use)

Allegedly, only modprobe is required to have the [eth#]/[enp#s#] folder in [/sys/devices/pci0000:00/_/_/net/*] to ln in [/sys/class/net/*] when the NIC is discovered.

It makes sense, but can anyone capable actually verify that for me?
If nobody does for whatever their reasons, I can verify that later.

10

Re: [Linux] Beneficial endeavors to remove udev

I note this here (again): Only post what you discovered your own, not throughout any kind of machine-learning. And no, you do not have to use that. You can also tryout different approaches, including perhaps also asking people being there using at a time before udev / eudev. I doubt that either people here reading current (me included) have that knowledge or others having that but not reading here. In sum this ends quite demotivating, but to be honest clear: We are a little circle of individuals and minor groups being interested in that. So we first need to recognize and second we then need different approaches.

Otherwise we would have been faster with solutions to replace udev / eudev fully. With the restriction also that the result is also different. But as noted: There are different ones like sinit and others. Besides also to note that removing udev or other replacements make also right more growing group of packages either being not possible to be used or only possible to be used with many patches incoming.

The questions in follow-up:

Is a modern called environment right away possible or just no longer wanted without udev?
Is a replacement development at all possible and at hand? Otherwise only possible towards which version of kernel and implementation?

And what about missing devices then? Or states used then and now? Rendering the further future useless at risk?

Please do not get me wrong, but at this point we can clearly enumerate the will of people also: There are really many, a big number of people, only claiming to be interested in alternatives. So when you need to use "AI" to enumerate others either may be able to help or can help with research, and they clearly do not raise their voices here or elsewhere (otherwise we would find it together) ... we see that this is a clear missing perspective of interest. What am I saying now with this? We two or more are interested, but when we need to use "AI" to give us hints where to look our base is not stable going. My proposal would be then: Either looking or approaching old documentations and then also people with that special experiences before udev-handling. Using "AI" is not a must and if there is nothing left to find it, then GNU/Linux is not interested and we should do this here for our own. And I'm really willing to support this research when the long list of packages is finished upcoming.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

11 (edited by tcll Today 14:15:58)

Re: [Linux] Beneficial endeavors to remove udev

not throughout any kind of machine-learning

Okay, now I seriously have to ask...
What if what ML enlightened me about is actually what's correct?
(Believe it or not, if it is correct in this case, this wouldn't be the first time this model has correctly (as verified) enlightened me where nobody else would (eg: ELF memory allocation with PT_DYNAMIC and DT_GNU_HASH (segment)))

including perhaps also asking people being there using at a time before udev / eudev.

They usually don't respond, Linus Torvalds himself even ignores whatever emails I send him.

I doubt that either people here reading current (me included) have that knowledge or others having that but not reading here. In sum this ends quite demotivating, but to be honest clear: We are a little circle of individuals and minor groups being interested in that. So we first need to recognize and second we then need different approaches.

Otherwise we would have been faster with solutions to replace udev / eudev fully.

Well, dangit...
I know you don't mean it as demotivating, I've just been alone for years, and would really like some help... XP

Is a modern called environment right away possible or just no longer wanted without udev?

I believe it's always been possible, udev is just userspace software running as root that makes kernel calls...
Since those same calls can be made without udev (proven by mdev and the like), why can't we try to avoid it entirely. tongue

... Unless you mean me having software, in which no, I'm still learning here (I don't even know how to handle NICs or mice appropriately) XD

Is a replacement development at all possible and at hand? Otherwise only possible towards which version of kernel and implementation?

In the case of Linux, as far as I'm aware, the distro/kernel shouldn't matter, unless maybe it's something like Guix (distro) or Hurd (I still doubt, if the kernel is still standard), but this even works with something as custom as SliTaz or Alpine.

For BSD, this will have to be tested, since they like to change the kernel often.

And what about missing devices then? Or states used then and now? Rendering the further future useless at risk?

That should be handled the same way as we handle modprobe currently, states can be a pain, but it's still manageable.
(Well ok, I won't speak for everyone, but I've been doing this with ALSA for years, although I haven't really looked into anything beyond the configuration files, which I do know stuff exists to make easier, much like how fwmanager exists to make iptables easier)

There are really many, a big number of people, only claiming to be interested in alternatives. So when you need to use "AI" to enumerate others either may be able to help or can help with research, and they clearly do not raise their voices here or elsewhere (otherwise we would find it together) ... we see that this is a clear missing perspective of interest. What am I saying now with this? We two or more are interested, but when we need to use "AI" to give us hints where to look our base is not stable going. My proposal would be then: Either looking or approaching old documentations and then also people with that special experiences before udev-handling.

See, here's the thing, I've been trying for years, though I refuse to use malware (GitHub, GitLab, LinkedIn, Facebook, Twitter, Reddit, Discord, Telegram, Signal, etc) when that's the only form of contact they're willing to use.
If I have to choose between local AI and Palantir, I choose local AI (at least forums like this won't try to be malware and submit everything the platform collects associated with my identity to Palantir)

Using "AI" is not a must and if there is nothing left to find it, then GNU/Linux is not interested and we should do this here for our own. And I'm really willing to support this research when the long list of packages is finished upcoming.

I personally believe it'll be much more portable than that to not have to need such a long list tongue
(Thanks btw)

But yeah at least you know I'm only using AI as an untrustworthy guide, and not for writing any actual code (sharing my distaste for a certain someone writing kernel code).

Also just to mention, I'm not sure how fair it is to call it "GNU", if the only thing that remains is vmlinuz itself, GNU is more the userspace stuff like bash and glibc if that's even used.
(At least that's for my system anyways, but that is an ultimate goal) XD