Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

poweroff and LEDs

Featured Replies

After a (sudo) poweroff, the ethernet port leds turn off, the usb sockets' power supply too, but the green led remains on. I would like the green led to turn off after a sudo poweroff.  How can I do that? What's the best way to do it?

 

It's an Orange Pi PC with ARMBIAN 5.60 stable Debian GNU/Linux 8 (jessie) 3.4.113-sun8i

 

Thanks.

  • Author

You mean this?

 

sudo /RAID/h3fakeoff 
[sudo] password for pi: 

H3fakeoff 1.0-b20171229 by ariel/KotCzarny (c) 2017

Load arisc blob which will turn off most subsystems, then wait for
gpio or IR button to start the system.
Make sure you have saved your work and umounted all filesystems.

Usage: /RAID/h3fakeoff [-s] [-l PXYY] [-b PXYY] [-w X] [-i X]
    -s    yes, power down my system
    -l PXYY    led gpio (OrangePiPC: PL10)
    -b PXYY    gpio button (OrangePiPC: PL03)
    -w X    gpio key must be held for X seconds to trigger wakeup
    -i X    ir wakeup button (ie. 255)
 

¿?

  • Author
16 minutes ago, Igor said:

Yes. This is the only way to power down on boards without external PMU chips under mainline kernel. In those topics you can find more indormationa about this.

 

Thanks!

 

Will that do a sane poweroff by itself? I mean, can I use it instead of a (sudo) poweroff? Or do I have to call first Debian's poweroff and put that (h3fakeoff) in some script so that it gets called by Debian (as late as possible) in the (sudo) poweroff/shutdown sequence of events?

 

 

  • Author
Quote

That supposed to be the same way as on the stock kernel. Where this works OOB. 

 

Do the testings and if it works o.k., make a solution (script and builds script implementation) that wehttps://www.armbian.com/get-involved/ all can benefit from it. I can't fix all problems. We can.

 

A sudo h3fakeoff -s shuts down my Orange Pi PC very quickly, too much perhaps, and leaves it in a sort of catatonic state in which it-s not 100% off because my chinese usb amp-meter instead of 0.00A (what I get with a sudo poweroff) shows 0.08A (80mA). 

 

A sudo h3fakeoff -s -l PL10 -b PL03 does the same thing, but pressing the button for a while (the led flashes and) it reboots.

 

I think a sudo poweroff shuts down the things better, and turns everything off properly, but this does not.

 

The benefit over a poweroff is that with a h3fakeoff you can turn it on again with the button. I guess that's where the fake comes from :-)

  • Author

What I did and has worked for me is this:

 

edit /usr/lib/armbian/armbian-hardware-optimization line #208:

 

(sleep ${BlinkTime} && (echo default-on >/sys/class/leds/*green*/trigger) 2>/dev/null) &

 

and replace "default-on" with "timer"

 

For some reason, when the LED trigger is timer, it seems to always end off after a sudo poweroff.

 

It wasn't working in /etc/rc.local because in rc.local it seems to run before that #L208, so any trigger setting done there doesn't stick (it's overwritten later by #L208).

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.