Skip to content
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 use PWM on Ubuntu 21.04 #460

Open
Mercotui opened this issue May 21, 2021 · 4 comments
Open

Can't use PWM on Ubuntu 21.04 #460

Mercotui opened this issue May 21, 2021 · 4 comments
Labels
notice Issues that are solved/do not require input, but preserved and marked of interest to users.

Comments

@Mercotui
Copy link

I tried using the test application with the default GPIO 18 (PWM0) on my Raspbery Pi 3b, running Ubuntu 21.04.
However my LED strip stays off, and this is the console output:

$ sudo ./test -c
Can't open device file
: No such device or address
ws2811_init failed: Failed to create mailbox device

Looking into the code, it seems in mailbox.c the function mbox_open tries to open a device called /dev/vcio.
Sadly this doesn't exist on Ubuntu 21.04.

$ ls /dev/vcio
ls: cannot access '/dev/vcio': No such file or directory

The backup mechanism to create a node in /tmp/ also clearly fails, but this is beyond my understanding 🤷

My fix:

In another issue I saw the recommendation to use SPI, on GPIO 10 instead.
Trying that:

$ ./test --gpio 10 -c

The screen lights up in a rainbow, works wonderfully!

@Mercotui
Copy link
Author

leaving mostly for prosperity, thank you to the contributors for making this fine library 👌

@Gadgetoid Gadgetoid added the notice Issues that are solved/do not require input, but preserved and marked of interest to users. label Oct 5, 2021
@transplier
Copy link

Just another headsup. I also ran into the mailbox issue on my B Rev. 2 in Debian 10, but was additionally unable to get SPI working. It appears the SPI driver doesn't load properly, despite configuring it in config.txt. raspberrypi/linux#526

@jwillikers
Copy link

/dev/vcio does not exist on Fedora either on the Raspberry Pi CM4.

@isidroas
Copy link

Here I am using Raspberry Pi 4 with an image from https://raspi.debian.net/tested-images/

Devices /dev/vcio and /dev/spidev0.0 do not exist.

However I tried WiringPi/examples/pwm.c and it works.

Is there another way to control PWM?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notice Issues that are solved/do not require input, but preserved and marked of interest to users.
Projects
None yet
Development

No branches or pull requests

5 participants