New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Can't open device file /tmp/mailbox-XXXX: No such device or address" - Kernel 4.1.6 #41

Closed
Gadgetoid opened this Issue Aug 24, 2015 · 22 comments

Comments

Projects
None yet
9 participants
@Gadgetoid
Collaborator

Gadgetoid commented Aug 24, 2015

It looks like Kernel 4.1.6 has introduced some changes which have broken the use of Mailbox functionality in this library. I've updated to the latest Raspbian, Linux 4.1.6-v7+ #810 and am no longer able to get it working.

The error seems to be with opening the device after creation, despite creation seemingly happening fine and not throwing any errors:

Can't open device file /tmp/mailbox-XXXX: No such device or address

I've seen at least one other report of this problem in respect to our Unicorn HAT library, and another seemingly related problem on this thread here: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=117547

I've tried stabbing in the dark to see if I can get it working again- but I'm a little out of my depth!

@Gadgetoid

This comment has been minimized.

Show comment
Hide comment
@Gadgetoid

Gadgetoid Aug 24, 2015

Collaborator

Turns out the fix for this is to prefer /dev/vcio and fall back to creating a mailbox device when it doesn't exist. I've tested this on Pi 2, Kernel 4.1.6 and it appears to work. Relevant code here: pimoroni/unicorn-hat@5c03f81

Collaborator

Gadgetoid commented Aug 24, 2015

Turns out the fix for this is to prefer /dev/vcio and fall back to creating a mailbox device when it doesn't exist. I've tested this on Pi 2, Kernel 4.1.6 and it appears to work. Relevant code here: pimoroni/unicorn-hat@5c03f81

@tejonbiker

This comment has been minimized.

Show comment
Hide comment
@tejonbiker

tejonbiker Aug 25, 2015

Thanks you very much, it's now working :D

tejonbiker commented Aug 25, 2015

Thanks you very much, it's now working :D

@limpygnome

This comment has been minimized.

Show comment
Hide comment
@limpygnome

limpygnome Aug 25, 2015

Thank you so much, working here on the Pi 2 on 4.1.6 too!

Is /dev/vcio used on the Pi for memory mapping access to the GPIO?

limpygnome commented Aug 25, 2015

Thank you so much, working here on the Pi 2 on 4.1.6 too!

Is /dev/vcio used on the Pi for memory mapping access to the GPIO?

@usefulthink

This comment has been minimized.

Show comment
Hide comment
@usefulthink

usefulthink Aug 26, 2015

@limpygnome iirc, the memory-mapped I/O related to DMA and PWM-Setup (you could call that GPIO-handling) is done using raw physical memory (/dev/mem).

/dev/vcio (or the previous version using /tmp/mailbox-xxxx devices) is a feature provided by the video-core, where the driver borrows memory to store the PWM-data to be transferred to the PWM-module using DMA.

(this is how I understood and researched it so far, please correct me if I got something wrong here)

usefulthink commented Aug 26, 2015

@limpygnome iirc, the memory-mapped I/O related to DMA and PWM-Setup (you could call that GPIO-handling) is done using raw physical memory (/dev/mem).

/dev/vcio (or the previous version using /tmp/mailbox-xxxx devices) is a feature provided by the video-core, where the driver borrows memory to store the PWM-data to be transferred to the PWM-module using DMA.

(this is how I understood and researched it so far, please correct me if I got something wrong here)

@jgarff

This comment has been minimized.

Show comment
Hide comment
@jgarff

jgarff Oct 5, 2015

Owner

I just created a rpi2 branch which supports newer kernels and the Raspberry Pi 2. This is a testing branch, so please give it a shot and let me know if you run into problems. Thanks.

Owner

jgarff commented Oct 5, 2015

I just created a rpi2 branch which supports newer kernels and the Raspberry Pi 2. This is a testing branch, so please give it a shot and let me know if you run into problems. Thanks.

@jgarff jgarff closed this Oct 5, 2015

@tsuckow

This comment has been minimized.

Show comment
Hide comment
@tsuckow

tsuckow Nov 7, 2015

On an rpi it never seems to get past init.

Seems to get stuck waiting for CM_PWM_CTL_BUSY

tsuckow commented Nov 7, 2015

On an rpi it never seems to get past init.

Seems to get stuck waiting for CM_PWM_CTL_BUSY

@jgarff

This comment has been minimized.

Show comment
Hide comment
@jgarff

jgarff Nov 7, 2015

Owner

Did you sync the rpi2 branch, and is this happinging on a pi2?

Owner

jgarff commented Nov 7, 2015

Did you sync the rpi2 branch, and is this happinging on a pi2?

@tsuckow

