Am I right in thinking that since the last firmware update, you can no longer disable the LED by a line in config.txt?
Has the syntax changed or is this facility planed to be reinserted in a future release?
Thanks
Leo
Re: Turning off camera LED
you are correct, it seems editing the config.txt no longer works
- MattHawkinsUK
- Posts: 538
- Joined: Tue Jan 10, 2012 8:48 pm
- Location: UK
Re: Turning off camera LED
I hope it is re-enabled. The red LED is a pain when you are pointing the camera out a window due to reflections.
Yes you can stick tape over it, but that is a messy solution.
Yes you can stick tape over it, but that is a messy solution.
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)
-
- Posts: 103
- Joined: Mon Oct 01, 2012 6:55 pm
Re: Turning off camera LED
putting in disable_camera_led=1 in my config.txt works for me. Just did it today.
Re: Turning off camera LED
I imagine you haven't updated your packages yet
Re: Turning off camera LED
Yep, I updated this morning and lost control over the camera LED 
I read somewhere in the forum that GPIO 5 controls this LED, but couldn't figure out how to set it to 0 from shell. I always get "Operation not permitted" when trying to write "0" to /sys/class/gpio/gpio5/value even though I'm logged in as root.
Anybody knows a software workaround until this gets fixed in the firmware? Taping over the LED is not an option for me...

I read somewhere in the forum that GPIO 5 controls this LED, but couldn't figure out how to set it to 0 from shell. I always get "Operation not permitted" when trying to write "0" to /sys/class/gpio/gpio5/value even though I'm logged in as root.
Anybody knows a software workaround until this gets fixed in the firmware? Taping over the LED is not an option for me...
Re: Turning off camera LED
It is GPIO 5. I've tried it out in a live Python environment and with the LED diabled in config.txt, toggling GPIO 5 switches the LED on and off at will. Matt "RaspberryPiSpy" Hawkins published a script earlier in the week. But even he has lost access to it with the update.znanev wrote:Yep, I updated this morning and lost control over the camera LED
I read somewhere in the forum that GPIO 5 controls this LED, but couldn't figure out how to set it to 0 from shell. I always get "Operation not permitted" when trying to write "0" to /sys/class/gpio/gpio5/value even though I'm logged in as root.
Anybody knows a software workaround until this gets fixed in the firmware? Taping over the LED is not an option for me...
I haven't upgraded since last week, so mine are still off


Alex Eames RasPi.TV, RasP.iO
Re: Turning off camera LED
I've managed to come up with a sort-of workaround... even though the camera LED comes on by default, you can still turn it off from Python. So one approach would be to create a script named 'disablecameraled.py' containing: (this is a cut-down version of the RaspberrySpy script)
and make it executable with and then run e.g. the following command line:
which will start raspivid, send it to the background (with & ) and then use Python to turn off the LED while raspivid is still running in the background. On my Pi the LED stays on for about half a second.
Obviously you can replace raspivid with raspistill, and add whatever other command-line-arguments you want...
Andrew
EDIT: P.S. The reason you can toggle GPIO5 with RPi.GPIO and not the bash shell, is because the Python module accesses /dev/mem directly (and prints a warning message, which I've turned off in the code above) whereas the bash shell accesses the GPIO via sysfs (which I guess can't "ignore" the warning message).
EDIT2: I've just checked, and this workaround method still works even if disable_camera_led=1 isn't in /boot/config.txt
Code: Select all
#!/usr/bin/env python
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(5, GPIO.OUT, initial=False)
Code: Select all
chmod +x disablecameraled.py
Code: Select all
raspivid -d -t 10000 & sudo ./disablecamled.py
Obviously you can replace raspivid with raspistill, and add whatever other command-line-arguments you want...
Andrew
EDIT: P.S. The reason you can toggle GPIO5 with RPi.GPIO and not the bash shell, is because the Python module accesses /dev/mem directly (and prints a warning message, which I've turned off in the code above) whereas the bash shell accesses the GPIO via sysfs (which I guess can't "ignore" the warning message).
EDIT2: I've just checked, and this workaround method still works even if disable_camera_led=1 isn't in /boot/config.txt
Last edited by AndrewS on Fri May 24, 2013 1:02 pm, edited 1 time in total.
Re: Turning off camera LED
I given Dom a heads up on this this thread - he's going to take a look at it.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6335
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
Re: Turning off camera LED
Should be fixed with rpi-update firmware.
Re: Turning off camera LED
Thanks dom, works great now.
Has anything else changed? Still pictures seem sharper now, but could be just because the sun is shinning at last!
Leo
Has anything else changed? Still pictures seem sharper now, but could be just because the sun is shinning at last!
Leo
dom wrote:Should be fixed with rpi-update firmware.
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6335
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
Re: Turning off camera LED
Stills are now higher resolution. We were previously incorrectly capturing 2Mpixel stills (rather than 5Mpixel).leol wrote:Thanks dom, works great now.
Has anything else changed? Still pictures seem sharper now, but could be just because the sun is shinning at last!
http://www.raspberrypi.org/phpBB3/viewt ... 43&t=44879
Re: Turning off camera LED
Brilliant! Thanks to you, jamesh, and everyone working on this. The Pi project just gets better and better.
dom wrote:Still are now higher resolution. We were previously incorrectly capturing 2Mpixel stills (rather than 5Mpixel).leol wrote:Thanks dom, works great now.
Has anything else changed? Still pictures seem sharper now, but could be just because the sun is shinning at last!
http://www.raspberrypi.org/phpBB3/viewt ... 43&t=44879
Re: Turning off camera LED
I can confirm that adding:
in my /boot/config.txt works to switch of the camera led (2014-01-07 wheezy-raspbian)
Code: Select all
disable_camera_led=1
in my /boot/config.txt works to switch of the camera led (2014-01-07 wheezy-raspbian)
-
- Posts: 6
- Joined: Mon Jan 25, 2016 3:58 am
Re: Turning off camera LED
Code: Select all
disable_camera_led=1
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 13804
- Joined: Wed Dec 04, 2013 11:27 am
- Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.
Re: Turning off camera LED
What model and revision of board are you using?littletinman wrote:does not work in Raspbian Jessie for me. Any alternatives to the python solution?Code: Select all
disable_camera_led=1
Vanilla Raspbian Jessie, or NOOBS? If NOOBS, are you editing the correct config.txt?
Output of "vcgencmd version" and "uname -a" please.
Genuine Pi Foundation camera module, or one of the clones?
This is a function of the GPU firmware not the Linux side, so as long as you set the config option correctly it should just work.
BTW Be aware that on A+ and B+ boards that it is generally GPIO 32 that controls the LED, not GPIO 5.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
-
- Posts: 6
- Joined: Mon Jan 25, 2016 3:58 am
Re: Turning off camera LED
I have the Raspberry Pi 2 Model B: http://www.amazon.com/gp/product/B00T2U ... detailpage
This is the camera: http://www.amazon.com/gp/product/B00E1G ... detailpage
I'm running Rapbian Jessie and can successfully take pictures etc.
I'll have to run those commands later today.
This is the camera: http://www.amazon.com/gp/product/B00E1G ... detailpage
I'm running Rapbian Jessie and can successfully take pictures etc.
I'll have to run those commands later today.
-
- Posts: 6
- Joined: Mon Jan 25, 2016 3:58 am
Re: Turning off camera LED
"vcgencmd version" yields:
"uname -a" yields:
Code: Select all
Nov 18 2015 15:48:41
Copyright (c) 2012 Broadcom
version 0c9af7cde38e223c95c3404f468db8fc5004495c (clean) (release)
Code: Select all
Linux piserver 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13 20:19:03 GMT 2015 armv7l GNU/Linux
-
- Posts: 6
- Joined: Mon Jan 25, 2016 3:58 am
Re: Turning off camera LED
So... this looks like an issue of PEBKAC.
I was taking pictures for testing in a closed cabinet under my tv so I could see the red clearly in the picture (without getting up and down all the time). Turns out the camera LED was off, I was just seeing the red from my PS3's digital audio out....

I was taking pictures for testing in a closed cabinet under my tv so I could see the red clearly in the picture (without getting up and down all the time). Turns out the camera LED was off, I was just seeing the red from my PS3's digital audio out....


-
- Posts: 27
- Joined: Fri Jun 21, 2013 4:21 pm
- Location: Northumberland, UK.
Re: Turning off camera LED
I've found with Jessie that disable_camera_led=1 in config.txt disables the camera: cue some frustration dismantling camera from Pi in carefully placed Pi.
Is there a simple way to disable the camera LED using the current Jessie?
Is there a simple way to disable the camera LED using the current Jessie?
-
- Posts: 27
- Joined: Fri Jun 21, 2013 4:21 pm
- Location: Northumberland, UK.
Re: Turning off camera LED
I'll quickly answer my own question in case it helps anyone else. There was a bug and it's fixed by 'sudo rpi-update', with the caveats, for a firmware update. I had a camera in a binocular eyepiece and definitely needed the LED off.
See viewtopic.php?p=922799#p922799
See viewtopic.php?p=922799#p922799
-
- Posts: 1
- Joined: Fri Jul 29, 2016 5:16 pm
Re: Turning off camera LED
Hi Knightlorish,
I am using "2016-05-27-raspbian-jessie.img" on a Raspberry Pi Zero with camera port.
The LED is always on. I edited the /boot/config.txt file and added: disable_camera_led=1 via sudo nano
and sudo reboot.
It failed to boot-up after that. I am busy re-imaging the SD card.
Whilst doing that I found your post.
Q1. Do you mean that "there was a bug and it's fixed by 'sudo rpi-update'" - that it was fixed after my 2016-05-27 image?
Q2. If fixed do I still have to disable it by adding "disable_camera_led=1" to /boot/config.txt ?
Regards,
RaspberryPieman2016
I am using "2016-05-27-raspbian-jessie.img" on a Raspberry Pi Zero with camera port.
The LED is always on. I edited the /boot/config.txt file and added: disable_camera_led=1 via sudo nano
and sudo reboot.
It failed to boot-up after that. I am busy re-imaging the SD card.
Whilst doing that I found your post.
Q1. Do you mean that "there was a bug and it's fixed by 'sudo rpi-update'" - that it was fixed after my 2016-05-27 image?
Q2. If fixed do I still have to disable it by adding "disable_camera_led=1" to /boot/config.txt ?
Regards,
RaspberryPieman2016