You are not logged in.

#51 2004-07-19 06:15:28

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,261

Re: udev experience and tips

For getting udev to work:
pacman -S udev
be sure you have the right initscripts installed:
initscripts-0.7 !!!
add to /boot/grub/menu.list devfs=nomount to your kernel line
you have to add hotplug to your rc.conf daemon's list
you have to change fstab:
comment out:
#sysfs                  /sys          sysfs     defaults            0      0
change usbdefs line to that:
usbfs               /proc/bus/usb usbfs  defaults            0      0

Short summary where you have to change permissions
/etc/udev/permissions.d/udev.permissions:

# audio devices
dsp*:root:users:0660
audio*:root:users:0660
midi*:root:users:0660
mixer*:root:users:0660
sequencer*:root:users:0660
sound/*:root:users:0660
snd/*:root:users:0660
beep:root:users:0660
admm*:root:users:0660
adsp*:root:users:0660
aload*:root:users:0660
amidi*:root:users:0660
dmfm*:root:users:0660
dmmidi*:root:users:0660
sndstat:root:users:0660

# disk devices for having access to audioripping and burning eg note you have to enter it before hd* ... :
hdc:root:users:660
hdd:root:users:660

# v4l devices for tv and radio cards
video*:root:users:0660
radio*:root:users:0660
winradio*:root:users:0660
vtx*:root:users:0660
vbi*:root:users:0660
video/*:root:users:0660
vttuner:root:users:0660
v4l/*:root:users:0660

# scsi devices, for scsi scanners or cd writers
sg*:root:users:0660
pg*:root:users:0660
cdwriter:root:users:0660

Some other notes:
modems tts needn't to be set if you set pppd to be running as suid root but you have to make a symlink in udev.rules to ttyS0 or modem, serial ports are now in tts
for printing nothing has to be changed cups runs as root and have the permissions for that
same for usb-sticks and harddisks they usually have an entry in fstab and so if users is set in fstab no problem with that
usbscanners haven't to be changed too because it uses libusb
you have to set up hotplug properly to get the scanners work
if they worked before they should work with udev too

Symlinking devices this is only an example but it should be clear how it works, add this at the beginning of your
/etc/udev/rules.d/udev.rules:
# cdrom/cdrw links
KERNEL="hdc" SYMLINK="dvd"
KERNEL="hdd" SYMLINK="cdrom cdrecorder"
#important for modem users change to ttyS1 if serial port 2 is used
KERNEL="ttyS0" SYMLINK="modem"

to check if your symlinks work:
/etc/./start_udev
mount /dev/pts
mount /dev/shm

Offline

#52 2004-07-19 08:11:55

mctavish
Member
From: Australia
Registered: 2004-03-22
Posts: 48

Re: udev experience and tips

yeah, still getting the soundcard not found message on startup.

if I put hotplug in as a daeman I get a message like shpchp module not loaded or something like that at startup.

back to devfs for me for a while.

BTW when I went back to devfs my soundcard was muted. I had to run 'amixer set PCM 100 unmute'.  Weird huh. Just thought I'd mention it in case it happens to someone else.

Offline

#53 2004-07-19 17:32:50

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,261

Re: udev experience and tips

do you use alsaconf to configure your soundcard?
try loading your module by hand
modprobe yourmodule and look what dmesg puts out
perhaps hotplug makes trouble try to start it later or earlier

Offline

#54 2004-07-19 19:50:55

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,261

Re: udev experience and tips

wiki now available:
still formatting is needed
to see it how it should be press the edit button.
or if someone feels to do formating on it please do it.
http://wiki.archlinux.org/index.php/UdevHowTo

Offline

#55 2004-07-22 15:02:01

topito
Member
From: Catalonia
Registered: 2004-03-25
Posts: 118
Website

Re: udev experience and tips

Ok, migration to udev done here, everything is working perfect but mplayer -vo sdl is not working in a terminal like with devfs, well, that's not a problem now.

Just a question tpowa:

tpowa wrote:

comment out:
#sysfs                  /sys          sysfs     defaults            0      0

Where did you find that info? I thought sysfs "was the future" so ¿?

Offline

#56 2004-07-22 16:49:36

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: udev experience and tips

it is probably mounted someplace else big_smile


arch + gentoo + initng + python = enlisy

Offline

#57 2004-07-22 20:22:57

topito
Member
From: Catalonia
Registered: 2004-03-25
Posts: 118
Website

Re: udev experience and tips

xerxes2 wrote:

it is probably mounted someplace else big_smile

mmm, sure big_smile

$ cat /proc/mounts | grep sys
none /sys sysfs rw 0 0

Offline

#58 2004-07-22 20:28:48

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,261

Re: udev experience and tips

i found that in the new fstab file there it was outcommented
so i think that is the future

Offline

#59 2004-07-23 01:16:31

skeeter
Member
From: Woodstock, CT
Registered: 2003-02-01
Posts: 77

Re: udev experience and tips

I switched over to udev & most is working. Sound is up for root, (have to check my permissions there) and all seems good except I can't mount the cdrom (hdb?). I thought I followed most of the threads but I must be missing the KEY, haha! 

FSTAB

none      /proc          proc        defaults              0  0
none      /dev/pts      devpts    defaults              0  0
none      /dev/shm    tmpfs      defaults              0  0
tmpfs     /tmp           tmpfs      defaults              0  0
#sysfs   /sys            sysfs       defaults              0  0
usbdevfs  /proc/bus/usb  usbfs  defaults          0  0

/dev/hdb   /mnt/cd   iso9660   ro,user,noauto,unhide  0  0

/dev/hda3  swap  swap  defaults  0  0
/dev/hda2  /   reiserfs    defaults  0  0

udev.permissions

# disk devices
hdb:root:users:660
hd*:root:disk:660

All comments welcome  wink


Skeeter

Rule #1:  There are NO RULES!

Offline

#60 2004-07-23 07:41:29

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,750

Re: udev experience and tips

load up hotplug

pacman -S hotplug

you could try running alsaconf to set up sound....

HTH

Mr Green


Mr Green

Offline

#61 2004-07-23 09:45:19

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: udev experience and tips

@skeeter
that config you have work for me, even without to edit permissions

mount /mnt/dvd

mounts my hdc big_smile

@tpowa
thanks for the wiki, very helpful!!

@topito
check your rc.sysinit , sysfs seems to be mounted there. wink


arch + gentoo + initng + python = enlisy

Offline

#62 2004-07-23 12:10:33

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: udev experience and tips

hmm, hotplug also says this to me:
Jul 23 15:01:39 localhost modprobe: FATAL: Error inserting pciehp (/lib/modules/2.6.7/kernel/drivers/pci/hotplug/pciehp.ko): Operation not permitted
Jul 23 15:01:43 localhost noip2[1596]: v2.1.1 daemon started
I'm using latest stuff initscipts, hotplug and udev

LATER ON

I replace this line
KERNEL="ttyS[0-9]*",   NAME="tts/%n"
with this one:
KERNEL="ttyS[0-9]*",   NAME="tts/%n", SYMLINK="ttyS%n"

I think Judd and the other AL devs were trying to make udev works also with the old settings. So this is their chance on Modems (and serial devices in general)

Offline

#63 2004-07-23 12:19:26

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,261

Re: udev experience and tips

there appears no modem symlink right?
and you have inserted it at the beginning of the file?
the modem works with devfs?
you activated your serial ports in the bios?
you load ppp_generic in rc.conf?

the hotplug error is "normal" your system doesn't support that module

Offline

#64 2004-07-23 12:28:20

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: udev experience and tips

tpowa wrote:

the hotplug error is "normal" your system doesn't support that module

how is this normal I dont' get it.
How does hotplug detects and tries to load a module that I don't have the hardware. That module is for :
PCI Express Hot Plug Controller Driver that I don't have.
But I bet others might have sooner or later. So an idea if for them to recompile or for kernel pkg to include this module

anyways,
how can I make hotplug stop doing fault-detecting?
thanks a lot!

Offline

#65 2004-07-23 12:32:50

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,261

Re: udev experience and tips

dont know how it really works but this modules are mostly acpi and powermanagement dependend and hotplug tries some of them and if it failed it prints such a message that doesn't matter
hotplug detects also network modules etc. everything you tell it to detect
have a look at /etc/hotplug there are the scripts that it runs when it's started and there you can stop loading modules etc.

Offline

#66 2004-07-23 12:39:22

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,750

Re: udev experience and tips

Everything seems ok...

but for my cdrom & dvd drive...

Do I need to give permission to use it as a user?

I added lines to rules... but that has made no difference

Help!

Mr Green :?


Mr Green

Offline

#67 2004-07-23 12:40:54

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,261

Re: udev experience and tips

you only need permissions for the user if you want to let them use
kde audioripping, cdrecord burning etc.

Offline

#68 2004-07-23 13:47:19

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,750

Re: udev experience and tips

well I cannot access cdroms & dvd have not got permisson as user....

my udev.permissons contains :

# optical devices
sr*:root:users:660
scd*:root:users:660
pcd*:root:users:0660
cdrom*:root:users:0660
dvd:root:users:0660
rdvd:root:users:0660
cdroms/*:root:users:0660

Do I need anything else.??

Mr Green


Mr Green

Offline

#69 2004-07-23 14:10:45

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,261

Re: udev experience and tips

take the dircet one :-)
hdc hdd hdb or something else the rest doesn't work ;-)

Offline

#70 2004-07-23 14:25:31

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,750

Re: udev experience and tips

Thank you  tongue

# disk devices
hdc:root:users:660
hdd:root:users:660

Did the trick...

I love you lol

Mr Green ......


Mr Green

Offline

#71 2004-07-24 12:12:52

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,261

Re: udev experience and tips

now finally the new formated and reworked udev howto is available at the wiki
http://wiki.archlinux.org/index.php/UdevHowTo
happy udeving

Offline

#72 2004-07-24 16:19:02

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: udev experience and tips

the wiki says that you "must" use hotplug,
is that true? sad  I don't really get it.

/sbin/hotplug and hotplug daemon is it the same thing????

I don't have hotplug in rc.conf and it works anyway. big_smile


arch + gentoo + initng + python = enlisy

Offline

#73 2004-07-24 16:47:41

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,261

Re: udev experience and tips

i think it's really usefull to get all out of udev
think of generation special nodes for usb-sticks etc.
if you don't use hotplug i think dynamic creation of nodes will not work (didn't check that but that would make sense)

Offline

#74 2004-07-24 16:55:40

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: udev experience and tips

I think you are using hotplug anyway (it depends on what kernel you use and how it is configured). You can just enable/disable coldplugging with putting/removing hotplug in rc.conf. It's not a real daemon :-) It just runs all .rc scripts from /etc/hotplug. They are commented inside (sometimes) so you can learn for example what usb coldplugging does:

# "COLD PLUG" ... recovery from partial USB init that may have happened
# before the OS could really handle hotplug, perhaps because /sbin or
# $HOTPLUG_DIR wasn't available or /tmp wasn't writable.  When/if the
# /sbin/hotplug program is invoked then, hotplug event notifications
# get dropped.  To make up for such "cold boot" errors, we synthesize
# all the hotplug events we expect to have seen already.  They can be
# out of order, and some might be duplicates.
#
# Note that on 2.5 the init filesystem may have loaded some of the more
# essential usb drivers (maybe usb-storage for a boot disk, and hid),
# but we may still need to load less important ones or invoke setup

Offline

#75 2004-07-24 17:06:47

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,750

Re: udev experience and tips

xerxes2 wrote:

the wiki says that you "must" use hotplug,
is that true? sad  I don't really get it.

/sbin/hotplug and hotplug daemon is it the same thing????

I don't have hotplug in rc.conf and it works anyway. big_smile

load it up & stop whining :lol

Mr Green


Mr Green

Offline

Board footer

Powered by FluxBB