Turning off screen in Linux

Linux for blind general discussion blinux-list at redhat.com
Tue Oct 18 15:12:00 UTC 2022


Does turning off the screen make that much of a difference to battery 
life actually? I'm unsure since I've heard so many claims over the years 
of it does, it doesn't, it does but only this much, etc


On 10/18/22 15:01, Linux for blind general discussion wrote:
> Tim here.  I believe xrandr should let you do this.  First, you
> need to get the name of your display according to xrandr:
>
>    $ xrandr | awk '/primary/{print $1}'
>    LVDS-1
>
> For me that's "LVDS-1" but your output might be different, like
> "VGA" or "HDMI-1" or something.
>
> You should then be able to disable/power-down that display with
>
>    $ xrandr --output LVDS-1 --off
>
> If you need to re-enable it for whatever reason, change the "off"
> to "auto":
>
>    $ xrandr --output LVDS-1 --auto
>
> I'm not sure how this interacts with screen-readers, and based on
> my testing, it feels like applications might go a little weird,
> getting resized to an itty-bitty size (I think my texting xterm got
> resized down to fit in a 320x200 display, since it was shrunk down
> when I re-enabled the screen).
>
> If it's a problem for you, there might be a way to create a
> virtual monitor, by including something like
>
>    SubSection "Display"
>      Depth 24
>      Virtual 1024 768
>    EndSubSection
>
> in the "Screen" section of your xorg.conf file.  X should then think
> you have two displays connected to your system, and you can use the
> `xrandr ... --off` command to turn off the real one while still
> having the virtual one of a size large enough to make X programs
> happy.
>
> Or possibly run "xvfb" to create a virtual X environment, possibly
> adding the physical display to its configuration, and then using
> xrandr to disable the real screen?
>
> Just a few ideas,
>
> -Tim
>
> On 2022-10-18 07:41, Linux for blind general discussion wrote:
>> Hello everyone,
>>
>> Ubuntu Mate 22.04 64-bit.
>>
>>
>> I suppose there are multiple ways to go about turning off the laptop
>> screen on Linux, from switches to more invasive configuration modifications.
>>
>>
>> I wonder, what is the ideal solution for us to set up, so it would be
>> possible to turn off the screen, so we could save battery, protect the
>> displayed information etc. but we could at the same time switch the
>> setting when necessary without the need to log out / restart?
>>
>>
>> Thanks for your advices!
>>
>>
>> Best regards
>>
>>
>> Rastislav
>>
>>
>>
>> _______________________________________________
>> Blinux-list mailing list
>> Blinux-list at redhat.com
>> https://listman.redhat.com/mailman/listinfo/blinux-list
>>
> _______________________________________________
> Blinux-list mailing list
> Blinux-list at redhat.com
> https://listman.redhat.com/mailman/listinfo/blinux-list
>



More information about the Blinux-list mailing list