acpi

Instant power off programmatically?

被刻印的时光 ゝ 提交于 2019-12-06 13:26:29
Under Windows XP Pro in a networked environment such that Ctrl+Alt+Del gives you the Windows Security prompt, if you hold Ctrl and click shutdown it triggers an Emergency Shutdown. This appears to turn off the system so fast it doesn't even what for processes to finish, i.e. almost as if you just pulled the power/long-held the power button. I am wondering by what process Windows achieves such a quick shutdown - is it instructing the BIOS directly via ACPI/APM to power down the system? If so, how could this be achieved programatically in any language? This can be accomplished on *nix systems by

How do I call ACPI control methods from C++ or C# on Windows?

醉酒当歌 提交于 2019-12-05 18:04:02
问题 I'm getting tired of waiting for HP to fix the switchable graphics driver for my laptop, but I think I can switch GPUs myself by calling ACPI methods. The switching works using vga_switcheroo in Linux, which is open source, so I know what methods I need to call, but not how to call them. The two methods I need to call are in the SSDT namespace, if that matters, and I also need to pass integer arguments. 回答1: Some links on similar problems (For example) say that this is possible only from

IOMMU initialization without BIOS support

元气小坏坏 提交于 2019-12-05 02:04:05
NOTE : if you have an AMD A55 chipset on a motherboard that support IOMMU, please send me a copy of your /sys/firmware/acpi/tables/DMAR (or whatever the name is that describes IOMMU). There is no risk of any sort for you. Thanks! Most motherboard manufacturers don't bother releasing IOMMU enabled BIOS (no option in the BIOS). My undesranding of this document from AMD is that the BIOS initializes the IOMMU by adding ACPI tables. So if I can get a dump of the ACPI tables (acpidump/acpiextract) from a system with a different motherboard but the same chipset that supports IOMMU, would it be

Configure Linux to Suspend to Disk on ACPI G2 Soft Off — so Google Compute Engine can suspend and restore preemptible machine via disk

怎甘沉沦 提交于 2019-12-04 12:26:30
问题 Google Compute Engine rents all size Linux VMs from 1 core to 64 cores at various prices. There are "preempt-able" instances for about 1/4 the price of guaranteed instances, but the the preempt-able instances can be terminated at any time (with an ACPI G2 soft off warning and ~ 30 secs until hard cutoff). Although you can provide a startup and shutdown script, the usual approach seems to lead to the unnecessary overhead of having to then create additional software to allow calculations to be

Shutdown computer in MS-DOS using ACPI

假如想象 提交于 2019-12-04 04:45:22
I have MS-DOS 6.22 running on a Pentium based computer (motherboard supports ACPI), and would like to know if there was an assembly language routine I could use to shut down the computer, or is it a little harder than that (i.e. motherboard specific)? Basically, I want to create a small program to shut down the computer from the command line. Colin Pickard Here is an example of a tool written specifically for this: http://www.plop.at/en/dostoolsdl.html The source code can be found here: http://download.plop.at/files/SHUTDOWN.ASM ;*****************************; ; ; ; Code by BiTByte ; ; [Elmar

How do I call ACPI control methods from C++ or C# on Windows?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 02:28:07
I'm getting tired of waiting for HP to fix the switchable graphics driver for my laptop, but I think I can switch GPUs myself by calling ACPI methods. The switching works using vga_switcheroo in Linux, which is open source, so I know what methods I need to call, but not how to call them. The two methods I need to call are in the SSDT namespace, if that matters, and I also need to pass integer arguments. Some links on similar problems ( For example ) say that this is possible only from kernel-mode driver under Windows. So to accomplish this I can think only of the following options: Writing

Configure Linux to Suspend to Disk on ACPI G2 Soft Off — so Google Compute Engine can suspend and restore preemptible machine via disk

时光怂恿深爱的人放手 提交于 2019-12-03 07:57:57
Google Compute Engine rents all size Linux VMs from 1 core to 64 cores at various prices. There are "preempt-able" instances for about 1/4 the price of guaranteed instances, but the the preempt-able instances can be terminated at any time (with an ACPI G2 soft off warning and ~ 30 secs until hard cutoff). Although you can provide a startup and shutdown script, the usual approach seems to lead to the unnecessary overhead of having to then create additional software to allow calculations to be interrupted, and to manage partial results of calculations whereas the suspend-to-disk/restore-from

How can I obtain battery level inside a Linux kernel module?

梦想与她 提交于 2019-11-30 11:50:15
I am trying to get the battery level inside a Linux kernel module (the module is inserted via modprobe). I would ideally like to use a kernel API call to get the battery information. I have searched on the web for solutions, and I have also explored Linux kernel source and the source of program "acpi" by Michael Meskes for ideas. These are some of the techniques I think I can use: Read and parse /proc/acpi/battery/BAT0/state and /proc/acpi/battery/BAT0/info Read from /sys/class/power_supply/BAT0/charge_now and charge_full with no parsing involved. I could try using the calls from Linux kernel

How can I obtain battery level inside a Linux kernel module?

戏子无情 提交于 2019-11-29 17:09:53
问题 I am trying to get the battery level inside a Linux kernel module (the module is inserted via modprobe). I would ideally like to use a kernel API call to get the battery information. I have searched on the web for solutions, and I have also explored Linux kernel source and the source of program "acpi" by Michael Meskes for ideas. These are some of the techniques I think I can use: Read and parse /proc/acpi/battery/BAT0/state and /proc/acpi/battery/BAT0/info Read from /sys/class/power_supply

How to reboot in x86 assembly from 16 bit real mode?

天大地大妈咪最大 提交于 2019-11-29 16:35:39
APM shutdown has been covered at X86 instructions to power off computer in real mode? How to reboot instead of shutting down the computer? Please quote and explain the relevant documentation / standard in your answer. I've understood that APM and ACPI are the two main methods, and I'm interested in both. Let me know if there are others. I have found the ACPI spec is at http://uefi.org/specifications but it's taking too much brainpower to parse it that I found it worthy of a question. I could not find the URL for the APM spec, only a Google cache of a Microsoft RTF here . If you need a way to