Script for switching between LCD/CRT on Thinkpads
Posted: Mon May 23, 2016 5:17 pm
In most cases, the monitor-output-toggle button on Thinkpad notebooks works fine on Ubuntu.
However, I've had the case in the past that it didn't work anymore as expected (after Kernel update), so here's a small bash-script that does the trick:
Not sophisticated, but worked on my machine - and I keep it here so it doesn't get lost
However, I've had the case in the past that it didn't work anymore as expected (after Kernel update), so here's a small bash-script that does the trick:
Code: Select all
#!/bin/bash
# @date: 2012-11-05
# @author: Peter B.
LCD_ON="lcd_enable"
CRT_ON="crt_enable"
CRT_OFF="crt_disable"
SWITCH="video_switch"
PROC_VIDEO="/proc/acpi/ibm/video"
echo "$SWITCH" > $PROC_VIDEO
sleep 60
echo "$SWITCH" > $PROC_VIDEO
# read -p "Press any key to switch CRT on"
# echo $CRT_ON > $PROC_VIDEO
read -p "Press any key to switch CRT off"
echo $CRT_OFF > $PROC_VIDEO
echo $LCD_ON > $PROC_VIDEO