Xorg and udev (redux)

So it has been a bit over 3 years since my last post here…  And oddly enough, it is quite similar to my previous post.

Xorg 1.8 should be coming soonishly – using the scm version gives the awesomeness that is Xorg with hotplugging, without hal (hooray!)

In order for it to work though, you do need a very minimal xorg.conf :

Section "InputClass"
     Identifier "default"
     Driver "evdev"
EndSection

Alternately, with git, xorg-server supports /etc/X11/xorg.conf.d – I’ve got that little snippet in a file in there called 90-input-default.conf

Hattip: “iamben” on freenode: #gentoo-desktop

Advertisements

8 Responses to Xorg and udev (redux)

  1. Sorry I’m asking – which packages should I fetch from git to have finally only one package depending on hal?

    It is important for me as apparently dbus or hal crashes freezing desktop.

  2. steev says:

    Hmm? I’m not sure, which version of dbus are you running? I know that 1.2.22 (which I added to portage recently) does have 1 crasher, but it doesn’t seem to be extremely common (mostly on OpenSolaris) – Personally, I built just libdrm, mesa and xorg-server from git – which doesn’t require hal or dbus.

  3. Perhaps we should make xorg-server install this file when built with udev support?

    • Rémi Cardona says:

      Dude, that’s the plan. We just need to actually take care of it. 🙂

      @Steev, thanks for trying it out and posting this.

      Cheers

  4. ordum says:

    you waited til xorg 1.8 for that???? oO

    I’ve used evdev like since ever, and X without dbus or hal.

    I don’t know what you hurraying about.

  5. steev says:

    There is more to hotplugging than “using evdev” – I’m sorry that you can’t see that.

  6. dagger says:

    Steev,

    You dont need Section “InputClass” section mate. All you need to do, is to add proper rules to /etc/udev/rules.d

    When X starts you’ll have:

    [100996.134] (II) The server relies on udev to provide the list of input devices.

    [100996.437] (II) config/udev: Adding input device Power Button (/dev/input/event1)
    [100996.437] (**) Power Button: Applying InputClass “evdev-catchall”
    [100996.437] (II) LoadModule: “evdev”
    [100996.437] (II) Loading /usr/lib64/xorg/modules/input/evdev_drv.so
    [100996.437] (II) Module evdev: vendor=”X.Org Foundation”
    [100996.437] compiled for 1.8.0, module version = 2.3.2
    [100996.437] Module class: X.Org XInput Driver
    [100996.437] ABI class: X.Org XInput driver, version 9.0
    [100996.437] (**) Power Button: always reports core events
    [100996.437] (**) Power Button: Device: “/dev/input/event1”
    [100996.442] (II) Power Button: Found keys
    [100996.442] (II) Power Button: Configuring as keyboard
    [100996.442] (II) XINPUT: Adding extended input device “Power Button” (type: KEYBOARD)
    [100996.442] (**) Option “xkb_rules” “evdev”
    [100996.442] (**) Option “xkb_model” “evdev”
    [100996.442] (**) Option “xkb_layout” “gb”
    [100996.485] (II) config/udev: Adding input device Power Button (/dev/input/event0)
    [100996.485] (**) Power Button: Applying InputClass “evdev-catchall”
    [100996.485] (**) Power Button: always reports core events
    [100996.485] (**) Power Button: Device: “/dev/input/event0”
    [100996.495] (II) Power Button: Found keys
    [100996.495] (II) Power Button: Configuring as keyboard
    [100996.495] (II) XINPUT: Adding extended input device “Power Button” (type: KEYBOARD)
    [100996.495] (**) Option “xkb_rules” “evdev”
    [100996.495] (**) Option “xkb_model” “evdev”
    [100996.495] (**) Option “xkb_layout” “gb”
    [100996.497] (II) config/udev: Adding input device Logitech USB-PS/2 Optical Mouse (/dev/input/event2)
    [100996.497] (**) Logitech USB-PS/2 Optical Mouse: Applying InputClass “evdev-catchall”
    [100996.497] (**) Logitech USB-PS/2 Optical Mouse: always reports core events
    [100996.497] (**) Logitech USB-PS/2 Optical Mouse: Device: “/dev/input/event2”
    [100996.507] (II) Logitech USB-PS/2 Optical Mouse: Found 12 mouse buttons
    [100996.507] (II) Logitech USB-PS/2 Optical Mouse: Found scroll wheel(s)
    [100996.507] (II) Logitech USB-PS/2 Optical Mouse: Found relative axes
    [100996.507] (II) Logitech USB-PS/2 Optical Mouse: Found x and y relative axes
    [100996.507] (II) Logitech USB-PS/2 Optical Mouse: Configuring as mouse
    [100996.507] (**) Logitech USB-PS/2 Optical Mouse: YAxisMapping: buttons 4 and 5
    [100996.507] (**) Logitech USB-PS/2 Optical Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    [100996.507] (II) XINPUT: Adding extended input device “Logitech USB-PS/2 Optical Mouse” (type: MOUSE)
    [100996.507] (II) Logitech USB-PS/2 Optical Mouse: initialized for relative axes.
    [100996.507] (II) config/udev: Adding input device Logitech USB-PS/2 Optical Mouse (/dev/input/mouse0)

    In my case this was very important part of udev rule:
    ENV{ID_INPUT_KEY}==”?*”, ENV{xkblayout}=”gb”

    My xorg.conf looks like:

    Section “Device”
    Identifier “radeon0”
    Driver “ati”
    VendorName “ATI Technologies Inc”
    BoardName “FireGL v3400”
    BusID “PCI:1:0:0”
    Option “Monitor-DVI-0” “monitor0”
    Option “Monitor-DVI-1” “monitor1”
    Option “AccelMethod” “EXA”
    Option “AccelDFS” “on”
    EndSection

    Section “Monitor”
    Identifier “monitor0”
    Option “DPMS”
    Option “PreferredMode” “1920x1200_60.00”
    EndSection

    Section “Monitor”
    Identifier “monitor1”
    Option “DPMS”
    Option “PreferredMode” “1920x1200_60.00”
    Option “Rightof” “monitor0”
    EndSection

    Section “Screen”
    Identifier “screen0”
    Device “radeon0”
    DefaultDepth 24
    SubSection “Display”
    Depth 24
    Virtual 3840 1200
    EndSubSection
    EndSection

    Section “ServerLayout”
    Identifier “Default Layout”
    Screen “screen0”

    EndSection

    Section “ServerFlags”
    Option “RandR” “true”
    EndSection

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: