ACPI and FreeBSD (Part 2)

Nate Lawson
Nate LawsonEngineer at Root Labs
ACPI and FreeBSD
   Part 2 (user guide)


Nate Lawson
nate@root.org


Bay Area FreeBSD Users’ Group
September 6, 2006
Overview

• ACPI feature description
   –   Configuration and device discovery
   –   CPU power
   –   Thermal
   –   Video
   –   Docking stations
   –   Hotkeys and proprietary features
• FreeBSD ACPI (see man page)
   – Supported features
   – How to use/configure them
• How you can help
Device discovery

• ACPI handles discovery of devices that have no probe
  capability
   – Legacy keyboard/mouse
   – Serial, parallel, IRDA
   – Also provides standard drivers for some of these
       • SMI-activated special features (i.e. hotkeys)
       • Embedded controller
       • Batteries (SMBUS or EC-based access)
• ACPI provides additional features for standard devices
   – PCI locality and hotplug
   – ATA register data
FreeBSD Discovery
• Disable probing specific namespaces
   –                      (tunable)
       debug.acpi.avoid=“ISAB”
   – Not necessary as probing rarely causes problems by itself these
     days
• Disable a specific device (not ACPI-specific)
   –                                (tunable)
       hint.acpi_thermal.0.disabled=“1”
   – “APIC” most likely to cause problems outside of ACPI itself
        • Has some unknown problems with suspend/resume
        • As a side effect, disables SMP which sometimes interacts badly
          with ACPI
• Desired features
   – General mechanism for wiring device nodes to unit numbers
     (jhb, imp)
   – Support for hotplug PCI, large system locality, PCI Express
CPU Power

• CPU frequency/voltage
   – Save power while CPU is doing something
   – Absolute value: SpeedStep, PowerNow!, LongHaul
   – Relative value (% of absolute): acpi_throttle, TM2, nVidia
• Idle power states (C1 - Cn)
   – Save power while CPU is idle
   – Higher Cx numbers mean
       • More power savings but…
       • Longer time to transition (less responsive)
   – C1: same as HLT instruction
   – C2: clocks stopped, bus snooped
   – C3(+): clocks stopped, bus not snooped
FreeBSD CPU Power
• CPU frequency/voltage
   – Many drivers in 2 separate modules: acpi(4) and cpufreq(4)
   – Drivers cooperate with central framework (but aren’t dependent on each
     other) so just load both
   – Real-time management via powerd(8) or sysctl dev.cpu.0.freq=733
   – Disable acpi_throttle or p4tcc if experiencing hangs
• Idle power states (C1 - Cn)
   – Use sysctl hw.acpi.cpu.cx_lowest=“C3” or better,
     {performance,economy}_cx_state=“LOW” in rc.conf (see
     defaults/rc.conf)
   – C3 causes problems if APIC is enabled (timers stop, system hangs)
• Desired features
   – Better SMP Cx support
   – Dynamic detection of changes in available Cx states
Thermal

• Each fan or area of thermal control has a zone
• Zones offer settings and temperature monitoring
• System automatically selects, based on ACPI data
   – Cooling levels (i.e. fan speed)
   – Passive cooling (i.e. CPU slowdown or powering off devices)
   – Shutdown or suspend on critical temperatures
FreeBSD Thermal

• Manually turn on a fan
   –                              (sysctl)
       hw.acpi.thermal.tz0.active=“1”

   – Better to let system manage it
• If cpufreq driver(s) attached, passive cooling will
  automatically be engaged by acpi_thermal
Video

• Detection and control of which displays are active
• Example: enable TV out for projecting a talk
• Ambient light detection (dim automatically when in the
  dark)
• Auto color correction as display levels dimmed
• Most features standardized but moving to proprietary
  drivers (see later slides)
FreeBSD Video

• Load acpi_video(4)
• Enable a TV output
   –   hw.acpi.video.tv.active=“1”   (sysctl)
• Change the brightness
   –   hw.acpi.video.lcd.brightness=“7”   (sysctl)
• Desired features
   – Integrated support for DPMS for suspend/resume (jhb patch)
   – Ambient light, color correction, and other ACPI 3.0 features
Docking stations

• ACPI generates notifications when a docking station is
  attached
• It also provides a new namespace for drivers to evaluate
• Docking stations are offering a lot of features
   – Embedded PCI, floppy, printer ports
   – Motorized docking/lock mechanism
FreeBSD Docking

• Load acpi_dock(4)
• Undock a system (pressing “undock” button on dock ok
  too)
   –   dev.acpi_dock.0.status=“0”   (sysctl)
• Desired features
   – Dynamic probe of other device trees, not just dock
   – More testing
Hotkeys/proprietary devices

• Each manufacturer often has a proprietary driver for
  hotkeys, LEDs, built-in speaker volume, etc.
• Usually export system info/control via proprietary ACPI
  device nodes
   – Get current value of settings
   – Set new value
   – Get notify interrupt when an event happens (i.e. key pressed)
• Information on operation obtained through reverse
  engineering
   – “Poke it and see what happens!”
FreeBSD Hotkeys
• Load one of acpi_asus(4), acpi_ibm(4),
  acpi_panasonic(4), acpi_sony(4), etc.
• Read man page for specific info
• Hook a hotkey to an action via devd(8) (see
  /etc/devd.conf for examples)
   – Turn up volume when “volume up” hotkey pressed
• Control an LED via led(4)
   – Turn on your email light when notified by biff(1)
• Desired features
   – More support for various laptops
   – Generic hotkey script that aggregates generic codes (“volume
     up”) and performs actions
Conclusion

• Many ACPI functions are well-supported in
  FreeBSD
• Suspend/resume needs most urgent work
  – Video drivers especially problematic
  – Requires device-by-device audit
• Most ACPI functions are automatic, but with
  some tweaking you can save even more power

• Questions? nate@root.org
1 of 15

Recommended

ACPI and FreeBSD (Part 1) by
ACPI and FreeBSD (Part 1)ACPI and FreeBSD (Part 1)
ACPI and FreeBSD (Part 1)Nate Lawson
1.6K views16 slides
Project ACRN USB mediator introduction by
Project ACRN USB mediator introductionProject ACRN USB mediator introduction
Project ACRN USB mediator introductionProject ACRN
61 views15 slides
Linux Audio Drivers. ALSA by
Linux Audio Drivers. ALSALinux Audio Drivers. ALSA
Linux Audio Drivers. ALSAGlobalLogic Ukraine
3.8K views24 slides
QEMU and Raspberry Pi. Instant Embedded Development by
QEMU and Raspberry Pi. Instant Embedded DevelopmentQEMU and Raspberry Pi. Instant Embedded Development
QEMU and Raspberry Pi. Instant Embedded DevelopmentGlobalLogic Ukraine
6.9K views22 slides
Nvidia tegra K1 Presentation by
Nvidia tegra K1 PresentationNvidia tegra K1 Presentation
Nvidia tegra K1 PresentationANURAG SEKHSARIA
696 views66 slides
Project ACRN Device Passthrough Introduction by
Project ACRN Device Passthrough IntroductionProject ACRN Device Passthrough Introduction
Project ACRN Device Passthrough IntroductionProject ACRN
155 views17 slides

More Related Content

What's hot

Useful USB Gadgets on Linux by
Useful USB Gadgets on LinuxUseful USB Gadgets on Linux
Useful USB Gadgets on LinuxGary Bisson
2.4K views35 slides
Linux Device Driver parallelism using SMP and Kernel Pre-emption by
Linux Device Driver parallelism using SMP and Kernel Pre-emptionLinux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emptionHemanth Venkatesh
2.5K views24 slides
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203 by
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203Linaro
1.5K views33 slides
Linux Usb overview by
Linux Usb  overviewLinux Usb  overview
Linux Usb overviewSatyam Sharma
737 views28 slides
Redteaming HID attacks by
Redteaming HID attacksRedteaming HID attacks
Redteaming HID attacksJuan Espin
764 views25 slides
Kernel Features for Reducing Power Consumption on Embedded Devices by
Kernel Features for Reducing Power Consumption on Embedded DevicesKernel Features for Reducing Power Consumption on Embedded Devices
Kernel Features for Reducing Power Consumption on Embedded DevicesRyo Jin
3.7K views42 slides

What's hot(20)

Useful USB Gadgets on Linux by Gary Bisson
Useful USB Gadgets on LinuxUseful USB Gadgets on Linux
Useful USB Gadgets on Linux
Gary Bisson2.4K views
Linux Device Driver parallelism using SMP and Kernel Pre-emption by Hemanth Venkatesh
Linux Device Driver parallelism using SMP and Kernel Pre-emptionLinux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emption
Hemanth Venkatesh2.5K views
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203 by Linaro
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Linaro1.5K views
Redteaming HID attacks by Juan Espin
Redteaming HID attacksRedteaming HID attacks
Redteaming HID attacks
Juan Espin764 views
Kernel Features for Reducing Power Consumption on Embedded Devices by Ryo Jin
Kernel Features for Reducing Power Consumption on Embedded DevicesKernel Features for Reducing Power Consumption on Embedded Devices
Kernel Features for Reducing Power Consumption on Embedded Devices
Ryo Jin3.7K views
BKK16-317 How to generate power models for EAS and IPA by Linaro
BKK16-317 How to generate power models for EAS and IPABKK16-317 How to generate power models for EAS and IPA
BKK16-317 How to generate power models for EAS and IPA
Linaro994 views
SR-IOV: The Key Enabling Technology for Fully Virtualized HPC Clusters by Glenn K. Lockwood
SR-IOV: The Key Enabling Technology for Fully Virtualized HPC ClustersSR-IOV: The Key Enabling Technology for Fully Virtualized HPC Clusters
SR-IOV: The Key Enabling Technology for Fully Virtualized HPC Clusters
Project ACRN Yocto Project meta-acrn layer introduction by Project ACRN
Project ACRN Yocto Project meta-acrn layer introductionProject ACRN Yocto Project meta-acrn layer introduction
Project ACRN Yocto Project meta-acrn layer introduction
Project ACRN100 views
Note - (EDK2) Acpi Tables Compile and Install by boyw165
Note - (EDK2) Acpi Tables Compile and InstallNote - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and Install
boyw1652.1K views
Q2.12: Idling ARMs in a busy world: Linux Power Management for ARM Multiclust... by Linaro
Q2.12: Idling ARMs in a busy world: Linux Power Management for ARM Multiclust...Q2.12: Idling ARMs in a busy world: Linux Power Management for ARM Multiclust...
Q2.12: Idling ARMs in a busy world: Linux Power Management for ARM Multiclust...
Linaro3.4K views
Debugging linux kernel tools and techniques by Satpal Parmar
Debugging linux kernel tools and  techniquesDebugging linux kernel tools and  techniques
Debugging linux kernel tools and techniques
Satpal Parmar9.1K views
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction by Project ACRN
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introductionACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
Project ACRN91 views
ACRN vMeet-Up EU 2021 - hypervisor new platform enabling by Project ACRN
ACRN vMeet-Up EU 2021 - hypervisor new platform enablingACRN vMeet-Up EU 2021 - hypervisor new platform enabling
ACRN vMeet-Up EU 2021 - hypervisor new platform enabling
Project ACRN63 views
Nvidia’s tegra line of processors for mobile devices2 2 by Sukul Yarraguntla
Nvidia’s tegra line of processors for mobile devices2 2Nvidia’s tegra line of processors for mobile devices2 2
Nvidia’s tegra line of processors for mobile devices2 2
Sukul Yarraguntla1.1K views
Translation Cache Policies for Dynamic Binary Translation by Saber Ferjani
Translation Cache Policies for Dynamic Binary TranslationTranslation Cache Policies for Dynamic Binary Translation
Translation Cache Policies for Dynamic Binary Translation
Saber Ferjani523 views
ACRN vMeet-Up EU 2021 - Bridging Orchestrator and Hard Realtime Workload Cons... by Project ACRN
ACRN vMeet-Up EU 2021 - Bridging Orchestrator and Hard Realtime Workload Cons...ACRN vMeet-Up EU 2021 - Bridging Orchestrator and Hard Realtime Workload Cons...
ACRN vMeet-Up EU 2021 - Bridging Orchestrator and Hard Realtime Workload Cons...
Project ACRN95 views
Trusted firmware deep_dive_v1.0_ by Linaro
Trusted firmware deep_dive_v1.0_Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_
Linaro10K views
Rtos ameba by Jou Neo
Rtos amebaRtos ameba
Rtos ameba
Jou Neo1.1K views

Viewers also liked

Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004) by
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)Nate Lawson
862 views30 slides
Foundations of Platform Security by
Foundations of Platform SecurityFoundations of Platform Security
Foundations of Platform SecurityNate Lawson
830 views22 slides
Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007) by
Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)
Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)Nate Lawson
3K views30 slides
When Crypto Attacks! (Yahoo 2009) by
When Crypto Attacks! (Yahoo 2009)When Crypto Attacks! (Yahoo 2009)
When Crypto Attacks! (Yahoo 2009)Nate Lawson
3K views26 slides
Crypto Strikes Back! (Google 2009) by
Crypto Strikes Back! (Google 2009)Crypto Strikes Back! (Google 2009)
Crypto Strikes Back! (Google 2009)Nate Lawson
3.7K views33 slides
Highway to Hell: Hacking Toll Systems (Blackhat 2008) by
Highway to Hell: Hacking Toll Systems (Blackhat 2008)Highway to Hell: Hacking Toll Systems (Blackhat 2008)
Highway to Hell: Hacking Toll Systems (Blackhat 2008)Nate Lawson
3.1K views44 slides

Viewers also liked(12)

Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004) by Nate Lawson
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)
Nate Lawson862 views
Foundations of Platform Security by Nate Lawson
Foundations of Platform SecurityFoundations of Platform Security
Foundations of Platform Security
Nate Lawson830 views
Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007) by Nate Lawson
Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)
Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)
Nate Lawson3K views
When Crypto Attacks! (Yahoo 2009) by Nate Lawson
When Crypto Attacks! (Yahoo 2009)When Crypto Attacks! (Yahoo 2009)
When Crypto Attacks! (Yahoo 2009)
Nate Lawson3K views
Crypto Strikes Back! (Google 2009) by Nate Lawson
Crypto Strikes Back! (Google 2009)Crypto Strikes Back! (Google 2009)
Crypto Strikes Back! (Google 2009)
Nate Lawson3.7K views
Highway to Hell: Hacking Toll Systems (Blackhat 2008) by Nate Lawson
Highway to Hell: Hacking Toll Systems (Blackhat 2008)Highway to Hell: Hacking Toll Systems (Blackhat 2008)
Highway to Hell: Hacking Toll Systems (Blackhat 2008)
Nate Lawson3.1K views
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007) by Nate Lawson
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Nate Lawson1.8K views
Designing and Attacking DRM (RSA 2008) by Nate Lawson
Designing and Attacking DRM (RSA 2008)Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)
Nate Lawson3.5K views
TLS Optimization by Nate Lawson
TLS OptimizationTLS Optimization
TLS Optimization
Nate Lawson7.7K views
TLS/SSL MAC security flaw by Nate Lawson
TLS/SSL MAC security flawTLS/SSL MAC security flaw
TLS/SSL MAC security flaw
Nate Lawson1.5K views
TLS/SSL Protocol Design 201006 by Nate Lawson
TLS/SSL Protocol Design 201006TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006
Nate Lawson3K views
TLS/SSL Protocol Design by Nate Lawson
TLS/SSL Protocol DesignTLS/SSL Protocol Design
TLS/SSL Protocol Design
Nate Lawson8.4K views

Similar to ACPI and FreeBSD (Part 2)

XS Boston 2008 Self IO Emulation by
XS Boston 2008 Self IO EmulationXS Boston 2008 Self IO Emulation
XS Boston 2008 Self IO EmulationThe Linux Foundation
783 views25 slides
Advanced Diagnostics 2 by
Advanced Diagnostics 2Advanced Diagnostics 2
Advanced Diagnostics 2Aero Plane
1.9K views45 slides
Когда предрелизный не только софт by
Когда предрелизный не только софтКогда предрелизный не только софт
Когда предрелизный не только софтCEE-SEC(R)
236 views36 slides
Evergreen Sysadmin Survival Skills by
Evergreen Sysadmin Survival SkillsEvergreen Sysadmin Survival Skills
Evergreen Sysadmin Survival SkillsEvergreen ILS
1.9K views33 slides
TMSLF2407 DSP Controller by
TMSLF2407 DSP ControllerTMSLF2407 DSP Controller
TMSLF2407 DSP ControllerANIRUDDHMAINI1
327 views53 slides
ACPI Debugging from Linux Kernel by
ACPI Debugging from Linux KernelACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelSUSE Labs Taipei
4.7K views63 slides

Similar to ACPI and FreeBSD (Part 2)(20)

Advanced Diagnostics 2 by Aero Plane
Advanced Diagnostics 2Advanced Diagnostics 2
Advanced Diagnostics 2
Aero Plane1.9K views
Когда предрелизный не только софт by CEE-SEC(R)
Когда предрелизный не только софтКогда предрелизный не только софт
Когда предрелизный не только софт
CEE-SEC(R)236 views
Evergreen Sysadmin Survival Skills by Evergreen ILS
Evergreen Sysadmin Survival SkillsEvergreen Sysadmin Survival Skills
Evergreen Sysadmin Survival Skills
Evergreen ILS1.9K views
Starting Raspberry Pi by LloydMoore
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry Pi
LloydMoore1.4K views
NodeMCU ESP8266 workshop 1 by Andy Gelme
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1
Andy Gelme34.3K views
syzkaller: the next gen kernel fuzzer by Dmitry Vyukov
syzkaller: the next gen kernel fuzzersyzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzer
Dmitry Vyukov82.6K views
Arduino and c programming by Punit Goswami
Arduino and c programmingArduino and c programming
Arduino and c programming
Punit Goswami4.1K views
The Rise of Parallel Computing by bakers84
The Rise of Parallel ComputingThe Rise of Parallel Computing
The Rise of Parallel Computing
bakers841.5K views
Identifying and Supporting 'X-compatible' Hardware Blocks by Chen-Yu Tsai
Identifying and Supporting 'X-compatible' Hardware BlocksIdentifying and Supporting 'X-compatible' Hardware Blocks
Identifying and Supporting 'X-compatible' Hardware Blocks
Chen-Yu Tsai327 views
Current and Future of Non-Volatile Memory on Linux by mountpoint.io
Current and Future of Non-Volatile Memory on LinuxCurrent and Future of Non-Volatile Memory on Linux
Current and Future of Non-Volatile Memory on Linux
mountpoint.io1K views
Linux Kernel Platform Development: Challenges and Insights by GlobalLogic Ukraine
 Linux Kernel Platform Development: Challenges and Insights Linux Kernel Platform Development: Challenges and Insights
Linux Kernel Platform Development: Challenges and Insights
GlobalLogic Ukraine1.3K views

Recently uploaded

Digital Personal Data Protection (DPDP) Practical Approach For CISOs by
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOsPriyanka Aash
153 views59 slides
The Power of Heat Decarbonisation Plans in the Built Environment by
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built EnvironmentIES VE
69 views20 slides
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...ShapeBlue
79 views17 slides
Cencora Executive Symposium by
Cencora Executive SymposiumCencora Executive Symposium
Cencora Executive Symposiummarketingcommunicati21
139 views14 slides
Future of AR - Facebook Presentation by
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook PresentationRob McCarty
62 views27 slides
NTGapps NTG LowCode Platform by
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform Mustafa Kuğu
365 views30 slides

Recently uploaded(20)

Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash153 views
The Power of Heat Decarbonisation Plans in the Built Environment by IES VE
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built Environment
IES VE69 views
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue79 views
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty62 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu365 views
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ by ShapeBlue
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericConfidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
ShapeBlue88 views
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by ShapeBlue
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue84 views
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue197 views
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... by ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue101 views
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by ShapeBlue
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
ShapeBlue112 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue123 views
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue176 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10126 views
DRBD Deep Dive - Philipp Reisner - LINBIT by ShapeBlue
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBIT
ShapeBlue140 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue158 views
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue166 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue146 views

ACPI and FreeBSD (Part 2)

  • 1. ACPI and FreeBSD Part 2 (user guide) Nate Lawson nate@root.org Bay Area FreeBSD Users’ Group September 6, 2006
  • 2. Overview • ACPI feature description – Configuration and device discovery – CPU power – Thermal – Video – Docking stations – Hotkeys and proprietary features • FreeBSD ACPI (see man page) – Supported features – How to use/configure them • How you can help
  • 3. Device discovery • ACPI handles discovery of devices that have no probe capability – Legacy keyboard/mouse – Serial, parallel, IRDA – Also provides standard drivers for some of these • SMI-activated special features (i.e. hotkeys) • Embedded controller • Batteries (SMBUS or EC-based access) • ACPI provides additional features for standard devices – PCI locality and hotplug – ATA register data
  • 4. FreeBSD Discovery • Disable probing specific namespaces – (tunable) debug.acpi.avoid=“ISAB” – Not necessary as probing rarely causes problems by itself these days • Disable a specific device (not ACPI-specific) – (tunable) hint.acpi_thermal.0.disabled=“1” – “APIC” most likely to cause problems outside of ACPI itself • Has some unknown problems with suspend/resume • As a side effect, disables SMP which sometimes interacts badly with ACPI • Desired features – General mechanism for wiring device nodes to unit numbers (jhb, imp) – Support for hotplug PCI, large system locality, PCI Express
  • 5. CPU Power • CPU frequency/voltage – Save power while CPU is doing something – Absolute value: SpeedStep, PowerNow!, LongHaul – Relative value (% of absolute): acpi_throttle, TM2, nVidia • Idle power states (C1 - Cn) – Save power while CPU is idle – Higher Cx numbers mean • More power savings but… • Longer time to transition (less responsive) – C1: same as HLT instruction – C2: clocks stopped, bus snooped – C3(+): clocks stopped, bus not snooped
  • 6. FreeBSD CPU Power • CPU frequency/voltage – Many drivers in 2 separate modules: acpi(4) and cpufreq(4) – Drivers cooperate with central framework (but aren’t dependent on each other) so just load both – Real-time management via powerd(8) or sysctl dev.cpu.0.freq=733 – Disable acpi_throttle or p4tcc if experiencing hangs • Idle power states (C1 - Cn) – Use sysctl hw.acpi.cpu.cx_lowest=“C3” or better, {performance,economy}_cx_state=“LOW” in rc.conf (see defaults/rc.conf) – C3 causes problems if APIC is enabled (timers stop, system hangs) • Desired features – Better SMP Cx support – Dynamic detection of changes in available Cx states
  • 7. Thermal • Each fan or area of thermal control has a zone • Zones offer settings and temperature monitoring • System automatically selects, based on ACPI data – Cooling levels (i.e. fan speed) – Passive cooling (i.e. CPU slowdown or powering off devices) – Shutdown or suspend on critical temperatures
  • 8. FreeBSD Thermal • Manually turn on a fan – (sysctl) hw.acpi.thermal.tz0.active=“1” – Better to let system manage it • If cpufreq driver(s) attached, passive cooling will automatically be engaged by acpi_thermal
  • 9. Video • Detection and control of which displays are active • Example: enable TV out for projecting a talk • Ambient light detection (dim automatically when in the dark) • Auto color correction as display levels dimmed • Most features standardized but moving to proprietary drivers (see later slides)
  • 10. FreeBSD Video • Load acpi_video(4) • Enable a TV output – hw.acpi.video.tv.active=“1” (sysctl) • Change the brightness – hw.acpi.video.lcd.brightness=“7” (sysctl) • Desired features – Integrated support for DPMS for suspend/resume (jhb patch) – Ambient light, color correction, and other ACPI 3.0 features
  • 11. Docking stations • ACPI generates notifications when a docking station is attached • It also provides a new namespace for drivers to evaluate • Docking stations are offering a lot of features – Embedded PCI, floppy, printer ports – Motorized docking/lock mechanism
  • 12. FreeBSD Docking • Load acpi_dock(4) • Undock a system (pressing “undock” button on dock ok too) – dev.acpi_dock.0.status=“0” (sysctl) • Desired features – Dynamic probe of other device trees, not just dock – More testing
  • 13. Hotkeys/proprietary devices • Each manufacturer often has a proprietary driver for hotkeys, LEDs, built-in speaker volume, etc. • Usually export system info/control via proprietary ACPI device nodes – Get current value of settings – Set new value – Get notify interrupt when an event happens (i.e. key pressed) • Information on operation obtained through reverse engineering – “Poke it and see what happens!”
  • 14. FreeBSD Hotkeys • Load one of acpi_asus(4), acpi_ibm(4), acpi_panasonic(4), acpi_sony(4), etc. • Read man page for specific info • Hook a hotkey to an action via devd(8) (see /etc/devd.conf for examples) – Turn up volume when “volume up” hotkey pressed • Control an LED via led(4) – Turn on your email light when notified by biff(1) • Desired features – More support for various laptops – Generic hotkey script that aggregates generic codes (“volume up”) and performs actions
  • 15. Conclusion • Many ACPI functions are well-supported in FreeBSD • Suspend/resume needs most urgent work – Video drivers especially problematic – Requires device-by-device audit • Most ACPI functions are automatic, but with some tweaking you can save even more power • Questions? nate@root.org