Skip to content
This repository has been archived by the owner. It is now read-only.

Add power button support #12

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

Comments

Projects
None yet
5 participants
@jernejsk

This comment has been minimized.

Copy link
Owner

jernejsk commented Jan 18, 2016

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

@warik-zp

This comment has been minimized.

Copy link

warik-zp commented Feb 12, 2016

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

This comment has been minimized.

Copy link
Owner

jernejsk commented Feb 12, 2016

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

This comment has been minimized.

Copy link

warik-zp commented Feb 12, 2016

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

@jernejsk

This comment has been minimized.

Copy link
Owner

jernejsk commented Feb 13, 2016

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

This comment has been minimized.

Copy link

warik-zp commented Feb 13, 2016

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

@jernejsk

This comment has been minimized.

Copy link
Owner

jernejsk commented Feb 14, 2016

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

@warik-zp

This comment has been minimized.

Copy link

warik-zp commented Feb 14, 2016

Oaky. I'll try and let you know.

@galeots

This comment has been minimized.

Copy link

galeots commented Apr 19, 2016

fix power button!?

@jernejsk

This comment has been minimized.

Copy link
Owner

jernejsk commented Apr 19, 2016

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

@galeots

This comment has been minimized.

Copy link

galeots commented Apr 19, 2016

Once solved this program is complete!

@llonca13

This comment has been minimized.

Copy link

llonca13 commented Apr 24, 2016

@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

This comment has been minimized.

Copy link
Owner

jernejsk commented Apr 24, 2016

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

This comment has been minimized.

Copy link

llonca13 commented Apr 24, 2016

Hvala :)

@llonca13

This comment has been minimized.

Copy link

llonca13 commented Apr 26, 2016

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

This comment has been minimized.

Copy link
Owner

jernejsk commented Apr 27, 2016

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

@llonca13

This comment has been minimized.

Copy link

llonca13 commented Apr 27, 2016

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

This comment has been minimized.

Copy link
Owner

jernejsk commented Apr 27, 2016

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

@jernejsk

This comment has been minimized.

Copy link
Owner

jernejsk commented Apr 28, 2016

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

@galeots

This comment has been minimized.

Copy link

galeots commented Apr 28, 2016

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

@galeots

This comment has been minimized.

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

This comment has been minimized.

Copy link
Owner

jernejsk commented Apr 29, 2016

@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

This comment has been minimized.

Copy link

galeots commented Apr 29, 2016

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

@jernejsk

This comment has been minimized.

Copy link
Owner

jernejsk commented Apr 29, 2016

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

This comment has been minimized.

Copy link

galeots commented Apr 29, 2016

@jernejsk thx

@jernejsk

This comment has been minimized.

Copy link
Owner

jernejsk commented Apr 29, 2016

@galeots Did you test fix in #41 ?

@galeots

This comment has been minimized.

Copy link

galeots commented Apr 29, 2016

@jernejsk not work fix boot erase PG11 for sata

@galeots

This comment has been minimized.

Copy link

galeots commented May 14, 2016

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

@jernejsk

This comment has been minimized.

Copy link
Owner

jernejsk commented May 14, 2016

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

This comment has been minimized.

Copy link

galeots commented May 14, 2016

@jernejsk but the bug has what is due !?

@jernejsk

This comment has been minimized.

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

This comment has been minimized.

Copy link

galeots commented May 14, 2016

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

@jernejsk

This comment has been minimized.

Copy link
Owner

jernejsk commented May 14, 2016

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

@galeots

This comment has been minimized.

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

This comment has been minimized.

Copy link
Owner

jernejsk commented May 14, 2016

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.
You can’t perform that action at this time.