dc_enable_dcmode_clk_limit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dc_enable_dcmode_clk_limit(9) β€” a Kernel API Manual moment πŸŽ€

okay so bestie, we're in the Kernel API Manual today and this one is lowkey niche but honestly kind of important if you care about your laptop not melting while unplugged. it's giving "power management but make it dramatic." let's get into it ✨


🌸 NAME 🌸

dc_enable_dcmode_clk_limit β€” lower clocks in dc (battery) mode

like, literally the whole point: clocks go down when you're running on battery. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

void dc_enable_dcmode_clk_limit (struct dc *dc , bool enable );

that's it. that's the whole vibe. a void function taking a struct dc * and a bool. short queen energy πŸ‘‘


πŸ’œ DESCRIPTION πŸ’œ

so some SoCs define, like, additional clock limits when they're in DC mode. (DC = battery mode here, keep up bestie, not the comics company πŸ’€)

the DM β€” that's the Display Manager, the display manager of it all β€” should invoke this function when the platform undergoes a power source transition, so that DC can apply or unapply the limit accordingly. plug in β†’ unapply. unplug β†’ apply. balance restored 🧚

⚠️ heads up though: this interface may be disruptive to the onscreen content. so like… not a "call it for funsies" situation. it's giving flicker, it's giving visual chaos, it's giving "why did my screen just do that." you've been warned πŸ’€

πŸ“ ARGUMENTS πŸ“

  • dc β€” pointer to the dc of the dm calling this. (yes it says "dc of the dm," yes it's a little inception-coded, no we don't make the rules 🫢)
  • enable β€” True = transition to DC mode, false = transition back to AC mode. so like, true is "we're on battery now, throttle bestie," and false is "we're plugged in, live your truth." note the shouty True and the lowercase false β€” that's exactly how the original has it, don't come for me πŸ™ˆ

⭐ CONTEXT ⭐

when does this even get called? good question, love that you asked πŸ’–

  • Triggered by the OS through the DM interface, or manually by escape calls.
  • You need to hold a dclock when doing so.

that second bullet is not optional, bestie. hold the lock. hold it. no ✨ shortcuts ✨.


🌈 RETURN 🌈

none β€” it's a void function. no return value, no surprises, no little gift at the end. just vibes and a clock limit 😌


πŸ‘‘ SEE ALSO πŸ‘‘

okay this is the part where the manpage just goes absolutely feral and lists everything. so here it is, all of it, in order, no skips, because we don't do that here πŸ”₯

like, thirty-something references. she ate and left no crumbs. iykyk πŸ’…


mwah, that's the page! πŸ’– source/version is from ./drivers/gpu/drm/amd/display/... and it's dated October 2026, so mark your calendars bestie β€” this manpage said "see you next fall" 🌸 and yes, the footer is literally the same dc_enable_dcmode_clk_limit(9) we started with. full circle moment 🫢✨

πŸ“¦ where this page comes from