! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Make it possible to set the primary display in a multimonitor setup
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-settings
Component:
Display Settings

Comments

Description Raphael Groner 2012-01-10 20:33:22 CET
+++ This bug was initially created as a clone of Bug #8115 +++

Right now it seems, that the primary display (the one which has the panel in auto mode, which gets notification, which is monitor 1 in the desktop settings dialog and so on) is always the one which defines the 0xX-border of the virtual screen in a multimonitor setup. The --primary/--noprimary option of xrandr isn't honored.
Comment 1 Raphael Groner 2012-01-10 20:40:06 CET
Copied from bug # 8115:

Joost Van Durme 2012-01-10 16:46:51 CET

The problem is that you cannot specify the primary display in a dual head
setup. Normally you would use the xrandr command:

xrandr --output CRT1 --primary

to set the external screen as primary, so it gets the XFCE panel.

And you use 

xrandr --output CRT1 --right-of LVDS

to position the external monitor to match your physical setup.

The problem is that the panel only wants to be on the display that is on the
left as defined by xrandr. In my case the laptop display (LVDS). 

The --primary option does work in other desktop environments such as gnome2.3..
Comment 2 Joost Van Durme 2012-01-11 09:35:57 CET
So basically, the --primary flag of xrandr is completely ignored in xfce.
Comment 3 Raphael Groner 2012-01-11 10:57:40 CET
Xfce does not call xrandr CLI. It uses directly the API functions of libxrandr. That means, additional logic that is in xrandr executable should be reimplemented in Xfce code.

--primary
    Set the output as primary. It will be sorted first in Xinerama and RANDR geometry requests.
Comment 4 Lionel Le Folgoc 2012-01-11 11:26:48 CET
There's already code in xfce4-display-settings to support that feature. It should set an output as primary if the property /Default/<screen id>/Primary is true (e.g. /Default/LVDS1/Primary). And if you set an output as primary using xrandr and open xfce4-display-settings later, it shouldn't override the property.
Comment 5 Joost Van Durme 2012-01-11 11:46:45 CET
Hi Lionel,

forgive me, I'm just a user... where can I change that property?
Or can't I changed that as a user?


Joost
Comment 6 Joost Van Durme 2012-01-11 12:18:28 CET
Just noticed I can change that in the Settings Editor, but the primary screen does not change to my external monitor after restart.
Comment 7 tropikhajma 2012-06-27 15:14:44 CEST
furthermore requesting a session restart is not really an option, especially for laptop users who need to move without downtime.
Comment 8 Jérôme Guelfucci editbugs 2012-12-20 00:13:33 CET
*** Bug 8115 has been marked as a duplicate of this bug. ***
Comment 9 haarp 2013-07-08 11:13:00 CEST
Setting a primary monitor is quite important. Lacking this feature can make some setups almsot unusable.
Comment 10 Martin Pavelek 2013-12-14 12:42:06 CET
Bug still present in XFCE 4.10. Any changes in newer versions?

I have a Hi-PPI laptop which sits on the right side of the my LCD; enabling the external output means my primary screen will jump to the low-res LCD; hardly usable as primary screen with everything so scaled up (so I basically intend to use it as a secondary display for video playback or terminal windows only, but that's a different issue). In my use case I can just say "OK, it is on the right side" (since I use it so sparsely I can get used to the crazy mouse transitions), but I can see other people would have much more troubles caused by this bug.

Also, Bug 8936 seems to be duplicate of this one. And I don't think the "importance" of this bug should be only "medium enhancement"; enhacement should enhance something already working. For many of us, dual screen support in XFCE is _not_ working.

Thanks,
Martin
Comment 11 C. Conrad Cady 2014-07-18 17:44:20 CEST
This is a bug, not an enhancement, and it is my top-most difficulty with XFCE.  I have a setup in my office where my primary monitor is in front of me, and the secondary laptop is to the left. XFCE will not make the monitor in front of me primary.  There are some small workarounds -- I can put panels on the "primary" monitor, but windows and notifications still go to the wrong monitor.
Comment 12 Josh Palmer 2014-07-23 04:24:02 CEST
I understand that not everyone is running nvidia hardware.. but if you are, my primary display is set from within nvidia-settings and the option is saved in my xorg.conf. In my 3 monitor setup I have that set to the middle monitor. It does affect where notifications are displayed. If set to the left or right monitor they will display there even if the panel is on the middle monitor. Windows however seem to rely on the program remembering where it was when shutdown. Some are programed to remember.. many are not it seems.
Comment 13 James 2014-09-27 17:50:03 CEST
Created attachment 5672 
A screenshot of the relevant settings

(In reply to Lionel Le Folgoc from comment #4)
> There's already code in xfce4-display-settings to support that feature. It
> should set an output as primary if the property /Default/<screen id>/Primary
> is true (e.g. /Default/LVDS1/Primary). And if you set an output as primary
> using xrandr and open xfce4-display-settings later, it shouldn't override
> the property.

Confirmed that this does *not* work. LXDE does not respect xrandr --primary, and it doesn't even respect its own settings as to which monitor is the primary one.

I have my primary monitor (DVI-0) physically below and to the right of my secondary monitor (VGA-0).
Even with the attached XFCE display settings, things like notifications, the default mouse location when I log in, the desktop icon locations, will all be on the upper-right monitor (which I do not want.) Furthermore, Hangouts windows will only "pin" to the bottom of the primary monitor. Basically, not being able to set the primary monitor causes all sorts of little things across various programs to mess up.

I've already tried running xrandr --output DVI-0 --preferred --primary to see if it would do any good, but it didn't.

Please fix this bug. This is not a requested enhancement. This is a significant problem.
Comment 14 Simon Steinbeiss editbugs 2015-02-06 01:55:15 CET
Pushed the fix to git master just now: http://git.xfce.org/xfce/xfce4-settings/commit/?id=d9158dc3f7a51c61b6d25acdb389ed8419c975c6

Note that it depends on the various clients (panels, daemons) to respect the RandR primary property. For instance xfce4-panel doesn't take it into account yet (which was one reason for this feature not being pushed in xfce4-settings).
However, this will work fine with clients that already support the primary property (e.g. plank and other docks).
Comment 15 heavytull 2016-08-15 17:56:06 CEST
I'm running XFCE 4.12, with slackware 14.2. This bug is still ON.
Comment 16 Ruben van Nieuwpoort 2017-05-04 15:19:42 CEST
This bug still affects me in Mint x64 18.1...
Comment 17 Lasse Hillerøe Petersen 2017-05-05 13:01:18 CEST
Why does this bug show as "fixed"? I have the exact same problem, fairly fresh Xubuntu 16.04 install with XFCE 4.12. Connecting a monitor only gives me the choice to extend the desktop to the right of my laptop, which makes no sense when the newly connected display is located physically to the left of the laptop.

This but clearly should be reopened.
Comment 18 Ruben van Nieuwpoort 2017-05-05 13:27:24 CEST
I posted on the xfce forums as well, where ToZ pointed out that the fix is applied to the source and is not available in the 4.12 release. I quote him:

"Keep in mind that the current xfce4-panel git code is different from the 4.12 code in that it has been migrated to GTK3 and is for testing purposes only. That being said, it appears pretty stable (but I haven't tested all of the functionality)."
Comment 19 Raphael Groner 2017-05-05 13:58:13 CEST
Reopening due to recent complains.
Comment 20 haarp 2017-05-05 13:59:56 CEST
(In reply to Raphael Groner from comment #19)
> Reopening due to recent complains.

?

It is fixed. It's just not released as of 4.12.
Comment 21 Raphael Groner 2017-05-05 14:00:42 CEST
(In reply to haarp from comment #20)
> (In reply to Raphael Groner from comment #19)
> > Reopening due to recent complains.
> 
> ?
> 
> It is fixed. It's just not released as of 4.12.

Then please fix in 4.12 branch, too.
Comment 22 Lasse Hillerøe Petersen 2017-05-05 14:46:51 CEST
(In reply to haarp from comment #20)
> (In reply to Raphael Groner from comment #19)
> > Reopening due to recent complains.
> 
> ?
> 
> It is fixed. It's just not released as of 4.12.

Given the target milestone 4.6 shown above, it was easy to think, that this bug may have been _believed_ fixed, as of 4.6. Which it isn't, obviously, if users still see it in 4.12. If there is a fix for the next release, fine. Better if it is pushed out sooner. When I started having this problem, I could see it had been disturbing people for years.
Comment 23 Simon Steinbeiss editbugs 2017-05-05 15:42:29 CEST
The feature has been released as part of 4.12.0 - you can easily spot the two related commits here in the history:
https://git.xfce.org/xfce/xfce4-settings/log/?h=xfce4-settings-4.12.0

Note that the primary checkbox is hidden when there is only one monitor connected.

As I don't have my external monitor with me and can't take a screenshot you will have to trust this external source (actually done as part of a 4.12 review at the time when it was released)
http://4.bp.blogspot.com/-nv1RgjxgjWg/VPSZyi-mokI/AAAAAAAAVsk/50VMXrX37Sg/s1600/xfce412-display-multimonitor.png

Other than that I cannot think of any reason why that feature wouldn't be there for you unless your distribution decided to patch it out.
Comment 24 James 2017-05-05 16:08:32 CEST
I am using XFCE 4.12.0 (Gentoo -r2) and this bug still affects me.

The display is set as Primary in XFCE's settings, yet even after logging out/in, xrandr still displays merely "DVI-0 connected 1440x900+1280+0…"
Comment 25 Lasse Hillerøe Petersen 2017-05-05 16:27:09 CEST
(In reply to Simon Steinbeiss from comment #23)

> http://4.bp.blogspot.com/-nv1RgjxgjWg/VPSZyi-mokI/AAAAAAAAVsk/50VMXrX37Sg/
> s1600/xfce412-display-multimonitor.png

Yes, I suppose I can make a similar screen shot. This does not change the fact, that if I drag the Samsung rectangle to the left of the Laptop, all windows and panels jump onto the Samsung. I expect these to remain on the primary screen. "Extend" doesn't mean "make things jump around".

Also, when connecting the Samsung display, I can click a "fast and simple" configuration that puts the Samsung on the right (or choose not to use it, or choose mirroring, or "manual" config). Why isn't there a similar shortcut to put it on the left? This seems biased.

For more precise placing (mainly for relative height), dragging around rectangles is good, but if I could make a suggestion, make the relative scaling of the rectangles fixed, and put the primary display rectangle at the center, with enough space that the secondary display can be dragged around it. As it is, it seems the rectangles randomly change size (because the rectangles are displayed wider when one is above the other), which is completely strange, confusing, annoying, and makes precise dragging hard.

As I said, I use Xubuntu 16.04(.02 to be exact), and xfce4-about says 4.12. I suppose that is the same as 4.12.0, which you say fixes the problem. So it seems that we may be in disagreement as to what the actual problem is?
Comment 26 Simon Steinbeiss editbugs 2017-05-05 17:52:02 CEST
@Lasse: As I indicated in my original comment, the fact that the panel and xfdesktop don't support the Primary feature is annoying, but that's not the display setting's job (so your bug would simply go into another component). The good news for the panel is that I have implemented that support already and Git master has it. I have also backported it to 4.12, but so far nobody from the respective issue has reported any test results. (See https://bugzilla.xfce.org/show_bug.cgi?id=9338)
All your other complaints should go as feature requests or bugreports into separate issues.

@James: Not sure what xrandr's output should be, the primary feature does work though (it works with the panel from Git master - to become 4.13, and other applications like plank).
Comment 27 Lasse Hillerøe Petersen 2017-05-08 08:06:57 CEST
Simon, that sounds terrific, thank you.

As for where the bug goes, I can only say that as a user it is often hard to tell, but when the problem manifests itself, I am looking at display settings, so that would seem a natural place to start in any case for a user, even if it is obvious to a developer that the problem root cause is elsewhere. You shouldn't expect users to know this.
Comment 28 eks eph 2017-05-09 05:51:21 CEST
I'm on Linux Mint 18.1 Xfce, and I have this bug too. It seems the "primary" display is how OP describes it.
Comment 29 mussol 2017-10-21 18:54:01 CEST
Just registered to confirm this bug is still hitting me.

my version is 4.12: xfce4-panel       4.12.0-3ubuntu2

and I can see the Primary option: https://i.imgur.com/zzrE9V4.png

but this option is just ignored. I move my laptop a lot between home and workplaces and I just want my laptop display to remain the primary no matter what I plug into vga/hdmi output.

from a user's perspective, is hard to understand why this behaviour isn't the default one.
Comment 30 Simon Steinbeiss editbugs 2017-10-22 16:46:36 CEST
@mussol, @eks eph: Please read the bugreport carefully. The primary option works as expected in the component this bugreport concerns (the display dialog), as it sets the hint correctly.
The fact that the panel and xfdesktop didn't react on this hint is true and known.

For the panel I have fixed this both in the 4.13.0 release (a development release and the Gtk+3 port) and I have also pushed a patch into the 4.12 branch of the panel, so I will release 4.12.2 as soon as enough translations for the new "Primary" string have flown in.
https://git.xfce.org/xfce/xfce4-panel/log/?h=xfce-4.12
Comment 31 ebfe 2018-08-18 01:04:23 CEST
this bug still exists, it's literally ignored. how is that possible after all that time?
Comment 32 lorenzo 2018-09-16 03:05:29 CEST
I agree with ebfe. This should really be addressed, also because xrandr workarounds create other problems e.g. with desktop and some window positioning.
Comment 33 Simon Steinbeiss editbugs 2018-10-24 22:40:37 CEST
I know the report is long and there are a lot of misleading comments.
However, the feature has long been introduced to the settings dialog. Applications (even if they're Xfce core components) not yet honoring this setting is not the subject of *this* report.

As an example, here is the issue that tracks the lack of support for the primary option in Xfdesktop (which takes care of rendering your wallpaper and desktop icons): https://bugzilla.xfce.org/show_bug.cgi?id=10688

Again, I'm closing this issue. Feel free to carefully read my comments above if this (final) comment wasn't clear enough.

Bug #8328

Reported by:
Raphael Groner
Reported on: 2012-01-10
Last modified on: 2018-10-24
Duplicates (1):
  • 8115 Make it possible to set the primary display in a multimonitor setup

People

Assignee:
Jérôme Guelfucci
CC List:
27 users

Version

Version:
unspecified

Attachments

Additional information