linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: How to power gate a specific single device from outside?
Date: Wed, 25 Oct 2017 00:56:35 +0100	[thread overview]
Message-ID: <20171025005635.57f1b926@alans-desktop> (raw)
In-Reply-To: <CAHKzcEP6dQ1PxB35yCW_R1W8yZCCsJN_HqiZ6uq2d+sZp_9EYw@mail.gmail.com>

> I could not find anything standard that let me power gate single
> device from userland. Perhaps it's considered as a too risky operation
> to expose to the user. I don't want to touch drivers too much as well
> not to make them dependant on extra system feature. Better to have a
> separate module that handles this system mode and forces some drivers
> to unload/power gate their HW.
> 
> Are there already some proven solutions/ideas around the kernel that
> can be used straight away?

For a lot of devices if you close it then it will try and put the device
into a low power state. If a driver isn't doing that then (unless there
are hardware constraints preventing it) it would make sense to fix it.

There are some things entirely in your control - big ones. In particular
the brightness of laptop panels, pulling everything off one CPU socket,
disabling the nmi watchdog, hard disk power settings, stopping processes
that wake up a lot.

Many of those you can set anyway for best power behaviour (see powertop).

Alan

  reply	other threads:[~2017-10-24 23:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24  8:34 How to power gate a specific single device from outside? Waldemar Rymarkiewicz
2017-10-24 23:56 ` Alan Cox [this message]
2017-10-25 12:15   ` Waldemar Rymarkiewicz
2017-10-25 19:42     ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171025005635.57f1b926@alans-desktop \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=waldemar.rymarkiewicz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).