IR Remote: Suspend/Resume

Post Reply
alex.c2
Posts: 9
Joined: Fri Jul 01, 2016 6:28 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

IR Remote: Suspend/Resume

Post by alex.c2 »

I read many forum posts and also on the wiki and it looks like currently (as of 08.2016) it is not possible to resume the C2 with the official IR remote.

I just want to make sure I understood correctly. Please confirm. Thanks

User avatar
odroid
Site Admin
Posts: 37793
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1919 times
Been thanked: 1185 times
Contact:

Re: IR Remote: Suspend/Resume

Post by odroid »

You are right.

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by infinity85 »

alex.c2 wrote:I read many forum posts and also on the wiki and it looks like currently (as of 08.2016) it is not possible to resume the C2 with the official IR remote.

I just want to make sure I understood correctly. Please confirm. Thanks
Could you be a bit more specific, please? I heard about the possibility to boot Odroid-C2 via IR the first time a week ago in LibreELEC section: http://forum.odroid.com/viewtopic.php?f=144&t=22931

Now your post sounds as if this is already working for quite a time? which posts and which wiki are you referring to? Can't see anything in "Issues Subforum" and nothing in Odroid-C2 Wiki
On which operating system does that work already?

@odroid
How come it is not possible (still wondering that it was possible at all already)? Will it be possible again?

Could you please provide the IR codes in: RC5 or RC6 or HEX?
Examples how the codes usually look like:
RC5: 0.071 respectively 000.071
RC6: 0.143 respectively 000.143
HEX: 0000 0073 000D 0000 0040 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0040 0020 0020 0020 0020 0020 09B7

I'd like to use the HK Boot IR-Command to learn it into my Logitech Harmony Remote

I hope you can provide it, so I could test it with my Odroid-C2 :)

EDIT:
found codes on http://odroid.com/dokuwiki/doku.php?id= ... arehacking.
These are not RC5 or RC6, are they? Which IR protocol is used here? I guess discrete codes for power-off and for power on are not planned?
Last edited by infinity85 on Fri Aug 12, 2016 12:40 am, edited 2 times in total.

Raybuntu
Posts: 1418
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 23 times
Contact:

Re: IR Remote: Suspend/Resume

Post by Raybuntu »

kwiboo who releases openPHT builds made some uboot patches and he is able to resume with the official HK remote.

It's kind of poweroff and resume from AO state.

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by infinity85 »

Raybuntu wrote:kwiboo who releases openPHT builds made some uboot patches and he is able to resume with the official HK remote.

It's kind of poweroff and resume from AO state.
Yep, I kind of put one and one together with your post in LibreELEC subforum, but still wondered about alex.c2's post regarding many posts and also on wiki people report issues. So this referred to OpenPHT or is it general? LibreELEC does not support it yet, right?

Raybuntu
Posts: 1418
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 23 times
Contact:

Re: IR Remote: Suspend/Resume

Post by Raybuntu »

Not yet. Once the issue is resolved I guess wrxtasy can include the same patch.

User avatar
odroid
Site Admin
Posts: 37793
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1919 times
Been thanked: 1185 times
Contact:

Re: IR Remote: Suspend/Resume

Post by odroid »

infinity85 wrote: EDIT:
found codes on http://odroid.com/dokuwiki/doku.php?id= ... arehacking.
These are not RC5 or RC6, are they? Which IR protocol is used here? I guess discrete codes for power-off and for power on are not planned?
It must be NEC protocol.
Refer this link too if you use Ubuntu/Linux on C2.
http://odroid.com/dokuwiki/doku.php?id=en:c2_lirc

User avatar
rooted
Posts: 8645
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 363 times
Contact:

Re: IR Remote: Suspend/Resume

Post by rooted »

infinity85 wrote:
alex.c2 wrote:
Could you please provide the IR codes in: RC5 or RC6 or HEX?
http://forum.odroid.com/viewtopic.php?p=153508#p153508

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by infinity85 »

odroid wrote:
infinity85 wrote: EDIT:
found codes on http://odroid.com/dokuwiki/doku.php?id= ... arehacking.
These are not RC5 or RC6, are they? Which IR protocol is used here? I guess discrete codes for power-off and for power on are not planned?
It must be NEC protocol.
Refer this link too if you use Ubuntu/Linux on C2.
http://odroid.com/dokuwiki/doku.php?id=en:c2_lirc
Thanks for that info! I will try to get it into my Harmony Remote as soon as I have some OS image I can test this with. Can somebody name an Image where this u-boot experiment is implemented already? OpenPHT? Ubuntu? Debian? Although Raybuntu mentioned OpenPHT, I can't find there anybody who mentioned such a capability and alex.c2 does not mention anything regarding his experience with this feature.
If I'm not sure that a particular image should work with this, I can't test it with my Harmony remote, as I'm also not sure whether importing these special RemoteCodes will work properly. Hence if it does not work I don't know whether the image does not provide this capability, or if the issue is because of wrongly improted codes into my remote.

Could somebody name a link to a testimage with this u-boot patch?

Raybuntu
Posts: 1418
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 23 times
Contact:

Re: IR Remote: Suspend/Resume

Post by Raybuntu »

No public image I know of. It's still work in progress. And of course there is the unresolved issue with missing source code. It's working with kwiboo's C2 openPHT build with uboot patches and 1st july 2016 Amlogic Kernel SOURCE release.

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by infinity85 »

Ah, you mean kwiboo is testing it for himself, but there is nothing released yet? Okay... That makes this opening post here even more confusing for me. I smelled blood in the water because of alex.c2's post and wanted to try it with my Harmony :D

So what is alex.c2 then talking about... according to his post he has been using this function already hmmm

Raybuntu
Posts: 1418
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 23 times
Contact:

Re: IR Remote: Suspend/Resume

Post by Raybuntu »

