Laptop Use and Power ManagementLaptop support depends on ACPI firmware, graphics hardware, and the individual Wi-Fi, audio, touchpad, and camera devices. Check these features one at a time after installation, and record the output of dmesg before changing boot or power settings. The tested hardware list and the MidnightBSD recommended-hardware wiki are useful compatibility references.
Do not change a boot loader setting or configure lid-close suspend over SSH. Test power changes at the physical console with unsaved work closed and the charger available.
ACPI provides battery state, charge level, and AC-line status on supported laptops:
sysctl hw.acpi.battery.life hw.acpi.battery.state hw.acpi.acline
acpiconf -i 0
hw.acpi.battery.life is the battery percentage and hw.acpi.acline is normally 1 on external power and 0 on battery. acpiconf -i 0 reports more detailed information for the first battery. If the system has more than one battery, use the appropriate battery number.
MidnightBSD also includes the batt utility for a short, desktop-friendly battery report:
batt
batt -l
batt -t
batt -u
These report the current state, remaining capacity, remaining time in minutes when available, and the number of battery units. Use batt -cltu when a concise, script-friendly report is useful for a status bar or notification script.
Missing battery information usually indicates that the firmware does not expose it in a compatible form. Collect dmesg | grep -i acpi when reporting the issue.
First identify the active CPU-frequency driver and the current frequency:
sysctl dev.cpufreq.0.freq_driver dev.cpu.0.freq_levels dev.cpu.0.freq
MidnightBSD's cpufreq utility is a convenient read-only report of the current CPU frequency:
cpufreq
cpufreq --all
cpufreq --mean
cpufreq --verbose
Use --all to show each CPU, --mean for a single average, and --verbose to include the available frequency information. This utility reports the active state; it does not select a governor or change the frequency.
On newer Intel systems, this may report hwpstate_intel. That driver lets the processor choose its frequency and may show only a single maximum value in freq_levels. Do not enable powerd on a system managed by hwpstate_intel; the traditional daemon does not control Intel Speed Shift as expected.
On systems using a traditional cpufreq driver, powerd can balance performance and battery life. Its default behavior is adaptive on battery and hiadaptive on AC power. Enable it only after confirming that hwpstate_intel is not the active driver:
doas sysrc powerd_enable="YES"
doas service powerd start
Use powerd(8) before adding custom flags. Aggressive settings can make a desktop feel slow, and only one component should control CPU frequency.
Check which sleep states the firmware advertises:
sysctl hw.acpi.supported_sleep_state
S3 is the usual suspend-to-RAM state. A listed state is only a firmware capability; it does not guarantee that every graphics, Wi-Fi, USB, or audio device will resume correctly. Test S3 from the local console:
doas acpiconf -s 3
After wake, test the display, keyboard, touchpad, network, and audio. This guide deliberately does not configure hibernation: do not assume that an advertised S4 state will resume an existing MidnightBSD desktop session.
Only after a successful manual S3 test should lid close be configured. Add this line to /etc/sysctl.conf:
hw.acpi.lid_switch_state=S3
Then reboot or load the setting with doas sysctl hw.acpi.lid_switch_state=S3. Keep a way to recover at the console if the machine immediately suspends when the lid is opened or closed.
The generic backlight utility can adjust a supported internal display:
backlight
doas backlight decr 10
doas backlight incr 10
If this is unavailable, the ACPI video extension may expose brightness controls. Check its manual page and available values:
sysctl -a | grep 'hw.acpi.video.*brightness'
man acpi_video
Some firmware requires a vendor-specific ACPI module, and some systems do not expose a controllable backlight. On systems using DRM/KMS, load graphics modules before acpi_video when both are used. See the Xorg and desktop guide and Wayland guide for graphics setup.
pciconf -lv and follow the Wi-Fi setup guide. An unsupported internal card may require a compatible USB adapter.cat /dev/sndstat and use the sound guide to select the proper output or headset.dmesg, usbconfig, and the input-device section of Devices and Device Nodes when hardware is not detected.dmesg after attaching it. Webcam support varies by device and application.dmesg after reboot. Update graphics and wireless configuration before retrying.backlight, then inspect ACPI video support. Function-key events and brightness controls are firmware-specific.pciconf -lv output, relevant dmesg lines, active graphics driver, and the output of the battery and CPU commands above.