Can not set external monitor to left of internal monitor on ubuntu 17.04

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Can not set external monitor to left of internal monitor on ubuntu 17.04

Caner Aydın
 - When i connect external, and when i go to display settings, the
   external is in right of internal.
   
   I change in this settings by dragging, then apply to set to the left
   of the internal.
   
   But it makes black external and i have to plug out and plugin again
   to be able to use external and it is again on the right of internal.
   
   this is xml of monitors
   
   sudo gedit ~/.config/monitors.xml
   
       <monitors version="1">
         <configuration>
             <clone>no</clone>
             <output name="eDP-1-1">
                 <vendor>AUO</vendor>
                 <product>0x44ed</product>
                 <serial>0x00000000</serial>
                 <width>1920</width>
                 <height>1080</height>
                 <rate>60</rate>
                 <x>0</x>
                 <y>0</y>
                 <rotation>normal</rotation>
                 <reflect_x>no</reflect_x>
                 <reflect_y>no</reflect_y>
                 <primary>yes</primary>
             </output>
             <output name="HDMI-1-1">
                 <vendor>PHL</vendor>
                 <product>0xc0c5</product>
                 <serial>0x00001e7f</serial>
                 <width>1920</width>
                 <height>1080</height>
                 <rate>60</rate>
                 <x>1920</x>
                 <y>0</y>
                 <rotation>normal</rotation>
                 <reflect_x>no</reflect_x>
                 <reflect_y>no</reflect_y>
                 <primary>no</primary>
             </output>
         </configuration>
         <configuration>
             <clone>no</clone>
             <output name="eDP-1-1">
                 <vendor>AUO</vendor>
                 <product>0x44ed</product>
                 <serial>0x00000000</serial>
                 <width>1920</width>
                 <height>1080</height>
                 <rate>60</rate>
                 <x>0</x>
                 <y>0</y>
                 <rotation>normal</rotation>
                 <reflect_x>no</reflect_x>
                 <reflect_y>no</reflect_y>
                 <primary>yes</primary>
             </output>
             <output name="HDMI-1-1">
                 <vendor>PHL</vendor>
                 <product>0xc0c5</product>
                 <serial>0x00001e0c</serial>
                 <width>1920</width>
                 <height>1080</height>
                 <rate>0</rate>
                 <x>1920</x>
                 <y>0</y>
                 <rotation>normal</rotation>
                 <reflect_x>no</reflect_x>
                 <reflect_y>no</reflect_y>
                 <primary>no</primary>
             </output>
         </configuration>
       </monitors>

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can not set external monitor to left of internal monitor on ubuntu 17.04

Colin Law
On 10 July 2017 at 13:49, Caner Aydın <[hidden email]> wrote:

>  - When i connect external, and when i go to display settings, the
>    external is in right of internal.
>
>    I change in this settings by dragging, then apply to set to the left
>    of the internal.
>
>    But it makes black external and i have to plug out and plugin again
>    to be able to use external and it is again on the right of internal.
>
>    this is xml of monitors
>
>    sudo gedit ~/.config/monitors.xml

Have you previously used sudo to edit that file? If so then it will be
owned by root which may be an issue. Set it back to yourself using
sudo chown  $USER:$USER ~/.config/monitors.xml

Also using sudo with gedit (you should never do that, use gksudo with
graphical applications) will have made various other files owned by
root so you might be better to restore all your files ownership with

sudo chown  -R $USER:$USER ~

Colin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can not set external monitor to left of internal monitor on ubuntu 17.04

Caner Aydın
No, i did not save it with gedit.

And never edited that file.

-rw-r--r--  1 caner caner 1842 Jul 10 14:47 monitors.xml



On Mon, Jul 10, 2017 at 4:07 PM, Colin Law <[hidden email]> wrote:
On 10 July 2017 at 13:49, Caner Aydın <[hidden email]> wrote:
>  - When i connect external, and when i go to display settings, the
>    external is in right of internal.
>
>    I change in this settings by dragging, then apply to set to the left
>    of the internal.
>
>    But it makes black external and i have to plug out and plugin again
>    to be able to use external and it is again on the right of internal.
>
>    this is xml of monitors
>
>    sudo gedit ~/.config/monitors.xml

Have you previously used sudo to edit that file? If so then it will be
owned by root which may be an issue. Set it back to yourself using
sudo chown  $USER:$USER ~/.config/monitors.xml

Also using sudo with gedit (you should never do that, use gksudo with
graphical applications) will have made various other files owned by
root so you might be better to restore all your files ownership with

sudo chown  -R $USER:$USER ~

Colin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