I was talking with Kwiboo @ LibreELEC Slack mainly about my recent CEC changes. He attached a link to a build but I don't think its intended for testing. Just follow the issue on github. Once its resolved I ping wrxtasy and ask him to include the patch.

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by infinity85 »

Raybuntu wrote:I was talking with Kwiboo @ LibreELEC Slack mainly about my recent CEC changes. He attached a link to a build but I don't think its intended for testing. Just follow the issue on github. Once its resolved I ping wrxtasy and ask him to include the patch.
Can't wait to test this ;). As I said, my eyes were opened widely when I saw alex.c2 post. Thought there is something to test on :)

Raybuntu
Posts: 1418
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 23 times
Contact:

Re: IR Remote: Suspend/Resume

Post by Raybuntu »

Talked to kwiboo. still some small issues with emmc and he wants to give it more testing and then he'll PR his uboot changes to Libreelec and openPHT. wrxtasy will propably port that too.

alex.c2
Posts: 9
Joined: Fri Jul 01, 2016 6:28 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by alex.c2 »

infinity85 wrote:So what is alex.c2 then talking about... according to his post he has been using this function already hmmm
I have tried to use it, but I could not.

What I meant to say was that it was not obvious to me that it is not possible to suspend/resume with the IR remote control. I had to read many forum posts and also on the wiki to come to the conclusion that that's the case. Sorry about the confusion.

Please note that I am concerned by the temperatures while the board is idling and not by the power consumption.

Raybuntu
Posts: 1418
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 23 times
Contact:

Re: IR Remote: Suspend/Resume

Post by Raybuntu »

Technically it's possible and only software needs to be adjusted. But you can also try to adjust the cpu governor to fix the temperature.

Raybuntu
Posts: 1418
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 23 times
Contact:

Re: IR Remote: Suspend/Resume

Post by Raybuntu »

@infinity85: here is a test build from kwiboo with the possibility to power on with IR https://www.dropbox.com/s/rm32sej9bf7iu ... mg.gz?dl=0

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by infinity85 »

Greeeeeaaaat :D

it is working!

Observation:
The IR-Command is apparently working as a on/off toggle. This is perfect for the on-function, however as the system shuts down immediately by pressing the button again, I assume it is not a safe-shutdown then, right? That would mean that pressing it again (turnin off) is like pulling the power cable. I would call it suboptimal, as this could break the filesystem then hmmm... perhaps it will be possible to block the power-off in u-boot via IR-Command as soon as this feature is ready for integration into final builds? I mean... one could just map (in keymaps.xml) the very same IR-Code to the "shut down / power off" GUI command of kodi, thus shutting down properly. Actually this could also be helpful for achieving discrete codes for power on and power off (very useful with universal remotes like logitech harmony, which power on many devices at once via userdefined activities).
But probably it is a safe shutdown and I'm just mistaken, as the shutdown ist too fast to believe ;)

Anyways... thank you very much for this testbuild and kudos @kwiboo for this work!! This is really amazing and promising... the C2 becomes an even better media center platform step by step. This feature can't be matched by the raspberry. Actually the only 2 things that are better on Raspberry are 3D support and PCM multichannel audio.

Everybody can find infos how to learn his harmony remote this odroid power command (if it is not already part of any profile, which I don't know about) here:
The guys @remotecentral helped me to translate the LIRC power-command into pronto remote command, which is in turn programmable into harmony remotes via this trick: http://www.remotecentral.com/cgi-bin/mb ... d.cgi?8141
As the downloadlink in the mentioned post ist offline I uploaded it:
ProntoHEX2Harmony.zip
(479.98 KiB) Downloaded 158 times

Raybuntu
Posts: 1418
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 23 times
Contact:

Re: IR Remote: Suspend/Resume

Post by Raybuntu »

Afaik its a normal shutdown but I'll ask kwiboo. He told me that poweroff poweron works but he had issues using suspend and wakeup but it looks like a kernel bug. Enjoy. LibreELEC really becomes better and better understand a lot of talented people are working with LE. It became the main system where new features are introduced and developed for the C2.

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by infinity85 »

alex.c2 wrote:
infinity85 wrote:So what is alex.c2 then talking about... according to his post he has been using this function already hmmm
I have tried to use it, but I could not.

What I meant to say was that it was not obvious to me that it is not possible to suspend/resume with the IR remote control. I had to read many forum posts and also on the wiki to come to the conclusion that that's the case. Sorry about the confusion.
[...]
Sorry, I managed to misunderstand your opening post somehow. I think when I read currently (as of 08.2016) I got the impression that it worked before. When I read it now after your post, I'm wondering why I got this impression back then :D
Raybuntu wrote:Afaik its a normal shutdown but I'll ask kwiboo. He told me that poweroff poweron works but he had issues using suspend and wakeup but it looks like a kernel bug. Enjoy. LibreELEC really becomes better and better understand a lot of talented people are working with LE. It became the main system where new features are introduced and developed for the C2.
Yep, I'm really glad to see this... it's obvious that ELEC became really vibrant since most developers started the LibreELEC project :) (of course everything is built on OpenELEC, but OpenELEC was deleoped by the same people, as far as I understood it). Exciting to follow all this development the last months!

Besides this...Noticed that Logitech has already an Odroid-C1 profile... why simple, if I can make it complicated (learn IR commands blablabla) :oops: :lol: ... so everybody owning a harmony remote can simply setup the ordoid-c1 prpfile, the power on/off works with it. The explanation in my last post regarding learning the harmony remotes the power toggle button of Odroid C2 is then only useful if you want to add this command to an existing device (e.g. profile: media center pc, which is often used for kodi) ;)

Kwiboo
Posts: 15
Joined: Mon Aug 08, 2016 10:27 am
languages_spoken: english, swedish
ODROIDs: C1+, C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by Kwiboo »

The instant power-off when pressing the power button is because of the default keymap in Kodi Krypton, remote.xml has <power>ShutDown()</power> and should behave same as the regular power off menu option or running systemctl poweroff, i.e. a proper Linux shut down.

There are three power off/suspend states the C2 can be in:
systemctl halt: Shut down Linux and stop the C2 completely (no way to power back up without resetting power)
systemctl poweroff: Shut down Linux and power down the main CPU/GPU cores, the Cortex-M3 core is still running and listening for wake-up actions (safe to remove power as Linux has been shut down)
systemctl suspend: Linux enter suspend mode and power down the main CPU/GPU cores, the Cortex-M3 core is still running and listening for wake-up actions (NOT safe to remove power as Linux has NOT been fully shut down)
If the C2 is put in suspend mode it will try to resume on ir-remote power key but goes back to suspend mode after a few seconds (possibly a kernel issue).

Note: The u-boot code is suppose to power off 3v3 when entering suspend/power-off mode, but I had to disable that part and have no real idea on how that should be done on the C2. This u-boot code was originally written for the Amlogic P200 dev board but the gpio bits is not matching 100% in the C2.

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by infinity85 »

Kwiboo wrote:[...] should behave same as the regular power off menu option or running systemctl poweroff, i.e. a proper Linux shut down.

There are three power off/suspend states the C2 can be in:
systemctl halt: Shut down Linux and stop the C2 completely (no way to power back up without resetting power)
systemctl poweroff: Shut down Linux and power down the main CPU/GPU cores, the Cortex-M3 core is still running and listening for wake-up actions (safe to remove power as Linux has been shut down)
systemctl suspend: Linux enter suspend mode and power down the main CPU/GPU cores, the Cortex-M3 core is still running and listening for wake-up actions (NOT safe to remove power as Linux has NOT been fully shut down)
[...]
At first: Welcome to this board Kwiboo :)

Great solution! :) So this will truly be the perfect solution, once it's implemented in final versions... finally no concerns about corrupted SD-Cards :)
Kwiboo wrote: Note: The u-boot code is suppose to power off 3v3 when entering suspend/power-off mode, but I had to disable that part and have no real idea on how that should be done on the C2. This u-boot code was originally written for the Amlogic P200 dev board but the gpio bits is not matching 100% in the C2.
Unfortunate to hear that. As powering off 3V3 worked on old u-boot versions the difference was that it went into systemctl halt and your solution uses systemctl poweroff?. Once I read that, I hooked up my (I2C) OLED 20x4 display to see what happens after pressing the IR power toggle button: Indeed, display shows - thanks to lcdproc - the message about shutting down the system. System shuts down, but the message stays on. Hence the 3v3 line stays indeed powered on although I set up in lcdproc config, that it should disable display after shut down.

Well this is indeed a concerning issue if you want to integrate this u-boot version as default into LibreELEC. On the other hand... how difficult is it to switch to old u-boot manually for those who make use of 3v3 (e.g. myself) after installing an image which actually contains the new u-boot? Isn't that just a file which can be downloaded and exchanged afterwards if needed (loosing the IR on/off feature obviously)?

Once you are here... may I ask if uboot provides the technical capability to put the Odroid C2 directly into this systemctl poweroff state before booting, to avoid an automatic boot upon power resume? I turn off my power strip/power board socket board (really don't know the correct english expression :roll:) every night or when I'm not at home as all my devices (tv, firetv, avr, wii etc) are powered by one outlet socket board.

Kwiboo
Posts: 15
Joined: Mon Aug 08, 2016 10:27 am
languages_spoken: english, swedish
ODROIDs: C1+, C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by Kwiboo »

infinity85 wrote:At first: Welcome to this board Kwiboo :)
Thanks! :)
infinity85 wrote:Unfortunate to hear that. As powering off 3V3 worked on old u-boot versions the difference was that it went into systemctl halt and your solution uses systemctl poweroff?. Once I read that, I hooked up my (I2C) OLED 20x4 display to see what happens after pressing the IR power toggle button: Indeed, display shows - thanks to lcdproc - the message about shutting down the system. System shuts down, but the message stays on. Hence the 3v3 line stays indeed powered on although I set up in lcdproc config, that it should disable display after shut down.
I am rather new to hardware and u-boot hacking so I am not really sure if my changes just keeps the power on the whole time or if it actually disables power to part of the system during power-off/suspend.
https://github.com/Kwiboo/u-boot/commit ... 28c4ecdf7c is the change to u-boot that made it possible to restart the system from power-off state, without it it would just get stuck at GXBB: not loading BL1.

There are some gpio bits used in the bl301/scp_task code that seems to be wrong when comparing to the C2 schematics:
  • power_on/off_3v3 was using GPIOAO.BIT2 that controls VCCK_CON
  • power_on/off_vcck was using GPIOAO.BIT4 that controls USB RST_N
  • power_on/off_at_24M was using GPIOAO.BIT13 (blue led) with wrong high/low
  • power button detection was using GPIOAO.BIT3 that controls TF_3V3N_1V8_EN
  • GPIOAO.BIT5 has something to do with USB PWREN
I would very much appreciate assistants from anyone with more hardware hacking experience to verify what gpio to set to power off/on 3V3 etc. correctly.

Unsure why it was powering down 3V3 with an older u-boot, it could be that it just halted due to an error or similar, the secure_task loop was at least not working correctly in older u-boot.
I will run some tests using the old u-boot to see how it behaves during power off/suspend.
infinity85 wrote:Well this is indeed a concerning issue if you want to integrate this u-boot version as default into LibreELEC. On the other hand... how difficult is it to switch to old u-boot manually for those who make use of 3v3 (e.g. myself) after installing an image which actually contains the new u-boot? Isn't that just a file which can be downloaded and exchanged afterwards if needed (loosing the IR on/off feature obviously)?
It should be possible to replace u-boot using dd and a custom u-boot.bin
infinity85 wrote:Once you are here... may I ask if uboot provides the technical capability to put the Odroid C2 directly into this systemctl poweroff state before booting, to avoid an automatic boot upon power resume? I turn off my power strip/power board socket board (really don't know the correct english expression :roll:) every night or when I'm not at home as all my devices (tv, firetv, avr, wii etc) are powered by one outlet socket board.
I am not sure if there is anything existing in current hardkernel u-boot that could make it work that way but in a newer amlogic u-boot there is a new poweroff u-boot command, unsure in what state it puts the device but with this new poweroff command and some boot.ini magic it might be possible to poweroff on first boot.

Horace01
Posts: 26
Joined: Thu Jul 21, 2016 7:55 pm
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by Horace01 »

Kwiboo wrote: I turn off my power strip/power board socket board (really don't know the correct english expression :roll:)
All are acceptable. Here in Australia we would say Power Board. My American friends would say Power Strip.



Sent from my HTC One using Tapatalk

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by infinity85 »

Horace01 wrote:
infinity85 wrote: I turn off my power strip/power board socket board (really don't know the correct english expression :roll:)
All are acceptable. Here in Australia we would say Power Board. My American friends would say Power Strip.
Thanks haha, finally got one to answer me this :D...Distinguishing american/british/australian expressions reminds me of the time when I've been to australia travelling...Guys asked me how it is with my clothes for cold weather, because I only had my backpack... well.. my answer was something like "have only one pants here" (guys shocked and laughing) and "this pullover that I'm wearing" (guys got questioning expressions on their faces)... so I was confused a bit about the reactions and asked "what do you need more than one pants in australia for :D? Have two pairs of shorts... it's too hot anyway to wear jeans" and then they explained me laughingly that "pants" in australia is usually standing for underwear :lol: and the other expression "pullover" is used here in germany for the australian word "jumper" (sweatshirt). So nobody knew what I meant :D. And I was totally confused with this one, as this is an english expression anyway :lol:
Kwiboo wrote:[...]
infinity85 wrote:Unfortunate to hear that. As powering off 3V3 worked on old u-boot versions the difference was that it went into systemctl halt and your solution uses systemctl poweroff?. Once I read that, I hooked up my (I2C) OLED 20x4 display to see what happens after pressing the IR power toggle button: Indeed, display shows - thanks to lcdproc - the message about shutting down the system. System shuts down, but the message stays on. Hence the 3v3 line stays indeed powered on although I set up in lcdproc config, that it should disable display after shut down.
[...]
Unsure why it was powering down 3V3 with an older u-boot, it could be that it just halted due to an error or similar, the secure_task loop was at least not working correctly in older u-boot.
I will run some tests using the old u-boot to see how it behaves during power off/suspend.
Stooop! That was a false alert from my side! After reading your response I got uncertain about my memory regarding old u-boots behavior... Tested it once again with wrxtasys 7.1.0 Aug build. And indeed, it also did not power off my OLED (3v3 line). Not with systemctl poweroff, nor with systemctl halt. So don't waste your time, I'm sorry for that!
In my case it did actually power off back then, but just because I was using the RemotePi board. This cuts power after it detects a safe shutdown, hence the display went off as well. I simply didn't notice that the RemotePi board was responsible for that.
Kwiboo wrote:
infinity85 wrote:[...]how difficult is it to switch to old u-boot manually for those who make use of 3v3 (e.g. myself) after installing an image which actually contains the new u-boot? Isn't that just a file which can be downloaded and exchanged afterwards if needed (loosing the IR on/off feature obviously)?
It should be possible to replace u-boot using dd and a custom u-boot.bin
Great! Then this could be a good default u-boot. I guess not many are using this 3v3 pin, so few will even notice anything. The benefit of powering on and off would be an advantage for most users on the other hand.
Kwiboo wrote:
infinity85 wrote:Once you are here... may I ask if uboot provides the technical capability to put the Odroid C2 directly into this systemctl poweroff state before booting, to avoid an automatic boot upon power resume? [..]
I am not sure if there is anything existing in current hardkernel u-boot that could make it work that way but in a newer amlogic u-boot there is a new poweroff u-boot command, unsure in what state it puts the device but with this new poweroff command and some boot.ini magic it might be possible to poweroff on first boot.
Sounds promising, thanks for this statement :)

EDIT:
Kwiboo wrote: I would very much appreciate assistants from anyone with more hardware hacking experience to verify what gpio to set to power off/on 3V3 etc. correctly.
Actually... the guys over at armbian.com are also developing for Odroid C2 and those developers are quite active on any of their supported boards. I could imagine that they are also doing work on u-boot. Perhaps it could be pretty helpful, if you mention in their forum, that you are working on u-boot updates for Odroid C2. Igor, zador.blood.stained and tkaiser are quite responsive :)

Raybuntu
Posts: 1418
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 23 times
Contact:

Re: IR Remote: Suspend/Resume

Post by Raybuntu »

That's a pretty awesome feature! @kwiboo informed me that POWER on with CEC works too.

@infinity85: Is there a main Thread for C2 development at armbian.com?

infinity85
Posts: 329
Joined: Tue May 24, 2016 4:26 am
languages_spoken: english, german
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by infinity85 »

I think it should be simply this thread: http://forum.armbian.com/index.php/topi ... c1-and-c2/

The aim at armbian is more on providing a stable server OS, I'd say, but once there is a new device or demand for it, they're quite fast and intense in providing support for it. Flying over the mentioned thread, all main developers apparently bought quickly an odroid c2 and implemented support for it within a quite short time. I did notice the odroid c2 support just yesterday, while I was checking whether there is something new for my banana pi (best distribution for it, imo).

As there are also other quite capable developers surfing around on their forum, I'd imagine that there might be one or another whose attention might rise, if mentioning that somebody at forum.odroid.com is working on improving u-boot capabilities.

Kwiboo
Posts: 15
Joined: Mon Aug 08, 2016 10:27 am
languages_spoken: english, swedish
ODROIDs: C1+, C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by Kwiboo »

Here is a new LibreELEC-master test-image with CEC power-on in addition to IR power-on: https://www.dropbox.com/s/jj78rdc7gwi3k ... mg.gz?dl=0
I would appreciate UART output if there is any issue with CEC power-on, it works fine on my Sony TV/AVR but I expect there can be issues with other manufactures or configurations not supporting CEC.

andy5macht
Posts: 244
Joined: Mon May 16, 2016 5:25 am
languages_spoken: english, german
ODROIDs: U3, C2, N2
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: IR Remote: Suspend/Resume

Post by andy5macht »

andy5macht wrote:woow, this sounds really nice! i am going to try with Samsung TV (CEC)
do you know if i can update via .img file - just as .tar? (using the SMB-Shared Update dir)
or do i need to flash the whole image?
update went fine ;)
(i also flashed fresh image => same results)
Krypton on my sceen, jeah :D

here is what i got via UART:
Bootup: (Plug Power in)

Code: Select all

--- UART initialized after reboot ---
[Reset cause: unknown]
[Image: unknown, amlogic_v1.1.3046-00db630 2015-10-28 15:24:31 xiaobo.gu@droid05]
bl30: check_permit, count is 1
bl30: check_permit: ok!
chipid: ef Load bl33 from eMMC, src: 0x00034200, des: 0x01000000, size: 0x00066630
be ad de d f0 ad ba ef be ad de not ES chip
[0.208928 Inits done]
secure task start!
high task start!
low task start!
NOTICE:  BL3-1: v1.0(debug):4d2e34d
NOTICE:  BL3-1: Built : 17:08:35, Oct 29 2015
INFO:    BL3-1: Initializing runtime services
INFO:    BL3-1: Preparing for EL3 exit to normal world
INFO:    BL3-1: Next image address = 0x1000000
INFO:    BL3-1: Next image spsr = 0x3c9


U-Boot 2015.01 (Aug 17 2016 - 13:30:20)

DRAM:  2 GiB
Relocation Offset is: 76f3f000
-------------------------------------------------
* Welcome to Hardkernel's ODROID-C2
-------------------------------------------------
CPU : AMLogic S905
S/N : HKC213254DFCE474
MAC : 00:1e:06:33:30:f4
BID : HKC2211604
-------------------------------------------------
register usb cfg[1][0] = 0000000077f96d10
register usb cfg[0][1] = 0000000077f96d38
vpu detect type: 5
vpu clk_level = 7
set vpu clk: 666667000Hz, readback: 666660000Hz(0x300)
MMC:   aml_priv->desc_buf = 0x0000000073f37d30
aml_priv->desc_buf = 0x0000000073f39ec0
SDIO Port C: 0, SDIO Port B: 1
Using default environment

In:    serial
Out:   serial
Err:   serial
[mmc_init] mmc init success
----------------------------------
MMC Size : 8 GB
----------------------------------
reading boot-logo.bmp.gz
** Unable to read file boot-logo.bmp.gz **
reading boot-logo.bmp
6220854 bytes read in 142 ms (41.8 MiB/s)
hpd_state=1
[CANVAS]addr=0x3f800000 width=3840, height=1440

set hdmitx VIC = 16
hdmitx phy setting done
set hdmitx VIC = 16
hdmitx phy setting done
Unknown command 'saveenv' - try 'help'
Net:   ## Error: Can't overwrite "ethaddr"
## Error inserting "ethaddr" variable, errno=1
Meson_Ethernet
Hit [Enter] key twice to stop autoboot:  0
reading boot.ini
4784 bytes read in 3 ms (1.5 MiB/s)
cfgload: applying boot.ini...
cfgload: setenv m "1080p60hz" # Progressive 60Hz
cfgload: setenv m_bpp "32"
cfgload: setenv vout "hdmi"
cfgload: setenv hpd "true"
cfgload: setenv condev "console=tty0"                          # on display (HDMI)
cfgload: setenv nographics "1"
cfgload: setenv libreelec "quiet ssh"
cfgload: setenv hdmi_cec  "1"                  # Enabled
cfgload: setenv hdmi_forcergb "0"              # Disabled
cfgload: setenv odroidp1  "no_console_suspend hdmimode=${m} m_bpp=${m_bpp} vout=${vout} disablehpd=${hpd}"
cfgload: setenv odroidp2  "${disableuhs} consoleblank=0"
cfgload: setenv odroid "${odroidp1} ${odroidp2}"
cfgload: setenv kernel  "fatload mmc 0:1 0x11000000 KERNEL"
cfgload: setenv dtb     "fatload mmc 0:1 0x1000000  meson64_odroidc2.dtb"
cfgload: setenv bootseq "booti 0x11000000 - 0x1000000"
cfgload: setenv timer   "fdt addr 0x1000000; fdt rm /timer"
cfgload: setenv bootcmd "${kernel}; ${dtb}; ${timer}; ${bootseq}"
cfgload: setenv bootrootfs "boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2"
cfgload: if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cecf"; fi
cfgload: if test "${hdmi_forcergb}" = "1"; then if test "${hdmitx}" = ""; then setenv hdmitx "hdmitx=forcergb"; else setenv hdmitx "${hdmitx},forcergb"; fi; fi
cfgload: if test "${nographics}" = "0"; then fdt rm /mesonfb; fdt rm /aocec; fi
cfgload: setenv bootargs "${condev} ${bootrootfs} ${odroid} ${hdmitx} ${libreelec}"
cfgload: run bootcmd
reading KERNEL
16443080 bytes read in 385 ms (40.7 MiB/s)
reading meson64_odroidc2.dtb
28959 bytes read in 4 ms (6.9 MiB/s)
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
   Loading Device Tree to 000000001fff5000, end 000000001ffff11e ... OK

Starting kernel ...

uboot time: 3518349 us
Shutdown C2: (TV went to Standby)

Code: Select all

INFO:    PSCI Affinity Map:
INFO:      AffInst: Level 0, MPID 0x0, State ON
INFO:      AffInst: Level 0, MPID 0x1, State ON
INFO:      AffInst: Level 0, MPID 0x2, State ON
INFO:      AffInst: Level 0, MPID 0x3, State ON
ERprocess cCEC cfg:0x2f
set vddee to 0x0352mv
06f1932000000000
remote_cec_hw_reset
AO_DEBUG_REG0:0x00000000, AO_DEBUG_REG1:0x00001000
AO_DEBUG_REG2:0x00000000, AO_DEBUG_REG3:0x00000001
cec_node_init cec_config:0x2f, log_addr:0x1, phy_addr:0x1000
cec_report_physical_address
cec_triggle_tx len:0x05
 T: 1f 84 10 00 01
cec_device_vendor_id
cec_triggle_tx len:0x05
 T: 1f 87 00 00 00
cec_set_osd_name initiator:0x0
cec_triggle_tx len:0x0b
 T: 10 47 4f 44 52 4f 49 44 2d 43 32
cec_tx_irq_handler tx_msg_status:0x1, tx_num_msg:0x0
cec_tx_irq_handler tx_msg_status:0x0, tx_num_msg:0x0
Switch TV on:

Code: Select all

cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 80 00 00 10 00
cec_handle_message initiator:0x0, destination:0xf, opcode:0x80
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 80 00 00 10 00
cec_handle_message initiator:0x0, destination:0xf, opcode:0x80
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 82 00 00
cec_handle_message initiator:0x0, destination:0xf, opcode:0x82
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 85
cec_handle_message initiator:0x0, destination:0xf, opcode:0x85
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 82 00 00
cec_handle_message initiator:0x0, destination:0xf, opcode:0x82
Sadly C2 did NOT wake up.
Thanks for your effort. I know we will see this working soon :ugeek:

Raybuntu
Posts: 1418
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 23 times
Contact:

Re: IR Remote: Suspend/Resume

Post by Raybuntu »

You have 3 kind of RX. One is set of streampath and the other one is active source and request for active source. The code waits for a power key but samsung does not send it apperantly. I asked kwiboo to introduce a new Bitmask called STREAMPATH_POWERON_MASK.

Set you hdmitx=cec1f in your boot.ini instead of cecf.

The reason for this is that your C2 might be turned on when you just switch HDMI source.

andy5macht
Posts: 244
Joined: Mon May 16, 2016 5:25 am
languages_spoken: english, german
ODROIDs: U3, C2, N2
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: IR Remote: Suspend/Resume

Post by andy5macht »

Raybuntu wrote: Set you hdmitx=cec1f in your boot.ini instead of cecf.
The reason for this is that your C2 might be turned on when you just switch HDMI source.
this did not do the trick.

Raybuntu
Posts: 1418
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 23 times
Contact:

Re: IR Remote: Suspend/Resume

Post by Raybuntu »

@andy5macht: Yes sorry the cec config was not from kernel. Kernel needs to be patched. You will have to wait till kwiboo makes a new testbuild.

Kwiboo
Posts: 15
Joined: Mon Aug 08, 2016 10:27 am
languages_spoken: english, swedish
ODROIDs: C1+, C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by Kwiboo »

@andy5macht thanks for the UART output, it was very helpful.

Please test again with this image: https://www.dropbox.com/s/dqrhnyubezm11 ... mg.gz?dl=0
This time it should power-on when it sees a set stream path command and boot.ini has hdmitx=cec1f

andy5macht
Posts: 244
Joined: Mon May 16, 2016 5:25 am
languages_spoken: english, german
ODROIDs: U3, C2, N2
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: IR Remote: Suspend/Resume

Post by andy5macht »

i tried the new Image.
i could wake the C2 up via CEC, but not by turning TV on (TV said: no Signal) but when i choose thre right HDMI-Port again, it woke up!
i have to say that this worked just the first time of three tries... i still dont know why.
if you neet UART Output - i can supply it tonight.

Raybuntu
Posts: 1418
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 23 times
Contact:

Re: IR Remote: Suspend/Resume

Post by Raybuntu »

@andy5macht: yes please uart output. Thank you. I need to think about it but I have an idea but I need uart output.

andy5macht
Posts: 244
Joined: Mon May 16, 2016 5:25 am
languages_spoken: english, german
ODROIDs: U3, C2, N2
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: IR Remote: Suspend/Resume

Post by andy5macht »

hooked up Serial-Reader again:

i got when i shutdown C2 the first time:

Code: Select all

INFO:    PSCI Affinity Map:
INFO:      AffInst: Level 0, MPID 0x0, State ON
INFO:      AffInst: Level 0, MPID 0x1, State ON
INFO:      AffInst: Level 0, MPID 0x2, State ON
INFO:      AffInst: Level 0, MPID 0x3, State ON
ERprocess cCEC cfg:0x1f
set vddee to 0x0352mv
06f1932000000000
remote_cec_hw_reset
AO_DEBUG_REG0:0x0000001f, AO_DEBUG_REG1:0x00001000
AO_DEBUG_REG2:0x00000000, AO_DEBUG_REG3:0x00000001
cec_node_init cec_config:0x1f, log_addr:0x1, phy_addr:0x1000
cec_report_physical_address
 T: 1f 84 10 00 01
cec_device_vendor_id
 T: 1f 87 00 00 00
cec_set_osd_name initiator:0x0
 T: 10 47 4f 44 52 4f 49 44 2d 43 32
cec_tx_irq_handler tx_msg_status:0x1, tx_num_msg:0x0
cec_tx_irq_handler tx_msg_status:0x0, tx_num_msg:0x0
turning tv on: (tv shows "disconnect from anynet" - anynet is samsungs name for CEC, right?)
C2 not booting...

Code: Select all

cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 80 00 00 10 00
cec_handle_message initiator:0x0, destination:0xf, opcode:0x80
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 80 00 00 10 00
cec_handle_message initiator:0x0, destination:0xf, opcode:0x80
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 01 8d 02
cec_handle_message initiator:0x0, destination:0x1, opcode:0x8d
cec_menu_status menu_status:0x01, initiator:0x0
 T: 10 8e 01
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 82 00 00
cec_handle_message initiator:0x0, destination:0xf, opcode:0x82
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 01 8c
cec_handle_message initiator:0x0, destination:0x1, opcode:0x8c
cec_device_vendor_id
 T: 1f 87 00 00 00
cec_tx_irq_handler tx_msg_status:0x0, tx_num_msg:0x0
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 01 46
cec_handle_message initiator:0x0, destination:0x1, opcode:0x46
cec_set_osd_name initiator:0x0
 T: 10 47 4f 44 52 4f 49 44 2d 43 32
cec_tx_irq_handler tx_msg_status:0x0, tx_num_msg:0x0
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 01 a0 00 00 f0 23
cec_handle_message initiator:0x0, destination:0x1, opcode:0xa0
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 01 9f
cec_handle_message initiator:0x0, destination:0x1, opcode:0x9f
cec_get_version initiator:0x0
 T: 10 9e 05
cec_tx_irq_handler tx_msg_status:0x0, tx_num_msg:0x0
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 82 00 00
cec_handle_message initiator:0x0, destination:0xf, opcode:0x82
selected the already active hdmi input: (this HDMI-Port is called "Odroid-C2" at this state)
"tv shows "connecting to anynet" - C2 boots up:

Code: Select all

cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 01 8f
cec_handle_message initiator:0x0, destination:0x1, opcode:0x8f
cec_report_power_status initiator:0x0
 T: 10 90 01
cec_tx_irq_handler tx_msg_status:0x0, tx_num_msg:0x0
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 01 44 40
cec_handle_message initiator:0x0, destination:0x1, opcode:0x44
cec_user_control_pressed operation:0x40
exit_reason:0x08
set vddee to 0x042emv
BL1:08d¦GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;CHK:0;
TE: 271641
no sdio debug board detected

BL2 Built : 11:44:26, Nov 25 2015.
gxb gfb13a3b-c2 - jcao@wonton

Board ID = 8
set vcck to 1100 mv
set vddee to 1050 mv
CPU clk: 1536MHz
DDR channel setting: DDR0 Rank0+1 same
DDR0: 2048MB(auto) @ 912MHz(2T)-13
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x000000b0
Load bl30 from SD, src: 0x00010200, des: 0x01000000, size: 0x00009ef0
Sending bl30........................................OK.
Run bl30...
Load bl301 from SD, src: 0x0001c200, des: 0x01000000, size: 0x00001ae0
Wait bl30...Done
Sending bl301.......OK.
Run bl301...
c: 0x00020200, des: 0x10100000, size: 0x00011130


--- UART initialized after reboot ---
[Reset cause: unknown]
[Image: unknown, amlogic_v1.1.3046-00db630 2015-10-28 15:24:31 xiaobo.gu@droid05]
bl30: check_permit, count is 1
bl30: check_permit: ok!
chipid: ef be ad de d f0 ad ba ef be ad deLoad bl33 from SD, src: 0x00034200, des: 0x01000000, size: 0x00066630
 not ES chip
[0.387287 Inits done]
secure task start!
high task start!
low task start!
NOTICE:  BL3-1: v1.0(debug):4d2e34d
NOTICE:  BL3-1: Built : 17:08:35, Oct 29 2015
INFO:    BL3-1: Initializing runtime services
INFO:    BL3-1: Preparing for EL3 exit to normal world
INFO:    BL3-1: Next image address = 0x1000000
INFO:    BL3-1: Next image spsr = 0x3c9


U-Boot 2015.01 (Aug 19 2016 - 14:28:01)

DRAM:  2 GiB
Relocation Offset is: 76f3f000
-------------------------------------------------
* Welcome to Hardkernel's ODROID-C2
-------------------------------------------------
CPU : AMLogic S905
S/N : HKC213254DFCE474
MAC : 00:1e:06:33:30:f4
BID : HKC2211604
-------------------------------------------------
register usb cfg[1][0] = 0000000077f96d10
register usb cfg[0][1] = 0000000077f96d38
vpu detect type: 5
vpu clk_level = 7
set vpu clk: 666667000Hz, readback: 666660000Hz(0x300)
MMC:   aml_priv->desc_buf = 0x0000000073f37d30
aml_priv->desc_buf = 0x0000000073f39ec0
SDIO Port B: 0, SDIO Port C: 1
Using default environment

In:    serial
Out:   serial
Err:   serial
ret = 1 .[mmc_init] mmc init success
----------------------------------
MMC Size : 8 GB
----------------------------------
reading boot-logo.bmp.gz
** Unable to read file boot-logo.bmp.gz **
reading boot-logo.bmp
** Unable to read file boot-logo.bmp **
movi: the partiton 'logo' is reading...

MMC read: dev # 0, block # 58976, count 4096 ... 4096 blocks read: OK
hpd_state=1
[CANVAS]addr=0x3f800000 width=3840, height=1440

set hdmitx VIC = 16
hdmitx phy setting done
set hdmitx VIC = 16
hdmitx phy setting done
Error: Bad gzipped data
There is no valid bmp file at the given address
Unknown command 'saveenv' - try 'help'
Net:   ## Error: Can't overwrite "ethaddr"
## Error inserting "ethaddr" variable, errno=1
Meson_Ethernet
Hit [Enter] key twice to stop autoboot:  0
reading boot.ini
7922 bytes read in 4 ms (1.9 MiB/s)
cfgload: applying boot.ini...
cfgload: setenv bootrootfs "boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2"
cfgload: setenv console "console=tty0"
cfgload: setenv video_output "1080p60hz"
cfgload: setenv video_mode   "hdmi"
cfgload: setenv video_bpp    "32"
cfgload: setenv hdmihotplug  "1"
cfgload: setenv hdmioutput   "1"
cfgload: setenv vpu          "1"
cfgload: setenv libreelec "quiet"
cfgload: setenv hdmi_cec "1"
cfgload: setenv audio_dac "0"
cfgload: setenv odroidp1 "no_console_suspend hdmimode=${video_output} m_bpp=${video_bpp} vout=${video_mode}"
cfgload: setenv odroidp2 "${disableuhs} consoleblank=0"
cfgload: setenv odroid   "${odroidp1} ${odroidp2}"
cfgload: setenv kernel  "fatload mmc 0:1 0x11000000 KERNEL"
cfgload: setenv dtb     "fatload mmc 0:1 0x1000000  meson64_odroidc2.dtb"
cfgload: setenv bootseq "booti 0x11000000 - 0x1000000"
cfgload: setenv timer   "fdt addr 0x1000000; fdt rm /timer"
cfgload: setenv bootcmd "${kernel}; ${dtb}; ${timer}; ${bootseq}"
cfgload: if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cec1f"; fi
cfgload: if test "${hdmi_hotplug}" = "0"; then setenv hpd "disablehpd=true"; fi
cfgload: if test "${audio_dac}" = "1"; then setenv dac "enabledac"; fi
cfgload: if test "${vpu}" = "0"; then fdt rm /mesonstream; fdt rm /vdec; fdt rm /ppmgr; fi
cfgload: if test "${hdmioutput}" = "0"; then fdt rm /mesonfb; fi
cfgload: setenv bootargs "${console} ${bootrootfs} ${odroid} ${cec} ${hpd} ${dac} ${libreelec}"
cfgload: run bootcmd
reading KERNEL
16443080 bytes read in 1058 ms (14.8 MiB/s)
reading meson64_odroidc2.dtb
28959 bytes read in 7 ms (3.9 MiB/s)
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
   Loading Device Tree to 000000001fff5000, end 000000001ffff11e ... OK

Starting kernel ...

uboot time: 4759646 us
second try - shutting C2 down:

Code: Select all

INFO:    PSCI Affinity Map:
INFO:      AffInst: Level 0, MPID 0x0, State ON
INFO:      AffInst: Level 0, MPID 0x1, State ON
INFO:      AffInst: Level 0, MPID 0x2, State ON
INFO:      AffInst: Level 0, MPID 0x3, State ON
ERprocess cCEC cfg:0x1f
set vddee to 0x0352mv
06f1932000000000
remote_cec_hw_reset
AO_DEBUG_REG0:0x0000001f, AO_DEBUG_REG1:0x00001000
AO_DEBUG_REG2:0x00000000, AO_DEBUG_REG3:0x00000001
cec_node_init cec_config:0x1f, log_addr:0x1, phy_addr:0x1000
cec_report_physical_address
 T: 1f 84 10 00 01
cec_device_vendor_id
 T: 1f 87 00 00 00
cec_set_osd_name initiator:0x0
 T: 10 47 4f 44 52 4f 49 44 2d 43 32
cec_tx_irq_handler tx_msg_status:0x1, tx_num_msg:0x0
cec_tx_irq_handler tx_msg_status:0x0, tx_num_msg:0x0
turning TV on:

Code: Select all

cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 80 00 00 10 00
cec_handle_message initiator:0x0, destination:0xf, opcode:0x80
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 80 00 00 10 00
cec_handle_message initiator:0x0, destination:0xf, opcode:0x80
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 82 00 00
cec_handle_message initiator:0x0, destination:0xf, opcode:0x82
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 82 00 00
cec_handle_message initiator:0x0, destination:0xf, opcode:0x82
cec_rx_irq_handler rx_msg_status:0x2, rx_num_msg:0x1
 R: 0f 80 00 00 10 00
cec_handle_message initiator:0x0, destination:0xf, opcode:0x80
=> tv shows "disconnecting from anynet"
=> choosing the right HDMI again (now its nameless!)
no uart output

User avatar
rooted
Posts: 8645
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 363 times
Contact:

Re: IR Remote: Suspend/Resume

Post by rooted »

For the record, my TV does the same thing with the stock HK android kernel.

Every time I turn the TV off and back on I will have to switch to a different input and back to the C2 because there will be no signal.

Occasionally CEC will still not function and the HDMI name will not say anything, I must go through the CEC menu of my TV and hit "Root Menu" or connect.

@Raybuntu

It's not your changes causing this as I have had this issue on the second android release, before any of your changes made it in. You should be looking at amlogic code

User avatar
wrxtasy
Posts: 1306
Joined: Wed May 13, 2015 1:59 pm
languages_spoken: english
ODROIDs: C1, C1+, C2, N2
Location: Australia
Has thanked: 4 times
Been thanked: 4 times
Contact:

Re: IR Remote: Suspend/Resume

Post by wrxtasy »

To stop cross posting and duplication, LibreELEC 7.1 test version is up with HardKernel's updated u-boot and Kwiboo's patches:
http://forum.odroid.com/viewtopic.php?f ... 89#p156789

Working pretty well for me, with minor boot.ini tweak :)
Kodi Hardware Guru

Kwiboo
Posts: 15
Joined: Mon Aug 08, 2016 10:27 am
languages_spoken: english, swedish
ODROIDs: C1+, C2
Has thanked: 0
Been thanked: 0
Contact:

Re: IR Remote: Suspend/Resume

Post by Kwiboo »

@andy5macht thanks again for the UART output.

Please update your boot.ini to use hdmitx=cec3f and test with this image: https://www.dropbox.com/s/k7ypod357huuc ... mg.gz?dl=0
It should now power-on when it sees a routing change message and boot.ini has hdmitx=cec3f

andy5macht
Posts: 244
Joined: Mon May 16, 2016 5:25 am
languages_spoken: english, german
ODROIDs: U3, C2, N2
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: IR Remote: Suspend/Resume

Post by andy5macht »

thanks Kwiboo - working fine now!

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 2 guests