Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel 3.7 vs device manager (like udev)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Mon Dec 17, 2012 2:14 pm    Post subject: kernel 3.7 vs device manager (like udev) Reply with quote

hi there!

I have a pc without any kind of cdrom, a kernel setup without any kernel modules and make use of kernel's devtmpfs.
though, my network card needs to load a firmware which kernel 3.7 can do by itself.

I realized I do not need kmod and I wonder ... do I need a device manager like udev at all?!

I guess for usb storage devices, though, only if devtmpfs does not manage that.


any ideas ... pointer ... etc? thanks!
_________________
hear hear
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Mon Dec 17, 2012 3:09 pm    Post subject: Reply with quote

You could possibly, under highly specific circumstances, not start udev, but you do not want to actually remove it:

Code:

emerge -pC udev
 * This action can remove important packages! In order to be safer, use
 * `emerge -pv --depclean <atom>` to check for reverse dependencies before
 * removing packages.

>>> These are the packages that would be unmerged:


!!! 'sys-fs/udev' (virtual/dev-manager) is part of your system profile.
!!! Unmerging it may be damaging to your system.

_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Mon Dec 17, 2012 4:51 pm    Post subject: Reply with quote

You seem to be forgetting about side effects.
I.e. xorg expects tagging done by udev for input hotplug, udisks do use udev rules too...
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Mon Dec 17, 2012 10:38 pm    Post subject: Reply with quote

hmm, usb keyboard and usb mouse is managed by udev? iek.
what are udisks? :oops:

at some point xorg had a udev useflag, is that hardwired now? :?
_________________
hear hear
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3264
Location: Canada

PostPosted: Mon Dec 17, 2012 11:33 pm    Post subject: Reply with quote

geki wrote:
hmm, usb keyboard and usb mouse is managed by udev? iek.
what are udisks? :oops:

at some point xorg had a udev useflag, is that hardwired now? :?


well, you can disable autodetect of the input devices in X
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Tue Dec 18, 2012 6:51 pm    Post subject: Reply with quote

looks like I will be on a hell ride this weekend.
hopefully, I remember to binpkg udev first. :twisted:
_________________
hear hear
Back to top
View user's profile Send private message
hcaulfield57
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2012
Posts: 148

PostPosted: Thu Dec 20, 2012 7:34 am    Post subject: Reply with quote

You can probably get rid of udev on your system, but there are a couple things you will have to watch out for. The most visible issue you may run into is that xf86-input-evdev requires xorg-server to be build with the 'udev' use flag. If you do not do this, you will have to use xf86-input-mouse and xf86-input-keyboard, which is not really an issue at all, it's just something you will have to be aware of. Secondly, if you use only devtmpfs (as far as I can remember), device nodes in /dev will not have correct permissions. The primary role of udev now is to fix those permissions. For this reason I would suggest either switching to static-dev which will have correct permissions (assuming you don't want a device manager), or switch to either mdev (for a minimal device manager), or eudev (for a minimally invasive udev replacement).
_________________
"To design the perfect anti-Unix, make all file formats binary and opaque, and require heavyweight tools to read and edit them." - The Art of Unix Programming
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Thu Dec 20, 2012 8:44 am    Post subject: Reply with quote

luckily I do not use evdev. I better save a list of /dev to compare. :o
_________________
hear hear
Back to top
View user's profile Send private message
hcaulfield57
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2012
Posts: 148

PostPosted: Thu Dec 20, 2012 9:13 am    Post subject: Reply with quote

I actually am curious what xf86-input-evdev offers that xf86-input-{mouse, keyboard} do not. However on an older installation I used mouse and keyboard and could not tell any difference, I'm not quite sure there is one (that's noticeable at least).
_________________
"To design the perfect anti-Unix, make all file formats binary and opaque, and require heavyweight tools to read and edit them." - The Art of Unix Programming
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Thu Dec 20, 2012 2:45 pm    Post subject: Reply with quote

I think evdev is the successor of mouse and keyboard and that mouse and keyboard will be deprecated. I could be wrong, though.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
derk
Guru
Guru


Joined: 10 Mar 2003
Posts: 347
Location: St Thomas Ontario

PostPosted: Thu Dec 20, 2012 5:53 pm    Post subject: Reply with quote

evdev is unique to linux .. I believe bsd unix's also use X, but do not have evdev capability ... so use keyboard and mouse drivers instead

also udev is unique to linux as well so udev flag still exists to remove it for x86-fbsd and amd64-fbsd arch usage

there is a nice guide to setting up mdev via busybox[mdev] on the wiki .. works .. just follow directions I used it for a while ..
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Fri Dec 21, 2012 11:44 am    Post subject: Reply with quote

xorg/openbox starts without any dev-manager. fun :o
apache2/php/mysql engine shows up in browser.

but I better use busybox[mdev] for proper /dev access rights.
who knows what silently fails ... :roll:

the next step for the kernel is to manage proper /dev access rights. then ... !! :lol:
_________________
hear hear
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Fri Dec 21, 2012 11:49 am    Post subject: Reply with quote

I wonder if busybox[mdev] needs that init script to mount /proc and /sys.
it is mounted here without any dev-manager ...

edit #1
1. the script /sbin/linuxrc is not necessary here.
2. I had to remove devfs from sysinit runlevel
(devfs <-> mdev waiting for each other, funny dependency failure).
3. /dev/mem and /dev/kmem are now root:root vs root:kmem ... whysoever

edit #2
4. adding devpts to /etc/fstab restored my virtual terminals

yay, I am finally there. :twisted:


any comments? anyone interested to verify and update the wiki? :o
_________________
hear hear
Back to top
View user's profile Send private message
SlashBeast
Retired Dev
Retired Dev


Joined: 23 May 2006
Posts: 2922

PostPosted: Fri Dec 21, 2012 2:00 pm    Post subject: Reply with quote

If you are interesed in running mdev you can be happy with my scripts and config: https://github.com/slashbeast/mdev-like-a-boss it also cover xorg configuration. I do run mdev on every gentoo box I own.

You can simply add foo-overlay and emerge mdev-like-a-boss and add mdev to sysinit runlevel, and you are free to remove devfs and all udev* init scripts from there. The mdev-like-a-boss will pull mdev-bb which is the busybox's mdev but as a single, not multi-cell binary. I do need it as I use grsecurity's RBAC and I woudn't want let every busybox's applet access to /dev.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Fri Dec 21, 2012 6:19 pm    Post subject: Reply with quote

does mdev supports input hotplug?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
SlashBeast
Retired Dev
Retired Dev


Joined: 23 May 2006
Posts: 2922

PostPosted: Fri Dec 21, 2012 6:47 pm    Post subject: Reply with quote

well it does create nodes on hotplug, the usb keyboards work as hotplug and mouses as well if you set them to /dev/input/mice. As far as I know Xorg crew works on real hotplug support without evdev (udev) backend which is linux-only.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Sat Dec 22, 2012 7:15 am    Post subject: Reply with quote

SlashBeast wrote:
well it does create nodes on hotplug, the usb keyboards work as hotplug and mouses as well if you set them to /dev/input/mice. As far as I know Xorg crew works on real hotplug support without evdev (udev) backend which is linux-only.


so I'll have to wait for xorg's crew to finish the work before I can migrate my multiseat setup to mdev, ok thanks :)
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Sat Dec 22, 2012 8:41 am    Post subject: Reply with quote

SlashBeast
sounds quite sane to have a standalone mdev.
don't you want to push like sys-fs/mdev to portage? :o

your overlay looks quite big. :D
_________________
hear hear
Back to top
View user's profile Send private message
SlashBeast
Retired Dev
Retired Dev


Joined: 23 May 2006
Posts: 2922

PostPosted: Sat Dec 22, 2012 9:20 am    Post subject: Reply with quote

geki wrote:
SlashBeast
sounds quite sane to have a standalone mdev.
don't you want to push like sys-fs/mdev to portage? :o

your overlay looks quite big. :D


If you wish not to happen install anything beside mdev from the overlay you can aid your package.mask with:

Code:
*/*::foo-overlay

and package.unmask with:
Code:
sys-fs/mdev-bb::foo-overlay
sys-fs/mdev-like-a-boss::foo-overlay


Even if I push mdev to portage, the mdev-like-a-boss would be out-of-tree, managing it into portage tree would be kinda hard because I am not a developer and poking one of devs to pull my changes would take from minute to ages ;p Also some of my code in the very ebuilds propably does not meet the gentoo's ebuild standards.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Fri Dec 28, 2012 7:30 pm    Post subject: Reply with quote

xf86-input-evdev driver is for handling /dev/input/event* nodes.
As these nodes can be just about anything (i.e. pc speaker has such node), either some test need to be done on the node (basically heuristics, so guesses) or udev markings can be used (udev has its own heuristics, but at least the blame is shifted and udev does have more complete info as it receives the node).
udisks is the storage hotplug backend used by the major DEs (either via solid (KDE) or gvfs).
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Fri Dec 28, 2012 8:09 pm    Post subject: Reply with quote

SlashBeast wrote:
As far as I know Xorg crew works on real hotplug support without evdev (udev) backend which is linux-only.

Do you have any links about that? I'd be interested in reading the details and how far the implementation is.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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