--
+ 9 0 542 788 62 64

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Xen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can not set external monitor to left of internal monitor on ubuntu 17.04

Xen
Caner Aydın schreef op 10-07-2017 15:19:

> No, i did not save it with gedit.
>
> And never edited that file.

I would typically consider Linux solutions too crappy to really take
care of all of these use cases. You will have to use xrandr, but that is
also not very pleasant to get working a good way.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can not set external monitor to left of internal monitor on ubuntu 17.04

Colin Law
In reply to this post by Caner Aydın
On 10 July 2017 at 14:19, Caner Aydın <[hidden email]> wrote:
> No, i did not save it with gedit.
>
> And never edited that file.
>
> -rw-r--r--  1 caner caner 1842 Jul 10 14:47 monitors.xml

OK, not that then.  When you rearrange them using the Displays
settings app and click apply it should show you them in the new
position and give you the option of keeping the settings or reverting.
Does it look ok initially? If so when does the screen go black?

Are you using nVidia? If so then do you have to use the nVidia
settings app? I don't use nVidia so don't know the details.

Just having used sudo with gedit (even if you didn't save) may, I
think, have changed the permissions on some hidden files that may give
you problems, though I can't remember exactly what the issue is.  I
don't know whether that could be related to this issue though.

By the way, the convention is not to top post on this list.

Colin

>
>
>
> On Mon, Jul 10, 2017 at 4:07 PM, Colin Law <[hidden email]> wrote:
>>
>> On 10 July 2017 at 13:49, Caner Aydın <[hidden email]> wrote:
>> >  - When i connect external, and when i go to display settings, the
>> >    external is in right of internal.
>> >
>> >    I change in this settings by dragging, then apply to set to the left
>> >    of the internal.
>> >
>> >    But it makes black external and i have to plug out and plugin again
>> >    to be able to use external and it is again on the right of internal.
>> >
>> >    this is xml of monitors
>> >
>> >    sudo gedit ~/.config/monitors.xml
>>
>> Have you previously used sudo to edit that file? If so then it will be
>> owned by root which may be an issue. Set it back to yourself using
>> sudo chown  $USER:$USER ~/.config/monitors.xml
>>
>> Also using sudo with gedit (you should never do that, use gksudo with
>> graphical applications) will have made various other files owned by
>> root so you might be better to restore all your files ownership with
>>
>> sudo chown  -R $USER:$USER ~
>>
>> Colin
>>
>> --
>> ubuntu-users mailing list
>> [hidden email]
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
>
>
>
> --
> + 9 0 542 788 62 64
>
> --
> ubuntu-users mailing list
> [hidden email]
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can not set external monitor to left of internal monitor on ubuntu 17.04

Colin Law
In reply to this post by Xen
On 10 July 2017 at 14:27, Xen <[hidden email]> wrote:

> Caner Aydın schreef op 10-07-2017 15:19:
>
>> No, i did not save it with gedit.
>>
>> And never edited that file.
>
>
> I would typically consider Linux solutions too crappy to really take care of
> all of these use cases. You will have to use xrandr, but that is also not
> very pleasant to get working a good way.

The Displays settings app has always worked well for me, but perhaps I
have been lucky.

Colin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Xen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can not set external monitor to left of internal monitor on ubuntu 17.04

Xen
Colin Law schreef op 10-07-2017 15:32:

> On 10 July 2017 at 14:27, Xen <[hidden email]> wrote:
>> Caner Aydın schreef op 10-07-2017 15:19:
>>
>>> No, i did not save it with gedit.
>>>
>>> And never edited that file.
>>
>>
>> I would typically consider Linux solutions too crappy to really take
>> care of
>> all of these use cases. You will have to use xrandr, but that is also
>> not
>> very pleasant to get working a good way.
>
> The Displays settings app has always worked well for me, but perhaps I
> have been lucky.

Been more accustomed to KDE myself.... when I first connected my TV as
secondary on HDMI and set it to mirror, and then disconnected it again,
both screens went black and I had to reboot the machine to get a visual
back.

Mint worked better (Cinnamon) I suppose it uses the same Displays app?

But my experience hasn't been great, that was my first encounter in
Linux connecting a second monitor ;-). Makes you, euhm, crave more,
right ;-).

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can not set external monitor to left of internal monitor on ubuntu 17.04

Pete Smout-2


On 10 Jul 2017 17:54, "Xen" <[hidden email]> wrote:
Colin Law schreef op 10-07-2017 15:32:

On 10 July 2017 at 14:27, Xen <[hidden email]> wrote:
Caner Aydın schreef op 10-07-2017 15:19:

No, i did not save it with gedit.

And never edited that file.


I would typically consider Linux solutions too crappy to really take care of
all of these use cases. You will have to use xrandr, but that is also not
very pleasant to get working a good way.

The Displays settings app has always worked well for me, but perhaps I
have been lucky.

Been more accustomed to KDE myself.... when I first connected my TV as secondary on HDMI and set it to mirror, and then disconnected it again, both screens went black and I had to reboot the machine to get a visual back.

Mint worked better (Cinnamon) I suppose it uses the same Displays app?

But my experience hasn't been great, that was my first encounter in Linux connecting a second monitor ;-). Makes you, euhm, crave more, right ;-).



Hi,
It's been a while since I've had to set up dual monitors but xrandr is the answer not the most user friendly app I have used but very effective and survives LTS upgrades

Check launchpad questions archive for a guide (I haven't got the link saved on my phone)

Good luck

Pete S 





--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can not set external monitor to left of internal monitor on ubuntu 17.04

Liam Proven
In reply to this post by Xen
On 10 July 2017 at 18:53, Xen <[hidden email]> wrote:
> Been more accustomed to KDE myself.... when I first connected my TV as
> secondary on HDMI and set it to mirror, and then disconnected it again, both
> screens went black and I had to reboot the machine to get a visual back.
>

This sometimes works:

Ctrl+Alt+F1 to a virtual console.
Ctrl+Alt+F7 to get back to X.11

This resets the console into text mode and back into graphics mode,
clearing up some glitches and issues.

--
Liam Proven • Profile: https://about.me/liamproven
Email: [hidden email] • Google Mail/Talk/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven • Skype/LinkedIn/AIM/Yahoo: liamproven
UK: +44 7939-087884 • ČR/WhatsApp/Telegram/Signal: +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Xen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can not set external monitor to left of internal monitor on ubuntu 17.04

Xen
Liam Proven schreef op 11-07-2017 1:01:

> On 10 July 2017 at 18:53, Xen <[hidden email]> wrote:
>> Been more accustomed to KDE myself.... when I first connected my TV as
>> secondary on HDMI and set it to mirror, and then disconnected it
>> again, both
>> screens went black and I had to reboot the machine to get a visual
>> back.
>>
>
> This sometimes works:
>
> Ctrl+Alt+F1 to a virtual console.
> Ctrl+Alt+F7 to get back to X.11
>
> This resets the console into text mode and back into graphics mode,
> clearing up some glitches and issues.

Yes I know, but that didn't work. Anyway, not important now.

Now I just run "fixscreen" which is a little xrandr shell script and
that will just detect the current display configuration and select an
appropriate xrandr command to get it right again, I guess. I mean, to
get the proper configuration.

It also hooks into udev but because KScreen also messes with the display
I check journalctl, I mean I check syslog until there are no more
KScreen messages and then I effectuate it :p.

And I just... I mean I can disable KScreen, there is some obscure little
KDE configuration thing for that, but I wanted it to work easier than
that, but I mean, more out of the box, but I have no idea how to hook
into anything KDE does.

So It's not so simple to create something that will really cover a wide
variety of use cases. You'd really have to intend to create a model that
will cover every possible configuration and then execute your commands
based on that, and that's what KScreen is supposed to do, but it kinda
failed in 16.04.

Writing your own xrandr commands is guaranteed to work, but then you
need a framework to ease the automation of it and that framework then
doesn't exist. Because of that we Linux people often do something quick
and dirty that works for us, but then everyone else also has to repeat
that work for themselves ;-).

And then the ones who do make an effort often end up making something
that works so badly that you still have to do the quick and dirty stuff
yourself :(.

Well, not trying to be despondent here, anyway this is what is needed to
automate execution after monitor change:



/etc/udev/rules.d/99-monitor-change.rules

ACTION=="change", SUBSYSTEM=="drm", RUN+="/path/to/script"

I then ran xrandr as my user using:

sudo_xrandr() {
     sudo -u xen DISPLAY=:0 xrandr "$@"
}

although that isn't exactly fool-proof. At that point you can do things
such as:

sudo_xrandr --output DVI-I-1 --primary --mode 1440x900 --output HDMI-1
--same-as DVI-I-1 --mode 1360x768 --scale-from 1440x900

I believe.

Your script would then run after every monitor change and you can put it
in some KDE startup folder (add it to the list of startup scripts). In
KDE you then have to disable KScreen using:

kcmshell5 kded.

Which is in that sense the easiest to get around it. Then you have
basically your custom xrandr commands executed after login and after
monitor changes.

It is then of course possible to use the xrandr -q command to
differentiate between different configurations, or use cases.

For instance you could detect whether the HDMI is connected or not, etc.
etc.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Loading...