This comment has been minimized.

Show comment
Hide comment
@tsuckow

tsuckow Nov 8, 2015

RPI 1B running Arch linux arm pi (alarmpi)

The main branch doesn't work anymore because of the mailbox issue. The rpi2 branch gets past that but hangs on the CM_PWM_CTL_BUSY tight loop.

Edit: At some point, I will try to do a clean Arch install. For now I am running raspbian so I can demo at the Barnes & Noble Mini Maker Faire.

Edit2: rpi2 branch works on Raspbian

tsuckow commented Nov 8, 2015

RPI 1B running Arch linux arm pi (alarmpi)

The main branch doesn't work anymore because of the mailbox issue. The rpi2 branch gets past that but hangs on the CM_PWM_CTL_BUSY tight loop.

Edit: At some point, I will try to do a clean Arch install. For now I am running raspbian so I can demo at the Barnes & Noble Mini Maker Faire.

Edit2: rpi2 branch works on Raspbian

@jgarff

This comment has been minimized.

Show comment
Hide comment
@jgarff

jgarff Nov 8, 2015

Owner

Please make sure your audio device isn't being used. The raspberry pi uses the PWM controller for the analog audio, so it's not possible to use both at the same time. Not sure if Arch is enabling audio by default.

Owner

jgarff commented Nov 8, 2015

Please make sure your audio device isn't being used. The raspberry pi uses the PWM controller for the analog audio, so it's not possible to use both at the same time. Not sure if Arch is enabling audio by default.

@wefalk

This comment has been minimized.

Show comment
Hide comment
@wefalk

wefalk Nov 24, 2015

Still get error: "Can't open device file /tmp/mailbox-10709: No such device or address" on rpi2 branch

System: Linux raspberrypi 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l GNU/Linux

wefalk commented Nov 24, 2015

Still get error: "Can't open device file /tmp/mailbox-10709: No such device or address" on rpi2 branch

System: Linux raspberrypi 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l GNU/Linux

@hjoertel

This comment has been minimized.

Show comment
Hide comment
@hjoertel

hjoertel Jan 10, 2016

I stumbled here as well when trying to control ws2812 LED stripes using the PiZero. PiZero came with kernel 4.1.13.
I did only change mailbox.h definitions for the vcio driver major number and the ioctl code.

hjoertel commented Jan 10, 2016

I stumbled here as well when trying to control ws2812 LED stripes using the PiZero. PiZero came with kernel 4.1.13.
I did only change mailbox.h definitions for the vcio driver major number and the ioctl code.

@keerthanamanivannan

This comment has been minimized.

Show comment
Hide comment
@keerthanamanivannan

keerthanamanivannan Jul 20, 2016

Hey hjoertel, same here. I'm trying to run this library on RPi Zero with neopixel ws2812 ring. I'm getting this error:
Can't open device file /tmp/mailbox-12666: No such device or address
Can't open device file /tmp/mailbox-12666: No such device or address
Can't open device file /tmp/mailbox-12666: No such device or address

What did you change the vcio driver major number to? And what's this change in ioctl code?

keerthanamanivannan commented Jul 20, 2016

Hey hjoertel, same here. I'm trying to run this library on RPi Zero with neopixel ws2812 ring. I'm getting this error:
Can't open device file /tmp/mailbox-12666: No such device or address
Can't open device file /tmp/mailbox-12666: No such device or address
Can't open device file /tmp/mailbox-12666: No such device or address

What did you change the vcio driver major number to? And what's this change in ioctl code?

@wefalk

This comment has been minimized.

Show comment
Hide comment
@wefalk

wefalk Jul 20, 2016

Hi hjortel:

What I did was to enable the use of the device tree from within raspi-config. That fixed it! No other changes.

Hope it works for you, please let me know either way…

wefalk

