I recently replaced my two 22 Inch computer screens with a 40 Inch, 4K Samsung TV. these things are incredibly cheap and make for a good PC monitor with a little tuning:
by default a TV has tons of image optimizers to make any possible source look good on your tv. however, that doesn't work out quite so well when all you want to see is one pixel per pixel in the exact color as the computer delivers it. Luckily on a Samsung TV you can simply change you source type to PC by pressing the source button and then pressing the up key after selecting the source where your computer is attached. now chose edit and switch to PC. this will remove all “enhancers” and provide you with a nice clean picture.
now this was a little more complicated: when the PC goes into standby or suspends the screen by dpms, the samsung TV stays on for a little while displaying a “no signal found, switch source” message. after a while it will then simply switch off. the main problem is now, that it won't turn on, once the signal returns. so after moving your mouse around, you need to grab the remote and turn on your tv. depending on your os, there are probably different ways to monitor your display output state and to invoke some scripts upon wakeup but the problem is, that the samsung screen cannot be turned on via its ethernet port because when the tv is turned off, it also turns off its ethernet card. Luckily, it still listens to HDMI-CEC commands. Sadly though, NVIDIA cards don't support HDMI-CEC while intel and most other graphics adapters do support it. Of course i am using an Nvidia card, so i had to come up with a little workaround: I am using a Raspberry Pi with an HDMI cable attached to it to turn on the monitor. You can indeed turn on the TV via a CEC command on HDMI2 and the TV will still stay on HDMI1 where it was when it was turned off.. that makes all this a whole lot simpler. So here is how I did that. you may of course run more code on the raspberry and less on your pc like, write a web service for your Rpi that will turn on your screen if you prefer that solution :) i just wanted something quick and dirty:
systemctl enable ssh systemctl start sshd
apt install cec-utils
#!/bin/bash while true; do xset -q | grep "Monitor is On" if [ $? -eq 1 ]; then if [ "`cat /tmp/displaystate`" != "off" ]; then ssh pi@192.168.168.63 'echo 'standby 0' | cec-client -s RPI' echo "off" > /tmp/displaystate fi sleep 1 else if [ "`cat /tmp/displaystate`" != "on" ]; then ssh pi@192.168.168.63 'echo 'on 0' | cec-client -s RPI' echo "on" > /tmp/displaystate fi sleep 10 fi done
/opt/checkScreen.sh > /dev/null 2>&1 &
xset dpms force suspend
. your tv should switch off in no more then 10 seconds and it should swick back on in about 1 second after moving the mouse