LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   LIRC, MCE remote and new versions of Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/lirc-mce-remote-and-new-versions-of-ubuntu-4175474515/)

sagaciouskjb 08-24-2013 05:54 AM

LIRC, MCE remote and new versions of Ubuntu
 
Okay, this took me a very long time to figure out, so I guess I should share it here. Especially since I made a topic regarding it...

I had got LIRC operating successfully. irw reported button pushes and what not, but the problem was that none of the programs I configured follow the buttons that I had setup. I then noticed that for some reason my "Up" and "Down" keys worked in the terminal to move the cursor, and my volume keys turned the volume up and down on the system globally.

I realized that this new version of Ubuntu must have something that's intercepting the remote input and is configured on its own. This was extremely frustrating and for the longest time I could not figure out what was going on, or how to change this configuration to suite my needs. After Googling some different strings (Surprsing how I hadn't thought to search "Why doesn't lirc work in Ubuntu 12.04" and found this before) I finally found the information I needed.

Anyway, so it was really a two-fold problem. First of all, the program "Unity" is what's apparently responsible for stealing the remote input. I followed a guide to setup a section in xorg.conf to ignore the MCE remote that I was using, ensuring that LIRC got the button inputs and not Unity.

Secondly, the button names have changed! They are now prefixed with "KEY_" and captilized, so "Pause" is now "KEY_PAUSE". So one must reconfigure their old .lirc files to ensure they match the button names.

Then, for the X part, I followed this helpful fella's post
http://ubuntuforums.org/showthread.p...3#post11395713

One must select the proper device and then copy the name into the new xorg section as shown. In my particular case, there was actually several devices referring to the MCE remote and IR transceiever. Not sure if it was necessary, but I just set X to ignore all of these.

Using the command supplied, I got a list of my devices

Code:

find /dev/input/event* -exec udevadm info --attribute-walk --name={} \; | grep -e product -e name | sort -u
    ATTRS{name}=="HDA ATI SB Front Headphone"
    ATTRS{name}=="HDA ATI SB Front Mic"
    ATTRS{name}=="HDA ATI SB Line"
    ATTRS{name}=="HDA ATI SB Line-Out CLFE"
    ATTRS{name}=="HDA ATI SB Line-Out Front"
    ATTRS{name}=="HDA ATI SB Line-Out Side"
    ATTRS{name}=="HDA ATI SB Line-Out Surround"
    ATTRS{name}=="HDA ATI SB Rear Mic"
    ATTRS{name}=="HID Wireless Mouse HID Wireless Mouse"
    ATTRS{name}=="Logitech USB Keyboard"
    ATTRS{name}=="MCE IR Keyboard/Mouse (mceusb)"
    ATTRS{name}=="Media Center Ed. eHome Infrared Remote Transceiver (1784:0001)"
    ATTRS{name}=="Power Button"
    ATTRS{product}=="EHCI Host Controller"
    ATTRS{product}=="eHome Infrared Transceiver"
    ATTRS{product}=="HID Wireless Mouse"
    ATTRS{product}=="OHCI Host Controller"
    ATTRS{product}=="USB2.0 Hub"
    ATTRS{product}=="USB2.0 Hub Controller"
    ATTRS{product}=="USB Keyboard"

I added multiple sections to Xorg to ensure that the right thing is ignored... I could narrow it down by process of elimination, but I'd rather Xorg just ignore them all actually. Note that I also removed the "MatchDevicePath" line, since if one uncomments it they'll have some unexpected input troubles--I learned that the hard way.

Code:

Section "InputClass"
    Identifier    "do not configure infrared device"
    MatchProduct  "MCE IR Keyboard/Mouse (mceusb)"
    Option        "Ignore" "on"
EndSection

Section "InputClass"
    Identifier    "do not configure infrared device2"
    MatchProduct  "Media Center Ed. eHome Infrared Remote Transceiver (1784:0001)"
    Option        "Ignore" "on"
EndSection

Section "InputClass"
    Identifier    "do not configure infrared device3"
    MatchProduct  "eHome Infrared Transceiver"
    Option        "Ignore" "on"
EndSection

*NOTE* Be extra careful, I accidentally commented the "MatchProduct" line, resulting in xorg ignoring all device input. Had to edit through recovery mode. Just whatever you do make sure that one of these rules does not accidentally include all input.

I wanted to share this here because when I originally asked, no one was able to help or hadn't encountered the problem, so I wanted to be sure that if someone else has this problem they can fix it.

Also, in the other threads I made mention of the problem that the remote input wouldn't control windows that did not have focus. This was an issue with whatever application was intercepting the remote input. Once I got it all workign through LIRC as proper, the remote inputs worked whether a window had focus or not. This was a big deal to me, since my main desire to use the remote is so I can skip playlist entries without having to bring my media player into focus--at that point one might as well just use the keyboard/mouse to control.

As a side note, I would have hoped that there was more clarity of this issue online. I find it rather annoying that Ubutu would include an application that will intercept the signals even after a user deliberately sets up LIRC. I feel like this should be mentioned in some of the more common guides, or the Ubuntu team should do more to ensure that if a user installs and configures LIRC that any other applications are already set to ignore the input. Frankly, I feel that more users will be familiar with LIRC and find more information on how to configure that than whatever new-fangled, inferior input application was set up by default.

Thanks and hope I helped someone.


All times are GMT -5. The time now is 10:55 AM.