# udev and devfs

## atudar

I've read a few topics that go into the udev and devfs subject, however, I can't seem to get things working correctly without having devfs enabled in my kernel and set to automount at boot.  It's a 2.6.10 kernel that I've compiled myself for my AMD64 system.

Some of the combinations I've tried (no devfs, no automount @ boot -- yes devfs, no automount @ boot) still go through the standard boot process but when it is attempting to boot into the gnome login and start x, the system locks if I press any keys.

It's not a problem with xorg since the system boots just fine with devfs and the automount @ boot, but will dump a large number of debug messages into the dmesg about the devfs.

Needless to say, I'm kind of stuck.  In addition, the HAL automounter doesn't work all too well for me either (but that's a scsi thing that could still be tied to my kernel).

Can anyone help me out?

----------

## allucid

we need more info. what are the error messages in dmesg? did you look at the gentoo udev guide? make sure that the device settings for your mouse in /etc/X11/xorg.conf aren't pointing to a symlink but to an actual device node. Also, you need SCSI disk support enabled in your kernel for things like usb drives and such which might fix your hal problems.

----------

## gakula

not sure if that would help but try to disable legacy usb support in your bios. i had problem with my keyboard and 2.6.10 untill i turned it off

----------

## atudar

Haven't had time to work on it recently but I've chrooted into the system to delete xdm from boot -- still have to try a boot up to see if the dmesg will tell anything about the problem and hopefully find out whether it's a kernel problem or an xorg problem.

Thanks for the help so far guys.

----------

## aesthesia

I have a very similiar problem with my laptop. I don't run a graphical login manager with it, but when I try to startx, the screen goes black and doesnt seem to accept keyboard input. I can ssh into the machine for a clean shutdown, but i cannot get any sort of response when I am at the machine. The ONLY thing that seems to affect this is udev....as the OP says, unless both "devfs" and "automount at boot" are selected, the system goes into this. I wonder if he has an ati card? I don't know why that would affect things, but my desktop runs normaly with udev and xorg 6.8.....I'm going to see about 6.8.2 when I can.

----------

## dsd

check that your x11 config references /dev/input/mouse rather than /dev/mouse or /dev/psaux

----------

## aesthesia

That fixed everything, I hadn't even thought about that. Thanks a lot.

----------

## GungHo

Hi all, espacially Daniel,

this problem has also bothered me several times, when I was in the transition phase between 2.4 and 2.6.

But now, with my new knowledge regarding udev (I have got the last few days  :Wink:  ) I have found a very easy and I think also elegant solution for this problem.

I have simply made a local udev rule in my 

```

/etc/udev/rules.d/10-local.rules

KERNEL="mice", SYMLINK="mouse"
```

so that when the kernel device 'mice' is generated, with it's device node 'input/mice', an additional symlink named 'mouse' is also generated (all prepended with the value of udev_root, which has the default value of /dev/), and voila, one can leave the entry 

```

Option      "Device" "/dev/mouse"

in /etc/X11/xorg.conf
```

as is, and it works without problems in 2.4 and 2.6 without editing around every time  :Smile: .

One little drawback, a symlink /dev/psaux could not be generated additionally, because it already exists in /dev before, so only /dev/mouse could be used.

----------

## dsd

2.4 also has /dev/input/mice so you arent breaking any compatibility by always using /dev/input/mice

i think that the reason why there is no default /dev/mouse symlink is because historically thats been for PS/2 mice only whereas /dev/input/mice is also for USB. i'm not too sure on this but i do recall seeing some sort of discussion on this previously

----------

## GungHo

Hi,

hmm, I have booted with wrong configured mouse device with both kernels, but have also had a blocked system in 2.4 with '/dev/input/mice' in 'xorg.conf' (and of course cursed every time I did wrong  :Laughing:  ) . And there is a PS/2 mouse on my box at least for 5 years (and have always used a /dev/mouse link to the actual device node). But I have seen this issue regarding the blocked xorg in several threads when people did the transition from 2.4 to 2.6

But anyway, this local rule opens a convenient way for the time of the transition, and does not break anything. Generating such s kind of symlink is a documented feature of udev, it does not harm anything. Or what do you think, you are much deeper in this stuff ?

----------

## dsd

i was just saying that i'm sure that theres a reason why its not done by default, but i dont remember exactly what

----------

## atudar

Hey all,

Sorry about the delay on status but midterms have kept me busy for a time -- the current problem I've found (after removing a default boot into xorg) is that there is no kernel conflict or such but the system will freeze solid when I attempt to startx despite fixing the links in my xorg.conf.  As soon as I get the chance I'll put up my xorg.conf here as well as any kernel and xdumps that I can find unless someone else is having the same problem.

 -- kernel is 2.6.10 if that helps at all. --

----------

## atudar

Finally went in and found which device it was pointing to -- need for a critical pointer.

Thanks for all your help guys!

----------

## pharaoh

I just switched to udev and I couldn't get X to start until I changed the mouse line to /dev/input/mouse0.  I figured it would be something worse than that!

Also, I have a backup of my xorg.conf sitting in /root and it suddenly started reading that by default.  Sneaky...

----------

## atudar

Awesome -- it's sad that I left my good system 3000 miles away in college storage.  But meanwhile I've used that knowledge to get udev and gentoo working on an ancient 600 mHz celeron and the weirdest hardware that HP was able to put into a computer in 1998.

Again, thanks for the help -- started a stage 1 install on the AMD64 before I left and have to finish that puppy when I return.  So far, so good.

----------

