Skip to main content
Topic: IRToy Locks Up After a Few Sends on RPi With New Kernel (Read 5769 times) previous topic - next topic

IRToy Locks Up After a Few Sends on RPi With New Kernel

I have two IRtoys running with firmware 2.2. I am using one on a Model B RPi running kernel 3.10.25+ #622, to control my stero receiver. The IRToy works for many sends without hanging. It has been reliable for months. I updated the system to the latest kernel, 3.12.28+ #713 with rpi-update and now I am having the same problem as many others. After only a few sends the IRToy locks up, requiring a disconnect and a restart of lircd. Both IRToy units act the same. I had preserved an image of the kernel #622 SD card to revert if necessary which turned out to be "a good thing". If I boot off the #622 SD card, the IRToy works without hanging. If I boot off the #713 SD Card, the IRToy hangs after only a few sends.

I have tried the following things on the #713 kernel card based upon other articles in this forum. None fixed the problem.

Overclock to 1000 Mhz (the RPi with #622 kernel has been stable there for ages)
Set the niceness of lircd to -20, the highest priority. (lircd is running at nice 0 on #622 with no problem)

I compared the parameters in the /boot/cmdline.txt and /boot/config.txt and there are no differences.

I do not want to set the USB mode to 1.1.

This is a very simple system with only the IRToy and a PIR motion sensor. Nothing else running. The process table between the two versions is almost identical.

IRToy works well on kernel #622.
IRToy fails on kernel #713.

Does anyone have any ideas about how to tweek either the #713 kernel or the IRtoy so that it will be reliable?

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #1
This happened on the raspberry pi firmware sometime between January 2014 - when it worked - and June 2014 when it stopped working.  i think it has to do with the new firmware for the Pi that supports the new Model B+ motherboard.

anyway, you can workaround the problem by dumbing down your USB bus speeds to force USB 1.1 speeds.  in your /boot/cmdline.txt file, add the following to the line:

    dwc_otg.speed=1

the only bad side effect this has that i've noticed is that the network interface is on the same bus as the USB, so it will tend to slow down your network throughput as well.

i'm still trying to work out a less severe "solution" that might permit all of the following:

    IR Toy at 1.1 speeds
    NIC at full speed
    any other USB device at 2.0 speeds

not sure it's possible.

to be honest, i haven't tried any "newer" Pi firmware versions in a while ... maybe it's time for another attempt/update.

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #2
oh - and by the way ... the latest GIT versions of LIRCD should support the USB IR Toy natively without having to run through the laborious "patching" build process.

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #3
Thanks, I'll try it.

It would be great if you can come up with a better solution than slowing down the USB and network.

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #4
ISavant01 can you point me to a git where patching is not required even though it needs to run at usb1.1?

dennyfmn is there any chance of a copy of your older image that works ok? I have 40 or 50 SD cards and maybe 100 image files but struggling to locate one with an older copy of Raspbian and USBIRToy.

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #5
Hello Pieman,

Let me see about scrubbing my local stuff out of an image. How would I get it to you?

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #6
[quote author="dennyfmn"]Hello Pieman,

Let me see about scrubbing my local stuff out of an image. How would I get it to you?[/quote]

Dropbox, Google Drive etc.

The one I use to distribute Pi images is mega.co.nz (no cost).

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #7
Pieman,

I just sent you a private message about an image I can send you. Did you get the message? It's still showing in my Outbox.

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #8
[quote author="dennyfmn"]Pieman,

I just sent you a private message about an image I can send you. Did you get the message? It's still showing in my Outbox.[/quote]

Yes I received your PM thanks.
You could zip the 8GB with 7zip to reduce the size but there are no mail systems that can handle this size. It would need to be uploaded to a server for me to download.

Can you perhaps check the size of your raw image with df -a just to be sure my 8GB SD cards are as big as yours. I guess I could use the resize image utility if need be.

Thanks for your assistance.

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #9
I've already used resize2fs to reduce the image to the smallest 8GB card size I have here, 7822MB, 7822376960
 bytes, so I'm hoping it will be usable for you.

I'll work on creating the image and zipping it. I may have a server that you can fetch it from when it's ready.

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #10
I have some images that are 7,948,206,080 bytes (7.4GB) so my '8GB' SD cards look big enough for your image.

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #11
I created the compressed image on a linux system with

 dd bs=4K count=1909760 if=/dev/sdc | gzip > /data/images/kernel622-img.gz
1909760+0 records in
1909760+0 records out
7822376960 bytes (7.8 GB) copied, 459.354 s, 17.0 MB/s

The output file is 843MB.

I'll send you a private message to let you know where to fetch it from. Please let me know when you have fetched it, so I can remove it from my server.

The image needs to run on a Pi model B, it's too old to run on a B+, and doesn't boot on an A.

Thanks for your interest in troubleshooting this!

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #12
Got the image thanks and it has loaded up on my model B Pi.

May I ask do you run your USBIRToy through a USB hub or direct from the Pi?

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #13
Great!

I run the IRToy direct to the Pi with a very short cable.

Re: IRToy Locks Up After a Few Sends on RPi With New Kernel

Reply #14
[quote author="dennyfmn"]Great!

I run the IRToy direct to the Pi with a very short cable.[/quote]

Ok I will run without the hub.

I might be missing something but the lirc service is not available in your image.
I can see your directories for the patch etc but I was assuming it was all up and running.

I have previously used the following guides (without success) for USBIRToy on the Pi:
http://www.my404.de/?dir=004_Tutorials& ... ed+Toy.htm and http://blog.scotttomaszewski.com/2013/0 ... -lighting/

What stage of the lirc install do you think your image covers? I don't want to start patching etc if it has already been done.