Peppermint OS

Support => New Users => Topic started by: rmcellig on May 01, 2014, 03:27:42 am

Title: dual monitor support
Post by: rmcellig on May 01, 2014, 03:27:42 am
How does Peppermint handle dual monitor support. I want to be able to drag items from one monitor to the other instead of a cloned monitor display.
Title: Re: dual monitor support
Post by: PCNetSpec on May 01, 2014, 06:37:37 am
If you have an nVidia or ATI graphics card and are using the nvidia or fglrx  .. you should be able to adjust your dual monitors in the nvida settings or catalyst control centre respectively.

If you're NOT using the proprietary drivers, or have a different make of card....

you might want to install arandr:
Code: [Select]
sudo apt-get install arandrthen go to:-
menu > Preferences > ARandR

When it starts I suspect your 2 monitors will be positioned over the top of each other .. dgar one to the side of the other.
Then click:-
Layout > Apply

When you have it set and working the way you want, click
Layout > Save As
and give it a name such as "dual-monitors.sh" .. and save it.

That profile can then be easily loaded from ARandR .. or even set to autostart with the desktop.
Title: Re: dual monitor support
Post by: condottiere on January 24, 2015, 02:26:47 pm
I'm trying this out, by sticking both the HDMI and VGA plugs into a Sharp TV.

The VGA resolution seems maximized at 1024 x 768. Apparently, with or without dual monitoring.
Title: Re: dual monitor support
Post by: YeeP on September 09, 2015, 11:21:01 am
That profile can then be easily loaded from ARandR .. or even set to autostart with the desktop.

PCNetSpec: I have used this method and have two scripts now, one for when I have both monitors in use, and one for when the laptop is not plugged into the other monitor on my desk.
Is there a method that can be used to detect if the second monitor is plugged in via scripting? I would like to run an autostart that runs the proper script based on what it finds.

Thoughts?
Title: Re: dual monitor support
Post by: PCNetSpec on September 09, 2015, 02:51:55 pm
You might want to see here:
http://unix.stackexchange.com/questions/4489/a-tool-for-automatically-applying-randr-configuration-when-external-display-is-p

if you look at the post about the udev script, and how to check if you're getting a udev "event" when the monitor is attached or not.

if you DO get the udev event, take a look at the posting with this script:
Code: [Select]
#!/bin/sh                                                               

dmode="$(cat /sys/class/drm/card0-VGA-1/status)"                       
export DISPLAY=:0                                                       
export XAUTHORITY=/home/yourusername/.Xauthority                             

if [ "${dmode}" = disconnected ]; then                                 
     /usr/bin/xrandr --auto                                             
elif [ "${dmode}" = connected ];then                                   
     /usr/bin/xrandr --output VGA1 --auto --right-of LVDS1               
else /usr/bin/xrandr --auto                                             

fi
check if when the monitor is NOT attached
Code: [Select]
cat /sys/class/drm/card0-VGA-1/statusreturns "disconnected"

but it returns something else when the monitor IS attached.

if it does, you could slightly modify that script to use YOUR xrandr command line (in your arandr scripts), and use a combination of the udev rule and that modified script to trigger the switch as the monitor is attached/detached

this is what I love about Linux .. roll your own solutions :)
Title: Re: dual monitor support
Post by: YeeP on September 09, 2015, 06:07:29 pm
Cool, good ideas and I will play around with them to see what I can come up with.

Thanks!
Title: Re: dual monitor support
Post by: 928 on November 21, 2015, 11:54:06 pm
Спасибо, моя проблема решена.
Title: Re: dual monitor support
Post by: PCNetSpec on November 22, 2015, 01:52:55 am
Вы только приветствовать :)