[Linux] LIRC mceusb system lock
#1
I'm using a minimal install of xbmc on Ubuntu Jaunty, the system is fully updated.
I recently bought a new remote, the Anyware GP-IR02BK MCE remote.
It's a typical MCE remote, and even in the reviews for it people were saying it worked great with XBMC. But for some reason it will not work for me at all.

When installing lirc, I chose the lirc_mceusb2 module. I tested with irw, and it gets the keypresses, and everything works grand.

I've tried using the remote with the latest svn, and it works, for about 2 seconds, and then it hard locks the PC. No xbmc logs, no sysmessages, no nothing. I believe whats happening is when xbmc tries to take over the lirc modules, it errors and hard locks the pc. I made a while new build yesterday, and it still locked.
If lirc is not installed, xbmc works just fine.


So I went back to the 9.04.1-jaunty1 package, the problem is, this doesn't recognize the keystrokes at all.

I've checked the Lircmap.xml and verified that there is a mceusb entry, and that the keypresses I got in irw match. I also checked the lirc profile, and it is using the name "mceusb" just like in Lircmap.xml.

So all of the entries are there, and this remote should work fine, but it doesn't. Does anyone have clues for what I should look at next?

lsusb:
Code:
Bus 002 Device 013: ID 1784:0008 TopSeed Technology Corp.

dmesg|grep lirc:
Code:
[ 3628.010481] lirc_mceusb2[12]: usb remote disconnected
[ 3629.393531] lirc_dev: lirc_register_plugin: sample_rate: 0
[ 3629.402110] lirc_mceusb2[13]: Topseed Technology Corp. eHome Infrared Transceiver on usb2:13

I did notice that this gets repeated in xbmc.log in the 9.04.1 version of xbmc
Code:
12:17:25 T:86612032 M:871079936   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_1784_8_TS000ATS_if0) Removed
12:17:25 T:86612032 M:871079936   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_1784_8_TS000ATS) Removed
12:17:26 T:86612032 M:870727680   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_1784_8_TS000ATS) Added
12:17:26 T:86612032 M:870727680   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_1784_8_TS000ATS) Property info.linux.driver modified
12:17:26 T:86612032 M:870727680   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_1784_8_TS000ATS_if0) Added

I also noticed that if I switch terminals while xbmc is running, I get tons of messages about "unable to enumerate usb device on port 1"
and when the xbmc window closes, it has lots of messages about starting and stopping lirc over and over again.
Reply
#2
So I've been doing more testing, and I still can't figure out why xbmc and lirc aren't working together.

I can run lirc manually like this:
Code:
$ sudo lircd -n --device=/dev/lirc0 /etc/lirc/lircd.conf
lircd-0.8.4a[4770]: lircd(default) ready

Then I can run irw in another session, which works:
Code:
$ irw
000000037ff07bde 00 Right mceusb
000000037ff07bde 01 Right mceusb
000000037ff07be0 00 Down mceusb
000000037ff07be0 01 Down mceusb

In the lirc session it shows the connection, and then the removal after irw is closed:
Code:
lircd-0.8.4a[4770]: accepted new client on /dev/lircd
lircd-0.8.4a[4770]: removed client

So then I try launching xbmc, and lircd gets killed, because I assume that xbmc takes over lirc? I'm not sure how it exactly works.

In the lirc window:
Code:
lircd-0.8.4a[4770]: caught signal
Terminated

xbmc starts, and the remote works for about 2 seconds using a svn build, I was using rev 23164, but I've tried others too. After 2 seconds of working, xbmc locks the entire computer, nothing responds at all, and I have to reboot. If I use the latest stable build, it doesn't lock, but it doesn't work at all either.

I've enabled debugging in xbmc, and watched the log using a tail in another terminal, but nothing shows up in the log at all, it just freezes.

Here's the log of me plugging in the ir receiver and pressing a few buttons (before it crashes)
Code:
17:15:39 T:3041736592 M:950804480    INFO: LIRC Initialize: sucessfully started on: /dev/lircd
17:15:40 T:3041736592 M:950804480   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_1784_8_TS000ATS) Added
17:15:40 T:3041736592 M:950804480   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_1784_8_TS000ATS) Property info.linux.driver modified
17:15:40 T:3041736592 M:950804480   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_1784_8_TS000ATS_if0) Added

As I said before, I believe that lirc is restarting somehow, but I can't figure out why lirc would be restarting over and over again.

Sometimes xbmc will stay on, without crashing, as long as I don't press anything on the remote, and sometimes it will just crash at random without pressing anything.

in /var/message:
Code:
Sep 27 16:36:47 shuttle kernel: [   22.169831] usb 2-1: new full speed USB device using ohci_hcd and address 5
Sep 27 16:36:48 shuttle kernel: [   23.356028] usb 2-1: new full speed USB device using ohci_hcd and address 6
Sep 27 16:36:49 shuttle kernel: [   23.572242] usb 2-1: config 1 interface 0 altsetting 0 endpoint 0x1 has an invalid bInterval 0, changing to 32
Sep 27 16:36:49 shuttle kernel: [   23.572251] usb 2-1: config 1 interface 0 altsetting 0 endpoint 0x82 has an invalid bInterval 0, changing to 32
Sep 27 16:36:49 shuttle kernel: [   23.590172] usb 2-1: configuration #1 chosen from 1 choice
Sep 27 16:36:49 shuttle kernel: [   23.768030] usb 2-1: reset full speed USB device using ohci_hcd and address 6
Sep 27 16:36:49 shuttle kernel: [   23.985229] lirc_dev: lirc_register_plugin: sample_rate: 0
Sep 27 16:36:49 shuttle kernel: [   23.993788] lirc_mceusb2[6]: Topseed Technology Corp. eHome Infrared Transceiver on usb2:6
Sep 27 16:36:51 shuttle kernel: [   25.444051] usb 2-1: USB disconnect, address 6
Sep 27 16:36:51 shuttle kernel: [   25.448710] ACPI: Unable to turn cooling device [f6c13d20] 'on'
Sep 27 16:36:51 shuttle kernel: [   25.450608] lirc_mceusb2[6]: usb remote disconnected
Sep 27 16:36:51 shuttle kernel: [   26.300035] usb 2-1: new full speed USB device using ohci_hcd and address 7
Sep 27 16:36:52 shuttle kernel: [   27.124035] usb 2-1: new full speed USB device using ohci_hcd and address 8
Sep 27 16:36:52 shuttle kernel: [   27.340245] usb 2-1: config 1 interface 0 altsetting 0 endpoint 0x1 has an invalid bInterval 0, changing to 32
Sep 27 16:36:52 shuttle kernel: [   27.340254] usb 2-1: config 1 interface 0 altsetting 0 endpoint 0x82 has an invalid bInterval 0, changing to 32
Sep 27 16:36:52 shuttle kernel: [   27.368068] usb 2-1: configuration #1 chosen from 1 choice
Sep 27 16:36:53 shuttle kernel: [   27.515755] lirc_dev: lirc_register_plugin: sample_rate: 0
Sep 27 16:36:53 shuttle kernel: [   27.521351] lirc_mceusb2[8]:  on usb2:8
Sep 27 16:36:53 shuttle kernel: [   27.521564] usb 2-1: USB disconnect, address 8
Sep 27 16:36:53 shuttle kernel: [   27.521708] lirc_mceusb2[8]: usb remote disconnected
Sep 27 16:36:54 shuttle kernel: [   28.680033] usb 2-1: new full speed USB device using ohci_hcd and address 9
Sep 27 16:36:54 shuttle kernel: [   28.908258] usb 2-1: config 1 interface 0 altsetting 0 endpoint 0x1 has an invalid bInterval 0, changing to 32
Sep 27 16:36:54 shuttle kernel: [   28.908267] usb 2-1: config 1 interface 0 altsetting 0 endpoint 0x82 has an invalid bInterval 0, changing to 32
Sep 27 16:36:54 shuttle kernel: [   28.940999] usb 2-1: configuration #1 chosen from 1 choice
Sep 27 16:36:54 shuttle kernel: [   29.048051] lirc_dev: lirc_register_plugin: sample_rate: 0
Sep 27 16:36:54 shuttle kernel: [   29.052351] lirc_mceusb2[9]:  on usb2:9
Sep 27 16:36:54 shuttle kernel: [   29.052559] usb 2-1: USB disconnect, address 9
Sep 27 16:36:54 shuttle kernel: [   29.052704] lirc_mceusb2[9]: usb remote disconnected
Sep 27 16:36:56 shuttle kernel: [   30.696042] usb 2-1: new full speed USB device using ohci_hcd and address 10
Sep 27 16:36:56 shuttle kernel: [   30.908257] usb 2-1: config 1 interface 0 altsetting 0 endpoint 0x1 has an invalid bInterval 0, changing to 32
Sep 27 16:36:56 shuttle kernel: [   30.908266] usb 2-1: config 1 interface 0 altsetting 0 endpoint 0x82 has an invalid bInterval 0, changing to 32
Sep 27 16:36:56 shuttle kernel: [   30.927500] usb 2-1: configuration #1 chosen from 1 choice
Sep 27 16:36:56 shuttle kernel: [   31.108042] usb 2-1: reset full speed USB device using ohci_hcd and address 10
Sep 27 16:36:56 shuttle kernel: [   31.325160] lirc_dev: lirc_register_plugin: sample_rate: 0
Sep 27 16:36:56 shuttle kernel: [   31.334384] lirc_mceusb2[10]: Topseed Technology Corp. eHome Infrared Transceiver on usb2:10
Reply
#3
I'm still working on this, I've been running xbmc.bin with strace to try to figure out why it crashes with lirc.

I also found that, strangely, pressing left/right on my remote does not seem to crash it, but as soon as I press up or down, and sometimes select, it will lock the system.

I tried doing the gdb debugging method mentioned in the tips and tricks thread, but that's not very helpful since it does a full system lock, and I can't do a backtrace, so I'm doing strace with a log instead.

I would appreciate it if a developer could take a look at one of these logs, since nothing jumped out at me and I don't really know what I'm looking for. It shows lircd connection successful, and my lirc button presses as well.

This one is of me pressing left and right a bunch of times, then pressing select on the shutdown icon, pressing select again on the the exit xbmc choice, and the computer locking while it was trying to shut down:
http://www.mediafire.com/?u197t2woxjj

This one should be me pressing left and right a bunch of times, and then pressing down, then a full system lock.
http://www.mediafire.com/?zexgjymmomz

IRW works (without crashing!), I've checked the permissions of /dev/lirc0 and they are correct. This is probably my 5th install of jaunty while trying to fix this. Using svn23164 - from the PPA, on a full desktop install of amd64 Jaunty, fully updated as of yesterday.
Reply
#4
After much testing, I finally figured out that my htpc had bad USB ports....or at least the remote doesn't work with them.

I put in a PCI usb card, plugged the remote in, and everything worked perfectly.

So if other people have similar problems, try the remote with a xbmc live cd in another computer, and see if you have the same problem.
Reply
#5
You didn't say which motherboard you were using, but it could also be a driver problem. In all likely hood, the PCI USB card is a totally different chipset and thus a totally different driver.

Looking at the log could also be power related.
Reply
#6
I have similar problems, but I don't get a freeze, just a frozen mmc controller, or keyboard. Sometimes happens after about 2 seconds, sometimes I can go for days without it freezing. I have an

Asus M3n78-vm motherboard.

I know there are other people with similar sounding problems, lets see if we can find some kind of hardware commonality. I don't really want to install an external USB, but it is worth a try. I know my hardware also exhibited similar symptoms on a minimyth kernel...

What motherboard do you have?
Reply
#7
it's an older shuttle XPC barebone, motherboard has a nforce3 chipset, and the pci card I bought has a VIA chip.

http://www99.shopping.com/xPF-Shuttle-SH...huttle-Inc
Reply

Logout Mark Read Team Forum Stats Members Help
[Linux] LIRC mceusb system lock0