Skip to content
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

Power event 0x53 #29

Open
danielzgtg opened this issue Dec 29, 2019 · 6 comments
Open

Power event 0x53 #29

danielzgtg opened this issue Dec 29, 2019 · 6 comments
Labels
C: missing feature Missing feature that is confirmed working on Windows using the Surface Serial Hub (EC) device. D: Pro 7 Device: Pro 7 P: low Priority: Low priority

Comments

@danielzgtg
Copy link

On my Surface Pro 7, dmesg is flooded with the following lines:

surface_sam_sid_power: power event (cid = 0x53)
surface_sam_sid_power: unhandled power event (cid = 0x53)
@fxgsell
Copy link
Contributor

fxgsell commented Dec 30, 2019

I also see a handful of those on the Laptop3.

@archseer
Copy link
Member

We think it might be equivalent to

0x4f 0x00 0x01 yes DPTF notification (?) log(+dsdt)
on gen7 (Surface Pro 7, Surface Laptop 3)

I have a raw dump of the event, but we weren't quite able to figure out the payload:

surface_sam_ssh serial0-0: recv: received buffer (size: 39)
recv: 00000000: aa 55 80 1d 00 ab 4b 5c 80 02 00 01 01 02 00 53
recv: 00000010: 01 ba 85 01 00 86 23 01 00 65 00 21 1d 00 00 00
recv: 00000020: 00 c8 32 00 00 55 e1
surface_sam: power event (cid = 0x53)
surface_sam: unhandled power event (cid = 0x53)

@qzed qzed added C: missing feature Missing feature that is confirmed working on Windows using the Surface Serial Hub (EC) device. D: Laptop 3 D: Pro 7 Device: Pro 7 P: low Priority: Low priority and removed D: Laptop 3 labels Dec 31, 2019
@qzed
Copy link
Member

qzed commented Apr 22, 2020

Based on some reverse-engineering, the payload has the form 8bit (unused), 32bit, 32bit, 16bit, 16bit, 32bit, 32bit. Converted to integers, this yields 1, 99770, 74630, 101, 7457, 0, 13000.

@archseer: Do you see any connection to other battery values?

@archseer
Copy link
Member

@qzed I went and recorded some more event values. This time I logged only the pld buffer value:

https://gist.github.com/archseer/dc3b41a378083a6d2a6205bf1d4f8d6c

Sidenote: I seem to have gotten a few warnings on surface_sam_ssh, but I think that's during me live reloading the module:

event: unhandled event (rqid: 0015)
event: unhandled event (rqid: 0015)
event: unhandled event (rqid: 0015)

@qzed
Copy link
Member

qzed commented Apr 22, 2020

Here's that decoded into numbers:

[(1, 108360, 76500, 99, 7479, 0, 13000),
 (1, 107340, 76260, 99, 7438, 0, 13000),
 (1, 108460, 76520, 99, 7414, 0, 13000),
 (1, 109480, 76760, 99, 7671, 60000, 13000),
 (1, 110500, 77000, 99, 7686, 60000, 13000),
 (1, 111730, 77290, 99, 7706, 60000, 13000),
 (1, 112750, 77530, 99, 7735, 60000, 13000),
 (1, 113760, 77770, 99, 7766, 60000, 13000)]

So looks like the 6th value has to do something with charging... Could that be a 60W charger? I think the 5th could maybe be voltage (in mV). The first value could be a status thing. As far as I can see this gets ignored in the Windows driver. I suppose you don't have any clue what TpUpdate means either?

@qzed
Copy link
Member

qzed commented Apr 24, 2020

Oh, I forgot to answer to the 0x0015 events during reloading: Those are input events (TC=0x15). They should normally get disabled when the sid_vhf module is unloaded. I suspect that those are handled a bit differently and cannot actually be disabled, which would kind-of make sense given their nature. So nothing we need to worry about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: missing feature Missing feature that is confirmed working on Windows using the Surface Serial Hub (EC) device. D: Pro 7 Device: Pro 7 P: low Priority: Low priority
Projects
None yet
Development

No branches or pull requests

4 participants