-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Missign control for RED "Power LED" #1332
Comments
The power LED is different on Pi3. It is controlled from GPU through a GPIO expander which is configured as an input. It may not be possible to drive it from the arm (certainly it is not currently). |
What's the reason of this change? ---------- Původní zpráva ---------- " The power LED is different on Pi3. It is controlled from GPU through a GPU — "= |
Pi3's BT/wifi support required a number of additional GPIOs compared to Pi2. |
OK than, and is there some way how to switch the RED LED off? ---------- Původní zpráva ---------- " Pi3's BT/wifi support required a number of additional GPIOs compared to Pi2. — "= |
The PWR LED on RPis since the B+ has doubled as an under-voltage indication. Since GPIOs are in short supply, as well as being an indicator it is also the under-voltage detector - there is some external circuitry that can detect the GPIO direction so that it is either an input with an automatic LED or an output. This circuitry is only present on the red LED. The ability to change the "PWR" LED pin to an output, as you must do to make it the ACT LED, bypasses the under-voltage detection, which is permitted but not recommended. As @popcornmix says these LEDs are now on a GPIO expander, and controlled from the VPU. These GPIOs may never be available as fully featured GPIOs because they are too slow to use in many circumstances. There is a simple GPIO driver that can efficiently control the ACT LED, but more effort is needed to make it work with the PWR LED and change its direction to an output. This is something we may address, but it isn't high on the list of priorities at the moment. |
Oops, that's too bad to have such a incompatibility with the previous ---------- Původní zpráva ---------- " The PWR LED on RPis since the B+ has doubled as an under-voltage and over- As @popcornmix(https://github.com/popcornmix) says these LEDs are now on a — "= |
What functionality do you want from a PWR LED on an arbitrary GPIO (wired to a HAT)? You can't get under-voltage detection, so it is basically just on or off under CPU control. The reason the PWR LED definition was removed from the base DTB for the Pi3 is because (annoyingly) there is no easy way to declare the LED but not have it use a GPIO. However, if you tell me exactly how you want your LEDs to work - both the onboard ones and any on your HAT - then we might be able to come up with a scheme to support that. |
It's much more complex.
---------- Původní zpráva ---------- " What functionality do you want from a PWR LED on an arbitrary GPIO (wired to The reason the PWR LED definition was removed from the base DTB for the Pi3 — "= |
Sorry for the slow response - I'm not at work. For 1) if you are prorated to lose the under-voltage detection and display then we can swap the functions between the two pins - green for power, red for activity. For the others, what the DT parameters are missing is a way to choose which GPIO controller to use. The best way to solve this is with a new overlay. |
On raspberry pi 2 I read GPIO35 as un input to find out if raspberry is under-voltage. |
Too bad... I wanted to disable the power led since it should work as a sleeping monitoring device and it's not good to have any lights on. Beside removing the led is there any other way to just disable it? |
Only `/sys/class/leds/led0` exists on the Raspberry Pi 3 and it controls the green LED. It seems access was removed to accommodate the new wifi/BT capabilities. raspberrypi/linux#1332 http://raspberrypi.stackexchange.com/questions/44168/how-can-i-control-the-red-led-again
Only `/sys/class/leds/led0` exists on the Raspberry Pi 3 and it controls the green LED. It seems access was removed to accommodate the new wifi/BT capabilities. raspberrypi/linux#1332 http://raspberrypi.stackexchange.com/questions/44168/how-can-i-control-the-red-led-again
I'd also like to disable the PWR LED on the PI 3. Is there a "donate to get your feature" option :) Just purchased 169 PI3s for a project. Need the lights to be on/off configurable. |
I know that dt-blob.bin is a pain from a maintenance perspective, but could those wanting to totally disable the power LED totally not amend the
There is also the mailbox service that would allow userspace to fiddle with the outputs on the expander, but not set direction - see https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=109137&start=100#p990152 and https://github.com/6by9/rpi3-gpiovirtbuf |
Hi! Actually I'm quite a beginner in the raspberry world... So I guess the mail Thank you for the link to the repository it seems a perfect fit :) the kind regards On Sun, Jul 10, 2016 at 11:08 PM, 6by9 [email protected] wrote:
|
130 is the activity LED, so
Once the LED is in one of the static states you can control it using the vcmailbox commands above, or with @6by9's code utility or the API it uses. Alternatively just switch between the two different static states as above. Using the API from your own code will be the most efficient because it skips the overhead of process creation. |
Wow thanks for the info! Any chance to steer the pwr led in the same way on my raspberry 3? kind regards On Mon, Jul 11, 2016 at 3:14 PM, Phil Elwell [email protected]
|
For the complete list of GPIO allocations, look at the dt-blob.dts that configures the GPU side - https://github.com/raspberrypi/firmware/blob/master/extra/dt-blob.dts#L1175 Documentation is at https://www.raspberrypi.org/documentation/configuration/pin-configuration.md AFAIK Direction can only be controlled via the blob at the moment - certainly that's the answer I got from popcornmix when I discussed it with him last. Adding a mailbox call to do that wouldn't be huge, but is just yet another job to be done. |
Hello, we are using several Raspberry 3's in a controlled lighting environment. And several red LEDs certainly disturb our light measurements. We were able to turn all other LEDs other than the red LED off. Is there any way that we can turn the red LED off? |
@canol Had you tried the dtblob changes I'd suggested in #1332 (comment) ? |
Just given it a whirl.
As above, make the changes:
And The red power LED then comes on as the Pi initially boots, but is very quickly turned off again. It does come back on when you do sudo halt, but not much can be done about that (I suspect it is the reset condition of the chip). If you checkout https://github.com/6by9/rpi3-gpiovirtbuf, then now I've fixed a minor bug, using |
"rpi3-gpiovirtbuf" No use for my pi3... |
??! |
I'm sure it's my own. But the red led is still on. @6by9 |
It will only work if you also generate a custom dt-blob.bin with the GPIO marked as an output, as described above. This is because the API to the firmware does not allow the pin direction to be changed. @popcornmix What do you think about either adding an explicit direction property or making the existing get and set methods also change the direction appropriately? |
My vote would be for a new direction property. |
It would be really useful to be able to shut off the power led, also. How can I contribute to make this feature possible? |
Update: Worked like a charm @6by9! Thank you. @6by9 Thanks for your quick response and Merry Christmas. I did read the whole thread, but as far as I understand, the solution above requires some sort of recompilation. I'll try to make that work, but I was referring to a feature that can be toggled on / off with just one line or so. If that is not possible or easy to do, I understand, I just wanted to affirm the need for such a feature. |
I'm not sure if I'm performing something drastically wrong in getting the power LED to switch off but I have tried the dt-blob.dts process and then the rpi-gpiovirtbuff, i get the "Set state of 135 to 1" confirmation but the red LED remains on and persists even after attempted restarts. Thank you in advance. |
@Akko1 Maybe you are using an other revision of the PI 3. So you have to change it for the other revision:
|
@maxammann As you mentioned the revision I suddenly realised my error. I have been using a Pi2 the entire time with inbuilt PWR LED controls... Thank you for the awakening however and a swift response but the LED is now nice and peaceful. |
Guys, this is a silly question, but still... |
@Zidler yes, but I think when I tested it it 1 meant on and 0 off. |
All i get is this: The Power LED is red. What am I doing wrong? |
@Zidler after you modified your dt-blob.dts the power led should be already off. |
ok, but how can I keep it on and get the status of it? |
I don't know why buy I changed |
@Zidler When you just want to get the status of the LED you do not need to change anything! just run: ./rpi3-gpiovirtbuf g 135 The meaning of the LED itself is inverses again: LED on means "NO power low". -> I just double checked with a good and a dodgy usb cable. |
@6by9 This solution worked beautifully. Thank YOU. |
@derbroti, could you please tell me, where I can read about signals and stuff? Couldn't find any sources. |
I need a little help (not a pro pi'er). I'm setting up MotionEye on a rp3 and on my rp2 turning off LEDs was fairly easy, but having some issues with this one. I have followed @6by9's directions up to making the changes to the file. I am stuck at And The motioneyeos system doesn't allow sudo since u log in as admin which is sudo I guess. I have tried multiple ways to get this to work to no avail. I think it might be an issue with the motioneyeos, but I'm not positive. Any help is greatly appreciated. I also added @maxammann revision to it just in case anyone was gonna ask about that as well. |
@roycie1282 Looking at the FAQ: https://github.com/ccrisan/motioneyeos/wiki/FAQ Yes: admin is an alias for root; yes, you do not need any sudo command - so leave it out Is the device-tree-compiler installed? So either, again FAQ: install motionEye as a program on raspbian instead of the motioneyeOS and have a full featured os with apt and sudo ;) or build the DTC and it will work as well :) |
@Zidler Sorry, I don't have any "way to go" sources - but there are many digital electronics/signal processing sources on the web - search for those terms or try your local university library, they often have good books about it. |
The latest rpi-update code includes a mailbox service update that allows setting up the GPIO expander direction, polartity, and termination. If you wish to try this on a non-critical Pi, then
Should leave you with the LED off. Once configured as an output then The gotcha is that this is the under-voltage monitoring is still active. If it reads high (after active_low compensation), then it will disable turbo mode and display the lightning bolt. The above commands set the line as active_high (default is active_low), so with the LED off you won't be throttled, but will if you turn the LED on. Next up: writing a kernel driver to talk over that mailbox interface. |
Last night's rpi-update release includes 6by9's new GPIO expander driver, and the DT mods required for the power LED to appear as /sys/class/leds/led1. The pwd_led_trigger dtparam also works, but pwr_led_gpio currently only lets you switch between pins on the expander - not particularly useful. This is because even though the system has a unified GPIO space, in DT you have to select a GPIO from a specific controller. N.B. I advise you not to choose the "heartbeat" pattern on the PWR LED - it seems to lock up a Pi3. |
I found a bug in the leds_gpio module (one I put there long ago) that was causing timer- and interrupt-driven LED triggers to lock up. The kernel sources and the latest rpi-update firmware now include the fix for this, so feel free to put a heartbeat on your PWR LED. Can we close this issue now? |
Closing this issue as questions answered/resolved. |
At the RPi3 B+ board there is missing the control folder for led1 in the ../soc:leds/leds/ folder.
How to control the function or this RED LED than?
The text was updated successfully, but these errors were encountered: