Cosmos icon indicating copy to clipboard operation
Cosmos copied to clipboard

Add proper ACPI support

Open 9xbt opened this issue 2 years ago • 18 comments

I want to detect when the user presses the phisical power button on the PC and save unsaved progress to disk and then shut down and it seems like that feature is not implemented. Can Cosmos devs implement it? Thanks

9xbt avatar Dec 11 '22 13:12 9xbt

https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.Core/ACPI.cs

zarlo avatar Dec 12 '22 01:12 zarlo

is it possible to detect cosmos running on laptop and read battery status (charging, discharging, percentage). i think it is possible to implement

AsertCreator avatar Dec 12 '22 04:12 AsertCreator

yes that can be implemented

zarlo avatar Dec 12 '22 04:12 zarlo

i would wait for https://github.com/CosmosOS/Cosmos/pull/2288 but

zarlo avatar Dec 12 '22 04:12 zarlo

is it possible to detect cosmos running on laptop and read battery status (charging, discharging, percentage). i think it is possible to implement

That would be cool

g10v4nn1-v avatar Dec 12 '22 14:12 g10v4nn1-v

okay yeah nice but how can i detect when the pc wants to shut down @zarlo

9xbt avatar Dec 15 '22 14:12 9xbt

oh i know! we need to override power functions. better rewrite entire power class with ability to stop shutdown/restart

AsertCreator avatar Dec 16 '22 07:12 AsertCreator

but i dont know if we can detect acpi button rn

AsertCreator avatar Dec 16 '22 07:12 AsertCreator

okay

9xbt avatar Dec 16 '22 14:12 9xbt

Basic ACPI support already existed for a long time, however we need an ACPI interrupter and to handle the SCI.

MishaTy avatar Dec 19 '22 18:12 MishaTy

Is this fixed @MishaTy ?

9xbt avatar Oct 09 '23 08:10 9xbt

Nope, still need to figure out how to port LAI correctly as my port has stack issues

MishaProductions avatar Oct 09 '23 19:10 MishaProductions

ACPI has functions like detect cpu temp, standby, get oem, etc. but, rsdt has fadt, we can use usb mouse or keyboard?

ADev531 avatar Oct 27 '23 22:10 ADev531

we can use usb mouse or keyboard?

it will help us make drivers for it as it will give use access to better timers

zarlo avatar Oct 27 '23 22:10 zarlo

Is there an updates?

ADev531 avatar Dec 06 '23 07:12 ADev531

Is there an updates?

Yes LAI is being ported to Cosmos by @MishaProductions

image

valentinbreiz avatar Dec 06 '23 08:12 valentinbreiz

is there update again? its going great, i think

ADev531 avatar Jan 28 '24 23:01 ADev531