Skip to content

chromium_ec: Fix reading EC console #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 26, 2025
Merged

chromium_ec: Fix reading EC console #106

merged 2 commits into from
Apr 26, 2025

Conversation

JohnAZoidberg
Copy link
Member

Now it can get all of the EC console buffer.
I see ~100 lines. Much more than the previous ~10 lines.

Follow also seems to properly work now.

A good way to force messages to appear on the console is to plug in or unplug a charger, or to close and open the lid.

TEST=framework_tool --console recent shows the same output as ectool console
TEST=framework_tool --console follow keeps properly refreshing endlessly.

Now it can get all of the EC console buffer.
I see ~100 lines. Much more than the previous ~10 lines.

Follow also seems to properly work now.

A good way to force messages to appear on the console is to plug in or
unplug a charger, or to close and open the lid.

TEST=`framework_tool --console recent` shows the same output as `ectool console`
TEST=`framework_tool --console follow` keeps properly refreshing
endlessly.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
@JohnAZoidberg
Copy link
Member Author

Awesome, framework_tool --console follow seems to work even through suspend:

PORT80: AA8F
PORT80: 3C00
[4023.169200 HC 0x00a9]
[4023.170900 HC 0x0023]
[4023.177400 KB Clear Buffer]
PORT80: 3F66
PORT80: 0DB5
PORT80: 3F34
PORT80: 3C08
PORT80: 0DB6
PORT80: 3054
PORT80: 3E05
PORT80: 0013
[4023.522400 power state 17 = S0->S0ix, in 0x000f]
[4023.525800 PH S0->S0ix]
[[4023.532000 Power saving enable]
4023.531300 Battery[4023.535500 PH S0S0ix->S0ix]
[4023.538000 power state 5 = S0ix, in 0x000f]
[4023.542000 PH S0ix]
 40% (Display 39.1 %) / 3h:37 to empty]
PORT80: 0026
[4023.804200 power state 5 = S0ix, in 0x000d]
[4023.807200 PH S0ix]
[4023.809200 power state 18 = S0ix->S3, in 0x000d]
[4023.813600 PH S0ixS3]
PORT80: 0021
[4023.901100 PH S0ixS0->S3]
[4023.902300 power state 3 = S3, in 0x0005]
[4039.531000 event set 0x0000000000001000]
[4039.534200 power state 3 = S3, in 0x0007]
[4039.538000 power state 19 = S3->S0ix, in 0x0007]
[4039.544000 PH S3->S0ix]
[4039.581500 PH S3S0ix->S0ix]
[4039.584700 power state 5 = S0ix, in 0x000f]
[4039.588400 PH S0ix]
PORT80: 0000
PORT80: 0100
PORT80: 0026
PORT80: 0008
PORT80: 000D
PORT80: 3F40
[4039.795100 PH S0ix]
[4039.795900 power state 16 = S0ix->S0, in 0x000f]
[4039.800200 PH S0ixS0]
[4039.804200 Power saving disable]
[4039.808300 PH S0ixS0->S0]
[4039.809700 power state 4 = S0, in 0x000f]
PORT80: 1001
PORT80: AA96

I haven't compared with hardware serial console but it seems all the log entries are there.

@JohnAZoidberg JohnAZoidberg self-assigned this Apr 24, 2025
@JohnAZoidberg
Copy link
Member Author

Awesome, framework_tool --console follow seems to work even through suspend:

Not on windows :( I have to rerun the command to get the logs from suspend.

BUG=`framework_tool --console recent` would hang and never return
because it's stuck in the loop
TEST=Make sure `framework_tool --console recent` can run properly on
windows and return >50 lines of log

Signed-off-by: Daniel Schaefer <dhs@frame.work>
@JohnAZoidberg JohnAZoidberg merged commit 2200639 into main Apr 26, 2025
6 checks passed
@JohnAZoidberg JohnAZoidberg deleted the ec-console branch April 26, 2025 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant