Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Lircm and X

  1. #1
    Join Date
    Mar 2007
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    [SOLVED] Lircm and X

    Greetings!

    I'm posting for some input after exhausting just about every angle I can come up with. I'm using Lirc to use my remote in mplayer etc, and this is working perfectly. The problem I am having here is using the lircm extension to control the mouse cursor with the remote control.

    The device output is /dev/lircm (standard) and running cat /dev/lircm does generate output using the correct remote keys. I have to assume that this means Lirc(m) is running just fine, and that the problem is my xorg.conf (God only knows how). The relevant parts of my current config are:

    Code:
    Section "ServerLayout"
        Identifier     "Layout0"
        Screen      0  "Screen0" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "LIRC-Mouse"
    EndSection
    
    Section "InputDevice"
        Identifier     "Mouse0"
        Driver         "mouse"
        Option         "Protocol" "auto"
        Option         "Device" "/dev/psaux"
        Option         "Emulate3Buttons" "no"
        Option         "ZAxisMapping" "4 5"
    EndSection
    
    Section "InputDevice"
        Identifier     "LIRC-Mouse"
        Driver         "mouse"
        Option         "Device" "/dev/lircm"
        Option         "Protocol" "IntelliMouse"
        Option         "SendCoreEvents"
        Option         "Buttons" "5"
        Option         "ZAxisMapping" "4 5"
    EndSection
    
    Section "InputDevice"
        # generated from default
        Identifier     "Keyboard0"
        Driver         "kbd"
    EndSection

    I believe my lircmd.conf is fine, but I'll post it anyway:

    Code:
    #UNCONFIGURED
    #
    # To find out how to get a proper configuration file please read:
    # 
    #	/usr/share/doc/lirc/README.Debian
    # 
    # lircmd config file
    # 
    PROTOCOL IntelliMouse
    # ACCELERATOR start max multiplier
    
    ACCELERATOR 2 30 5
    TOGGLE_ACTIVATE * Green
    
    MOVE_N  * Two
    MOVE_NE * Three
    MOVE_E  * Six
    MOVE_SE * Nine
    MOVE_S  * Eight
    MOVE_SW * Seven
    MOVE_W  * Four
    MOVE_NW * One
    
    BUTTON1_TOGGLE * Five
    BUTTON2_TOGGLE * Down
    
    BUTTON1_CLICK * Five
    BUTTON2_CLICK * Star
    BUTTON3_CLICK * Hash

    If anyone's got any ideas about where I'm going wrong, I'd be really grateful

    Grenage.
    Last edited by Grenage; July 20th, 2009 at 09:55 AM.

  2. #2
    Join Date
    Mar 2007
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Lircm and X

    Shameless one-off bump.

  3. #3
    Join Date
    Jun 2005
    Location
    Canada
    Beans
    94
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Lircm and X

    I have the same problem. Have you gotten lircmd to work?

  4. #4
    Join Date
    Mar 2007
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Lircm and X

    Alas no, I never managed to get it working.

  5. #5
    Join Date
    Jun 2005
    Location
    Canada
    Beans
    94
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Lircm and X

    I fixed the problem for me. All I had to do was add the following to my ServerLayout section:

    Code:
    Option "AutoAddDevices" "off"
    Prior to adding the above line, I noticed that my Lirc-mouse was disabled because AllowEmptyInput is on (according to /var/log/Xorg.0.log). When I turned AllowEmptyInput off, my lirc mouse was working but pressing a key on my keyboard caused the key to be repeated 3 times on the screen.

    Cheers.

  6. #6
    Join Date
    Nov 2006
    Beans
    29

    Re: Lircm and X

    Blackie_Chans solution works, but it dissables HAL which is used for auto mouse and keyboard config since 8.10.
    The more elegant solution is leaving AutoAddDevices enabled and configuring lirc mouse in hal and not in xorg.conf:
    see: https://bugzilla.redhat.com/show_bug.cgi?id=498580

  7. #7
    Join Date
    Mar 2007
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Lircm and X

    Greetings, and thank you for the additions.

    I've dabbled with various configs and did get it to work using Blackie_Chan's advice (thank you so much). I didn't have much luck with omarino's link, unfortunately; HAL doesn't appear to get on with any of my configs.

    Anyhow; it's an excellent result!

  8. #8
    Join Date
    Nov 2006
    Beans
    29

    Re: Lircm and X

    Disabling auto-add devices messes up my other configuration + it messes up my lirc mouse every time i reconfigure X.
    Thats why i decidede to do things tje HAL way - instead of editing xorg.conf, i created a custom hal fdi config file:

    sudo gedit /usr/share/hal/fdi/policy/30user/10-lirc_mouse.fdi
    with the following content:
    <?xml version="1.0" encoding="UTF-8"?>

    <deviceinfo version="0.2">
    <device>
    <match key="info.udi" string="/org/freedesktop/Hal/devices/lirc_mouse">
    <merge key="info.category" type="string">input</merge>
    <merge key="info.capabilities" type="strlist">input</merge>
    <append key="info.capabilities" type="strlist">input.mouse</append>
    <merge key="input.device" type="string">/dev/lircm</merge>
    <merge key="linux.device_file" type="string">/dev/lircm</merge>
    <merge key="linux.x11_options.Device" type="string">/dev/lircm</merge>
    <merge key="input.x11_driver" type="string">mouse</merge>
    <merge key="input.x11_options.Protocol" type="string">IntelliMouse</merge>
    <merge key="input.x11_options.Buttons" type="string">5</merge>
    <merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>
    <merge key="input.x11_options.SendCoreEvents" type="string">true</merge>
    </match>
    </device>
    </deviceinfo>
    After that i restarted hal
    /etc/init.d/hal restart
    and the mousie works.

  9. #9
    Join Date
    Mar 2007
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Lircm and X

    Cheers for the update on how you got it working in the end; this should be a useful post for those with the same problem.

  10. #10
    Join Date
    Jun 2006
    Beans
    11

    Re: Lircm and X

    Quote Originally Posted by omarino View Post
    Disabling auto-add devices messes up my other configuration + it messes up my lirc mouse every time i reconfigure X.
    Thats why i decidede to do things tje HAL way - instead of editing xorg.conf, i created a custom hal fdi config file:



    with the following content:


    After that i restarted hal

    and the mousie works.
    Omario. Can you help me. I did what you wrote. There was no 30user directory, so I created that. Furthermore I did exactly the same. The lircmd.conf has the IntelliMouse configured. The device (a remote wonder) has only 2 buttons, but it doesn't make a difference if I configure it with 2. If I cat /dev/lircm I get output, but there is no cursor movement in Kubuntu.

    Is there a possibility to debug the hal to see what goes wrong or do you have any suggestions?

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •