LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   using xrandr to turn screen off/on like mate-display-properties (https://www.linuxquestions.org/questions/linux-software-2/using-xrandr-to-turn-screen-off-on-like-mate-display-properties-4175483551/)

Lop3 11-06-2013 01:39 AM

using xrandr to turn screen off/on like mate-display-properties
 
I've got 2 monitors connected to my laptop.

One is connected via HDMI and one is connected via USB displaylink.

When I boot up my computer linux thinks my DL monitor is on, but the screen is black (DL is not initialized properly for some reason).

The mate-display-properties fix
Its easy to fix using mate's display properties widget. (similar to gnome-display-properties)

Turn off DL monitor
I select the DL monitor, click off, apply

Turn on DL monitor
Then I select the monitor, click on, move it to where I want it, click apply.

Perfect!
Now lets try it with the command line after a fresh reboot.

Turn off DL monitor with command line
xrandr --output DVI-0 --off

Perfect. Now lets turn it back on...

Turn on using xrandr --mode (fails)
xrandr --output DVI-0 --mode 1920x1080
My system gets completely messed up and I have to reboot.
The DL monitor seems to mirror my LVDS monitor. I can move the mouse around but can't click on anything or make windows get focus.

Turn on using xrandr --auto (fails)
xrandr --output DVI-0 --auto
My system gets completely messed up and I have to reboot.
The DL monitor turns on but the graphics go all corrupt, black mixed with the picture, wherever I move the mouse redraws that part of the screen. It seems to have its own space rather than mirroring.
Its weird.

Solution?
If mate-display-properties could produce a commandline output or log for me to see what its doing I could just use the same commands?

verbose xrandr output (both screens positioned and working properly)
http://codepad.org/jJccaANW

ukiuki 11-07-2013 06:30 PM

You say:
Quote:

Originally Posted by Lop3 (Post 5059132)
...One is connected via HDMI...

and then you are passing commands to DVI, don't it should be HDMI ?
as your xranr info shows:
Code:

HDMI1 connected 1920x1080...
Try to run mate-display-properties from a terminal, you might get some output there when setting up the monitors.

Regards

Lop3 11-08-2013 02:28 AM

Okay I tried running mate-display-properties from a console window inside the mate session and then turning monitors on and off with mate-display-properties.
I got a segmentation fault every time. and mate-display-properties ended. I tried running it in the foreground and background (without ampersand and with).
Besides the segmentation fault message, nothing else is shown.

[0] % mate-display-properties&
[1] 6209

[0] %
[1] + 6209 segmentation fault mate-display-properties

===================

Regarding HDMI vs DVI.

HDMI is the native HDMI graphics output on my laptop. When I boot up that works properly.

The DVI-0 is the Displaylink adapter. When I boot up the Displaylink monitor is on, but its black. It needs to be turned off and on again with mate-display-properties to get it to function normally.

This is what my setup looks like in mate-display-properties
http://i.imgur.com/gdZTQbI.jpg

ukiuki 11-08-2013 10:48 AM

Do you have a xorg.conf file in /etc/X11 ?(if you do please post it) If not it could be a good thing to have it there with all monitor settings you need, so then there is no need to set it up everytime the machine is turned on.

Regards


All times are GMT -5. The time now is 01:04 PM.