0

I am running a Linux Mint 17.3 machine with a DVI and USB (DVI-to-USB) monitor connection plugged in to the same desktop. Upon booting up, I get strange display misalignment that I found out was due to the USB connection - half of one screen is scrunched up on one of the monitors. However, if I simply go into Settings -> Display and click "Apply" without making any changes, the display problem goes away.

Is there some sort of command that I can add to a startup script in /etc/init.d/ or in a crontab command that will automatically apply/refresh monitor settings in this way for me at startup?

Thanks in advance.

1

You can try telling xrandr to set the display to its automatic settings.

xrandr --output XXXXX --auto

Run xrandr on its own to get all valid output names.

  • This works well if I know what the monitor names are. Unfortunately I disconnect different monitors with different connection types, so what will be 'DVI-1' one day will be 'USB-0-1' another day... which makes this solution not as effective. Thanks all the same :) – Fuzzy Analysis Nov 22 '17 at 20:06
  • So then parse the output of xrandr to get what the active displays are. It's a computer, make it do what it's good at. – Ignacio Vazquez-Abrams Nov 22 '17 at 20:07
  • Yep, that would work as well. I'm too lazy, but I learned a lot about xrandr from investigating your answer, so thanks a bunch. – Fuzzy Analysis Nov 22 '17 at 20:11
0

My solution, which works great, was to do the following:

  1. Create a startup.sh file in my home directory ~/ (that way I can port it over during a backup of files later if you wish) with the following command saved in it:

    pkill -HUP "cinnamon --replace"

  2. Open a terminal session, type crontab -e to enter the crontab file, and enter the following and save it:

    @reboot /home/donkey/startup.sh

  3. Reboot the computer and note that on every boot up now, the cinnamon session refreshes and removes the bootup bugs on the monitors I am using, making the resolution span perfectly across all monitors.

Hooray :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.