How to turn off monitors for Power Saving in KDE?

Duncan 1i5t5.duncan at cox.net
Thu Jun 23 09:28:08 BST 2011


Luis Maceira posted on Wed, 22 Jun 2011 23:45:01 -0700 as excerpted:

> When I connect an external monitor to my laptop running Debian Stable
> and KDE both monitors are turned on and I can't turn off my laptop
> monitor to save power.I cannot find anything in KDE GUI to enable the
> option for turning on/off monitors connected to the system.Do I need to
> edit any configuration file? I am interested in turning off monitors AND
> the LCD backlights being really disconnected for power saving.<table
> cellspacing="0" cellpadding="

Please turn off the HTML, which can irritate some of the very same list 
regulars you're asking for answers.  If a message isn't worth posting and 
reading in plain text, it's not worth posting and reading.  Yes, I know 
it's not the default for many clients, especially webmail, but it's 
irritating, none-the-less.

As for the kde issue, keep in mind that not everybody runs the 
distribution you do and knows what particular version of kde comes with 
it.  It's thus very useful to post the version of the app (or desktop) 
you're asking about.

Lacking that, here's a general answer, assuming some version of kde4, at 
least.  kde4 in general uses xorg's randr (Resize AND Rotate) 
functionality to control the display(s).  RandR is the display hotplugging 
detection and configuration that xorg has had been improving for a number 
of years.

As any good xorg technology, exceptions from the default can be 
configured from the xorg.conf file (and/or xorg.conf.d directory in xorg-
server 1.8+) if desired, and many users do just that.  Dynamic runtime 
config is available too, using the xrandr command-line tool (which works 
very well for scripting =:^), or the various desktop integrated GUI tools.

In kde4, there are two ways to access this graphical config tool.  It's 
available in kcontrol (um... systemsettings, except that with some 
exceptions they're not generally systemsettings at all but user-specific 
kde settings, so the kde3 term kcontrol remains more accurate than the 
kde4 name systemsettings, so I continue to use the older and more 
accurate kde3 term, kcontrol), and can also be run separately as a 
systray-based tool called krandrtray, if desired.

The problem is that development of the kde graphical tool has rather 
seriously lagged development of X's capacities themselves, and those of 
the xrandr command line tool developed in tandem with the capacities by 
the xorg folks to take advantage of them.  Add to that the fact that the 
Debian stale^h^Hble you're running is infamous for as far behind as they 
often are, and while I don't actually know how far behind current kde 
4.6.4 you are, combining that with the lag between kde's randr tools and 
X's randr capacities, and the picture isn't particularly encouraging.

If you're running kde 4.3 or earlier, the kde tools were in fact 
seriously broken, to the point of screwing up otherwise working configs 
if you tried to use them, for many people.

By later 4.4, they were actually working reasonably well in interactive 
mode, but still lacked (and continue to lack as of 4.6.4) some of the 
more advanced functionality exposed by the xrandr command-line tool, and 
had/have another weakness as well, in that while the kde tool can 
remember a single config and can interactively switch to a new config if 
desired, that's not particularly functional in terms of what many laptop 
users need, the ability to configure and subsequently switch to multiple 
memorized profiles, typically one for use with the external display at 
the office, another for use with the external display at home (possibly 
more than one, say one in the study, the HDTV in the recroom, and a third 
in the bedroom), and yet another for use "internal-only" on the road.

>From your post, it appears this "multiple profile" functionality is 
really what you need, since once configured, it would allow a simple 
couple-click switch between say internal-only profile, external-only 
profile (which might even be enabled automatically based on the 
properties of the connected monitor or on location information such as 
the IP address the machine has), and both, setup in the desired 
orientation with the desktop expanding to both.  (Yet another profile 
might be presentation mode, cloning the displays so you can look at the 
internal while making a public presentation presented on an external.)

Unfortunately, as I said, the kde tools don't include that functionality 
yet, tho it has been discussed (in blog postings I've read so could 
describe the concept here) and is planned for the future.

And, if you're still running a kde before 4.4, even the interactive 
functionality is likely broken.

But assuming 4.4+, you should be able to configure it as you said, 
actually disabling one output (which X should then turn off 
automatically, at least the video signal, which triggers many to 
shutdown, altho for laptop-internal displays, you often need the 
appropriate backlite controlling kernel module, etc), while setting the 
other to the desired resolution and rotation among the offered options.

Meanwhile, I already mentioned X's commandline tool xrandr and the ease 
with which it can be scripted.  That's actually what I was using before 
kde 4.4 on my dual-monitor workstation here, for resolution switching, 
etc.  And given that I have the scripts already setup for my needs, I 
continue to use them, hotkey triggered, even tho the kde tool now works 
to do it, but using a much more laborious interactive method of 
configuring each element of the change individually.

So that's what I'd recommend.  Install xrandr if necessary, then checkout 
its manpage and setup a script (I'm obviously assuming you know scripting 
of some sort, I simply use bash scripting, here) to do as you need.  
Because it's a script, you can even integrate calls to additional tools 
such as a command-line based backlite controller applet, if necessary/
desired. I know it works as I've already setup scripts for my own needs, 
here. =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list