Another entry motivated by an oversight. My old desktop computer died some months ago and I decided to replace it with my old laptop (it was just packed in the box room). The desktop PC was connected directly to the TV and so is the laptop now. But my TV has a very nasty problem (thanks samsung), the EDID is incorrectly or not interchanged at all. In the desktop box I had to configure the mode lines manually using the xorg.conf file. I remember that I had to boot windows, install some weird application in order to get the current mode lines and add them to the file. When I switched to the laptop the situation was more or less the same, but in this case, I used the xrandr command. Besides I realized that another command, cvt, shows standard mode lines in VESA (that avoided me to repeat the horrible process with Windows). Finally I did a simple but working script that configured the new mode line, set it to the TV output and finally switch off the integrated screen. It was executed as soon as the laptop was switched on.
The other day I was cleaning the computer's hard drive (it was almost full with things that are now inside my new laptop and properly backed up), when I deleted the script (the fact that it was called lala.sh did not help much). So I had to re-write it again. It was just some minutes but I hate when things like that happen. This one will not happen again. Here it is my little script:
#!/bin/bash
# For more details https://wiki.archlinux.org/index.php/xrandr
#cvt 1360 768
# 1360x768 59.80 Hz (CVT) hsync: 47.72 kHz; pclk: 84.75 MHz
#Modeline "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
# add the 1360x768 VESA mode (cvt)
xrandr --newmode "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
# assign the mode to the TV
xrandr --addmode VGA1 "1360x768_60.00"
# set the mode, make TV primary and switch laptop screen off
xrandr --output VGA1 --mode "1360x768_60.00" --primary --output LVDS1 --off
Now I will have to rethink the script no more for sure. Obviously I will lose other things but not this one. I am really a disaster and I feel like a fucking idiot when I have to do the same thing again and again... Which is quite common I must say.
Never again!
Comments