CEC Wakeup Problem

fyi: that image does change the wakeup behaviour, and the title of this thread is “cec wakeup problems”. i also see no posting from you. could it be that you are in the wrong thread?

1 Like

Thx for this correction, but the changes are only kernel related, not bootloader (bl301)
But maybe if the CEC connection is now working in Kodi the wake up will work too as the bootloader take over the CEC connection done by the kernel before. I will need to check it as I don’t remember it :wink:

no, wakeup still does not work. it behaves now exactly as i started this thread. it was bad when i had to change the input source multiple times. this problem seems to be fixed now. the odroid wakes up when i switch the source one time. so something is still broken, but there is now a good workaround available (at least for me)

edit: i was too fast. i have running now devel-1570018126 and hat to switch about 10 times the input from “game” -> “tv” -> “game” to wakeup the odroid.

1 Like

When nobody is providing UART logs of the suspended device & wake up we can’t help.

can you tell me how i can provide those logs? do i need special hardware? or does this somehow work with software too?

Have ordered from AliExpress.

Is there a link somewhere on how to actually capture these logs please?

1 Like

When you connect the adapter to your PC, you will have a new COM port in device manager.
Then you can use PuTTY to connect to this COM port, and that way you will be able to get the UART log.

Ok, guess I will have to try it out and take it from there. Bit of a wait for the adapter from AliExpress though (2-3 weeks).

Did a quick google - Putty has a log to file option etc. I get it now - Putty will display the incoming serial data etc which is what i need to capture.


i also just ordered the usb uart kit. i can pick it up in 10 days. i will try to provide those logs too.

1 Like

got my uart controller, laptop is just updating to fedora 30. will provide the first logs tomorrow. time depends how long the party goes tonight :slight_smile:

i connected now with the UART cable/adapter on /dev/ttyUSB0 to the odroid n2, but i just get a regular shell. Can you tell me how i can now get those logs which are required?

You connect the USB side to your computer, and the “pins” side to the UART pins on the N2.

thats already done. i connected with the screen command on /dev/ttyUSB0 (that has been created by the kernel after connecting the usb cable/adapter from the laptop to the odroid uart port/pins).

i need the command now which i have to enter on the laptop to get those logs

Reboot the Odroid, and you’ll see the logs.
Then you can right click in PuTTy on the title and copy history to export it all.

thanks, i thought i have to enter some special command.
i tried now some time to get a good output, but seems like thats an impossible task.
with putty, i can not copy/paste. also, putty pretty hard destroys the output, parts are missing, stops somewhere in the middle of the output, etc.
with the screen command, i get the output but i dont know how to increase the buffer size, so i can only copy the last screen which i can see. here it is:

hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

Hit Enter or space or Ctrl+C key to stop autoboot -- :  0
card out
reading boot.ini
2303 bytes read in 2 ms (1.1 MiB/s)
cfgload: applying boot.ini...
cfgload: setenv bootlabel "CoreELEC"
cfgload: setenv max_freq_a73 "1800"
cfgload: setenv max_freq_a53 "1896"
cfgload: setenv hdmi_cec "1"
cfgload: setenv remotewakeup "0x23dc4db2"
cfgload: setenv decode_type "0"
cfgload: setenv remotewakeupmask "0xffffffff"
cfgload: setenv wol "1"
cfgload: setenv heartbeat "1"
cfgload: setenv emmc_timeout "0"
cfgload: setenv coreelec "quiet"
cfgload: setenv rootopt "BOOT_IMAGE=kernel.img boot=UUID=1407-2414 disk=UUID=15e065ec-c355-4c2f-a523-78e27026bb0c"
cfgload: setenv consoleopt "console=ttyS0,115200 console=tty0 no_console_suspend"
cfgload: setenv displayopt "hdmimode=1080p60hz logo=osd0,loaded,0x3d800000"
cfgload: setenv loadaddr 0x11000000
cfgload: setenv dtb_mem_adn setenv cec "hdmitx=cec3f"; fi
cfgload: if test "${emmc_timeoucfgload: if test "${usbpower}" != ""; then setenv usbpower "enable_system_power=${usbpower}"; fi
cfgload: if test "${modeline}" != ""; then setenv cmode "modeline=${modeline}"; fi
cfgload: setenv initargs "${rootopt} ${consoleopt} max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} enable_wol=${wol} ${cec} ${irOK
dt memory region: addr=1000000 size=12000
   Loading Ramdisk to 3d36e000, end 3d7ff600 ... OK
   Loading Device Tree to 00000000d3ed2000, end 00000000d3ee622f ... OK
fdt_fixup_memory_banks, reg:0000000000000000

Starting kernel ...

uboot time: 6775743 us
[    0.000000@0] OF: reserved mem: invalid size property in 'linux,galcore' node.
[    0.331232@1] codec_mm_module_init
[    0.338642@0] clkmsr ffd18004.meson_clk_msr: failed to get msr ring reg0
[    0.354721@0] cvbs_out: chrdev devno 264241152 for disp
[    0.494357@2] dmi: Firmware registration failed.
[    0.565988@2] meson-pwm ff802000.pwm: pwm pinmux : can't get pinctrl
[    0.566230@2] meson-pwm ffd1b000.pwm: pwm pinmux : can't get[    0.805025@0] cectx ff80023c.aocec: cec driver date:Ver 2019/

Pinging @Portisch

U booting normal to CE and do whatever you do. Be sure CEC remote is working in Kodi.
Open the UART terminal and hit enter. It should show the CoreELEC UART promt.
Enter journalctl -f. This should show live all dmesg messages on UART.

Then power off your system the way you do it every time.

Then the UART will show some output without a “time” in front. This is the bl301 stuff. And the N2 should now waiting for wake up.

Try to wake up by CEC like you do every time.
This log would be needed, starting at power off till the N2 woke up again.

yep, that worked.

I put the N2 to sleep mode (power off the tv), then i powered on the tv and recieved this:

cec R: 01
cec R: 5f 87 00 06 78
cec R: 5f 87 00 06 78
cec R: 5f a7 00 00
cec R: 5f 85
cec R: 0f 82 00 00
cec R: 0f 87 00 e0 91
cec R: 0f 87 00 e0 91
cec R: 0f 87 00 e0 91
cec R: 01

I would have expected, this powers up the n2, but it did not.

I switched then the input from the AVR to another port and back to “game” (where the n2 is connected to) and got this:

cec R: 0f 87 00 e0 91
cec R: 0f 87 00 e0 91
cec R: 01
Enter ddr resume

ddr resume time: 121us

store restore gp0 pll

cfg15 83b01000 

cfg15 83b01000 

Little core clk resume rate 1896000000

Big core clk resume rate 24000000


:13 CoreELEC kernel: early_suspend: usb_early_suspend
Oct 21 18 early suspend! is_mount=0
Oct 21 18:00:13 CoreELEC kernel: early_suspend: done
Oct 21 18:00:13 CoreELEC kernel: Freezing usernd of devices complete after 0.431 msecs
Oct 21 18:00:13 CoreELEC kernel: PM: noirq suspend of devices complete after 0.743 msecs
Oct 21 18:00:13 CoreELEC kernel: Disabling non-boot CPUs ...
Oct 21 18:00:13 CoreELEC kernel: CPU1: shutdown
Oct 21 18:00:/storage/.config/scripts/load_epgguide
Oct 21 18:00:55 CoreELECond[3659]: saving to '/storage/.config/scripts/guide.gz'
Oct 21 CoreELEC crond[3659]: '/storage/.config/scripts/guide.gz' saved

that woke up the n2. at the moment, that is my workaround to get the n2 up and running - switching the inputs from the AVR.

i am still unable to copy/paste from those wierd screens with the usb/serial connection, but with puttys logging feature i can provide now all logs you need :slight_smile:

Thx for the log, I will have a look as soon as possible.

1 Like

I just took a look to the source and 0f 82 00 00 should wake up the N2.
It looks like a libCEC and/or kernel issue. When I have more time I will upload a test version.