From: Keerthana Subramanian Manivannan [mailto:notifications@github.com]
Sent: Wednesday, July 20, 2016 2:08 PM
To: jgarff/rpi_ws281x
Cc: William Falk; Comment
Subject: Re: [jgarff/rpi_ws281x] "Can't open device file /tmp/mailbox-XXXX: No such device or address" - Kernel 4.1.6 (#41)

Hey hjoertel, same here. I'm trying to run this library on RPi Zero with neopixel ws2812 ring. I'm getting this error:
Can't open device file /tmp/mailbox-12666: No such device or address
Can't open device file /tmp/mailbox-12666: No such device or address
Can't open device file /tmp/mailbox-12666: No such device or address

What did you change the vcio driver major number to? And what's this change in ioctl code?


You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/jgarff/rpi_ws281x/issues/41#issuecomment-234049961, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOqA2NA38uxTwIDxNlNsGPQIDo91-4ziks5qXnIAgaJpZM4FxDTO.

wefalk commented Jul 20, 2016

Hi hjortel:

What I did was to enable the use of the device tree from within raspi-config. That fixed it! No other changes.

Hope it works for you, please let me know either way…

wefalk

From: Keerthana Subramanian Manivannan [mailto:notifications@github.com]
Sent: Wednesday, July 20, 2016 2:08 PM
To: jgarff/rpi_ws281x
Cc: William Falk; Comment
Subject: Re: [jgarff/rpi_ws281x] "Can't open device file /tmp/mailbox-XXXX: No such device or address" - Kernel 4.1.6 (#41)

Hey hjoertel, same here. I'm trying to run this library on RPi Zero with neopixel ws2812 ring. I'm getting this error:
Can't open device file /tmp/mailbox-12666: No such device or address
Can't open device file /tmp/mailbox-12666: No such device or address
Can't open device file /tmp/mailbox-12666: No such device or address

What did you change the vcio driver major number to? And what's this change in ioctl code?


You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/jgarff/rpi_ws281x/issues/41#issuecomment-234049961, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOqA2NA38uxTwIDxNlNsGPQIDo91-4ziks5qXnIAgaJpZM4FxDTO.

@keerthanamanivannan

This comment has been minimized.

Show comment
Hide comment
@keerthanamanivannan

keerthanamanivannan Jul 20, 2016

Hi wefalk,
How'd you enable device trees from raspi-config? I go to Advanced options and there's no device tree option..
I just enabled the spi and i2c ones. rebooted and I'm still getting the /tmp/mailbox errors.

keerthanamanivannan commented Jul 20, 2016

Hi wefalk,
How'd you enable device trees from raspi-config? I go to Advanced options and there's no device tree option..
I just enabled the spi and i2c ones. rebooted and I'm still getting the /tmp/mailbox errors.

@keerthanamanivannan

This comment has been minimized.

Show comment
Hide comment
@keerthanamanivannan

keerthanamanivannan Jul 20, 2016

And did you also get the /tmp/mailbox error? How did you fix it?

keerthanamanivannan commented Jul 20, 2016

And did you also get the /tmp/mailbox error? How did you fix it?

@wefalk

This comment has been minimized.

Show comment
Hide comment
@wefalk

wefalk Jul 20, 2016

I was getting the error until turning on the device tree, then the error disappeared…

And did you also get the /tmp/mailbox error? How did you fix it?


You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/jgarff/rpi_ws281x/issues/41#issuecomment-234058001, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOqA2LRx5MmkOWH9wsJ0B5JNA2O-jQXrks5qXnjIgaJpZM4FxDTO.

wefalk commented Jul 20, 2016

I was getting the error until turning on the device tree, then the error disappeared…

And did you also get the /tmp/mailbox error? How did you fix it?


You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/jgarff/rpi_ws281x/issues/41#issuecomment-234058001, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOqA2LRx5MmkOWH9wsJ0B5JNA2O-jQXrks5qXnjIgaJpZM4FxDTO.

@keerthanamanivannan

This comment has been minimized.

Show comment
Hide comment
@keerthanamanivannan

keerthanamanivannan Jul 20, 2016

Wait, how'd you turn on the device tree?

keerthanamanivannan commented Jul 20, 2016

Wait, how'd you turn on the device tree?

@wefalk

This comment has been minimized.

Show comment
Hide comment
@wefalk

wefalk Jul 20, 2016

Perhaps it does not exist on the Pi Zero, it did work on the Pi 2. I have no experience with the Zero at this point.

Best of luck

wefalk

From: Keerthana Subramanian Manivannan [mailto:notifications@github.com]
Sent: Wednesday, July 20, 2016 2:36 PM
To: jgarff/rpi_ws281x
Cc: William Falk; Comment
Subject: Re: [jgarff/rpi_ws281x] "Can't open device file /tmp/mailbox-XXXX: No such device or address" - Kernel 4.1.6 (#41)

Hi wefalk,
How'd you enable device trees from raspi-config? I go to Advanced options and there's no device tree option..


You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/jgarff/rpi_ws281x/issues/41#issuecomment-234057780, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOqA2BChpECTeKJdO8ws1xvkYhTCjkY5ks5qXnibgaJpZM4FxDTO.

wefalk commented Jul 20, 2016

Perhaps it does not exist on the Pi Zero, it did work on the Pi 2. I have no experience with the Zero at this point.

Best of luck

wefalk

From: Keerthana Subramanian Manivannan [mailto:notifications@github.com]
Sent: Wednesday, July 20, 2016 2:36 PM
To: jgarff/rpi_ws281x
Cc: William Falk; Comment
Subject: Re: [jgarff/rpi_ws281x] "Can't open device file /tmp/mailbox-XXXX: No such device or address" - Kernel 4.1.6 (#41)

Hi wefalk,
How'd you enable device trees from raspi-config? I go to Advanced options and there's no device tree option..


You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/jgarff/rpi_ws281x/issues/41#issuecomment-234057780, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOqA2BChpECTeKJdO8ws1xvkYhTCjkY5ks5qXnibgaJpZM4FxDTO.

@keerthanamanivannan

This comment has been minimized.

Show comment
Hide comment
@keerthanamanivannan

keerthanamanivannan Jul 20, 2016

oh ok thanks. I'm just poking around here and there trying to fix the mailbox error. Hoping @hjoertel or @jgarff will give me answers to fix it!

keerthanamanivannan commented Jul 20, 2016

oh ok thanks. I'm just poking around here and there trying to fix the mailbox error. Hoping @hjoertel or @jgarff will give me answers to fix it!

@wefalk

This comment has been minimized.

Show comment
Hide comment
@wefalk

wefalk Jul 20, 2016

Good luck!

Get Outlook for iOShttps://aka.ms/o0ukef

On Wed, Jul 20, 2016 at 2:52 PM -0500, "Keerthana Subramanian Manivannan" <notifications@github.commailto:notifications@github.com> wrote:

oh ok thanks. I'm just poking around here and there trying to fix the mailbox error. Hoping @hjoertelhttps://github.com/hjoertel or @jgarffhttps://github.com/jgarff will give me answers to fix it!

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/jgarff/rpi_ws281x/issues/41#issuecomment-234061933, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOqA2BaiVcRrMN1zhtSryO4qxdpDH0Wyks5qXnxqgaJpZM4FxDTO.

wefalk commented Jul 20, 2016

Good luck!

Get Outlook for iOShttps://aka.ms/o0ukef

On Wed, Jul 20, 2016 at 2:52 PM -0500, "Keerthana Subramanian Manivannan" <notifications@github.commailto:notifications@github.com> wrote:

oh ok thanks. I'm just poking around here and there trying to fix the mailbox error. Hoping @hjoertelhttps://github.com/hjoertel or @jgarffhttps://github.com/jgarff will give me answers to fix it!

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/jgarff/rpi_ws281x/issues/41#issuecomment-234061933, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOqA2BaiVcRrMN1zhtSryO4qxdpDH0Wyks5qXnxqgaJpZM4FxDTO.

@hjoertel

This comment has been minimized.

Show comment
Hide comment
@hjoertel

hjoertel Jul 20, 2016

Am Mittwoch, 20. Juli 2016, 12:52:10 schrieb Keerthana Subramanian Manivannan:

oh ok thanks. I'm just poking around here and there trying to fix the mailbox error. Hoping @hjoertel or @jgarff will give me answers to fix it!

Hi Keerthana,

sorry for letting this topic open. It's working for month now and I don't know what I did to get it working.
Unfortunately I'm just not able to look at it. If you can wait 7 to 8 days? When I#m back at my PC I'll look what i will find.
Please check http://oertel-halle.de/projects/LEDstripes where I wrote down something I did.

regards
Heinz

mit freundlichen Grüßen
Heinz-Jürgen Oertel

hjoertel commented Jul 20, 2016

Am Mittwoch, 20. Juli 2016, 12:52:10 schrieb Keerthana Subramanian Manivannan:

oh ok thanks. I'm just poking around here and there trying to fix the mailbox error. Hoping @hjoertel or @jgarff will give me answers to fix it!

Hi Keerthana,

sorry for letting this topic open. It's working for month now and I don't know what I did to get it working.
Unfortunately I'm just not able to look at it. If you can wait 7 to 8 days? When I#m back at my PC I'll look what i will find.
Please check http://oertel-halle.de/projects/LEDstripes where I wrote down something I did.

regards
Heinz

mit freundlichen Grüßen
Heinz-Jürgen Oertel

@jgarff

This comment has been minimized.

Show comment
Hide comment
@jgarff

jgarff Jul 24, 2016

Owner

Which distro are you running? It seems that it's lacking some Broadcom kernel support which is required to get to the right type of non-cacheable memory. I know that the default raspbian image supports it, you might try running that instead. You also need to remember to run as root.

Owner

jgarff commented Jul 24, 2016

Which distro are you running? It seems that it's lacking some Broadcom kernel support which is required to get to the right type of non-cacheable memory. I know that the default raspbian image supports it, you might try running that instead. You also need to remember to run as root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment