pci_set_power_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pci_set_power_state(9) β€” power-state glow-up, bestie edition πŸ’…

okay so this is the Kernel API Manual entry for pci_set_power_state(9), and it's literally about giving a PCI device a whole new power vibe. no cap. ✨

✨ NAME ✨

pci_set_power_state β€” Set the power state of a PCI device. that's the assignment, and she ate. πŸ’…

🫢 SYNOPSIS 🫢

int pci_set_power_state (struct pci_dev *dev , pci_power_t state );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the PCI device to handle. main character device energy, fr fr. πŸ‘‘
  • state β€” the PCI power state (D0, D1, D2, D3hot) to put the device into. pick her outfit, I mean power mode. πŸ¦‹

πŸŒ€ DESCRIPTION πŸŒ€

okay so you're transitioning a device to a new power state, using the platform firmware and/or the device's PCI PM registers. that's the whole plot. ✨

πŸ’– RETURN VALUE πŸ’–

  • -EINVAL β€” if the requested state is invalid. nope, not valid, bestie. πŸ™ˆ
  • -EIO β€” if the device does not support PCI PM, or its PM capabilities register has a wrong version, or the device doesn't support the requested state. it's giving unsupported, lowkey. 😭
  • 0 β€” if the transition is to D1 or D2 but D1 and D2 are not supported. okay so it's a "success" but the D1/D2 support is not there. πŸ’€
  • 0 β€” if the device already is in the requested state. she's already wearing that. πŸ‘‘
  • 0 β€” if the transition is to D3 but D3 is not supported. D3 said not today. 🫢
  • 0 β€” if the device's power state has been successfully changed. slay, the glow-up worked. πŸ”₯

🌈 SEE ALSO 🌈

Kernel file ./drivers/pci/pci.c, plus the whole extended friend group:


okay bestie, that's the page. the footer vibes are source/version ./drivers/pci and date October 2026, and this manual moment is brought to you by the Kernel API Manual. mwah πŸ’‹πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from