Skip to content
This repository has been archived by the owner on May 11, 2018. It is now read-only.

Add power button support #12

Open
gitchomik opened this issue Jan 15, 2016 · 35 comments
Open

Add power button support #12

gitchomik opened this issue Jan 15, 2016 · 35 comments

Comments

@gitchomik
Copy link

More info in threads
http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=940
and
http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=817

Regards !

@jernejsk
Copy link
Owner

If somebody creates good pull request or patch I will consider it.

@warik-zp
Copy link

I found a solution:
In script.bin:
[wakeup_src_para]
wakeup_src_bt = port:PL03<6><0>

[gpio_power_key]
key_used = 1
key_io = port:PL03<6><0>

Code screenshot: https://imgur.com/WErESa8

Kernel with option:
System Type -> Homlet platform bootup extend
Device Drivers -> Input device support -> Keyboards -> sunxi IR RX support
Device Drivers -> Input device support -> Keyboards -> gpio key for H3 prototype

@jernejsk
Copy link
Owner

sunxi IR RX is not strictly needed, only for turning it on/off with IR remote? I will port suspend/resume support to new IR driver in the future, I don't intent to go back to NEC only driver.

@warik-zp
Copy link

I'm talking about the power button. If use this option, we can add support power button?

@jernejsk
Copy link
Owner

I don't see logical connection between IR driver and power button. I also checked this IR driver code and still can't see the connection.

@warik-zp
Copy link

Oh. Sorry. This method add solution power on from IR and button.

@jernejsk
Copy link
Owner

Can you check if power button now works? Don't forget to clear u-boot first so script.bin gets recompiled.

@warik-zp
Copy link

Oaky. I'll try and let you know.

@galeots
Copy link

galeots commented Apr 19, 2016

fix power button!?

@jernejsk
Copy link
Owner

Sorry, no. I will fix this when I will have nothing else to do. I spent too much time for this already.

@galeots
Copy link

galeots commented Apr 19, 2016

Once solved this program is complete!

@llonca13
Copy link

@jernej thanks for everything

To be honest i dont mind this power button/ir bug,if you can fox it great if no ill just leave it as a 0-24 working htpc/mysql library server :)

@jernejsk
Copy link
Owner

I highly suspect that this bug resides somewhere in graphics stack, but I have no idea how to locate it. I will first try to fix some issues in Kodi and later try to fix it again.

@llonca13
Copy link

Hvala :)

@llonca13
Copy link

You fixed itttt :)
I tried the new version(25 april) and it works..i dont know for the ir because i have orangepi one..but the button works perfectly..shutdown in kodi puts it in suspended state(with the red light glowing) which is in my opinion alot better then turning it off :)
And i also noticed the system info show correct amount of memory now

Thank you soooo much jernej
I think this issue can be closed now
Thank you

@jernejsk
Copy link
Owner

Are you pretty sure? It seems that it doesn't work on my OPi2. I need more reports...

@llonca13
Copy link

yes im sureee 👯 :)
sorry to hear about your Opi2 but on Opi One you fixed the problem.

heres video :
https://www.youtube.com/watch?v=wu8Ong0On2Q

@jernejsk
Copy link
Owner

Good for you, but I won't close it until it works reliably for everyone.

@jernejsk
Copy link
Owner

@galeots or anyone else,
can you confirm that suspend/resume using button almost works IF there is NO USB mouse/keyboard connected?

@galeots
Copy link

galeots commented Apr 28, 2016

@jernejsk Tomorrow I try to compile if I have time I'll tell you

@galeots
Copy link

galeots commented Apr 29, 2016

@jernejsk The suspension goes without any connected USB devices. sata no longer working in the new version

@jernejsk
Copy link
Owner

@galeots,
SATA can be fixed, just wait few days till I get back to my OPi.

In the mean time, I think I found the issue with USB. Please check issue #41 and test opiplus.fex change described there.

@galeots
Copy link

galeots commented Apr 29, 2016

@jernejsk you can make sure that when goes in suspension turns off the fan !?

@jernejsk
Copy link
Owner

FAN is not official addon, so I wouldn't put this in image. I can help you with that on the forum. This is a bit off topic.

@galeots
Copy link

galeots commented Apr 29, 2016

@jernejsk thx

@jernejsk
Copy link
Owner

@galeots Did you test fix in #41 ?

@galeots
Copy link

galeots commented Apr 29, 2016

@jernejsk not work fix boot erase PG11 for sata

@galeots
Copy link

galeots commented May 14, 2016

@jernejsk how are the works for fix the power button?

@jernejsk
Copy link
Owner

It works as long as you don't use USB hub with attached devices. This unfortunatelly means that you should not use USB devices on OPi2 and OPiPlus. You can use IR remote for a workaround.

@galeots
Copy link

galeots commented May 14, 2016

@jernejsk but the bug has what is due !?

@jernejsk
Copy link
Owner

jernejsk commented May 14, 2016

Sorry, I don't understand what you mean. Button works. The only issue is USB driver which hangs at suspend if there is hub with device connected.

@galeots
Copy link

galeots commented May 14, 2016

@jernejsk the bug is due because usb does not suspend !?

@jernejsk
Copy link
Owner

Yes, I will close it once there will be no known problems with suspend / resume cycle.

@galeots
Copy link

galeots commented May 14, 2016

@jernejsk however if you do leave without USB peripherals work suspension! if you take away and put USB peripherals and suspend doesn't go

@jernejsk
Copy link
Owner

That is what I'm saying. You have Plus. If you would have PC or One, you wouldn't have any of those problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants