Reboot causes number of spaces to converge on monitor 1

After a reboot totalspaces shows the total previous number of spaces but only on monitor 1. Monitor 2 only shows a single space. Previously monitor 1 had 9 spaces and monitor 2 had 6. After reboot monitor 1 has 15 and monitor 2 has 1. Running a Mac Pro (Mid -2010) running 10.9.1 with dual cinema displays.

That seems odd. The spaces are tied to a particular display id, and the system should remember what spaces are attached to what display.

If, however, you plug into a different external monitor then I think the system wouldn’t remember the layout.

By the way, this is OSX system behaviour - it is mission control that remembers your spaces.

Hi there,
The main reason for me to buy TotalSpaces2 recently was because my spaces got moved to different monitors all the time. I have a Macbook Pro and 2 external monitors at my office. When I go somewhere else and use the laptop standalone and sometimes after a shutdown, the spaces don’t get arranged to the correct monitors. Oddly enough, my laptop gets 1 space, my second monitor gets most of the remaining spaces and sometimes not all and the 3rd monitor gets 1 or more spaces (depending on what the 2nd gets).
I was hoping that TotalSpaces (since it can arrange spaces to monitors) would force-fix this behavior. It seems not to do that, since I keep having the issue. IS there a way for TotalSpaces2 to force this? I mean, when I set it up, it can obviously control what space goes on which monitor, so why not make that a check or something?
What I would like is 4 spaces on each monitor in one row. That’s it.

Is this possible or have I bought a solution to the wrong problem?

@jrobijns Hi, firstly we are happy to refund you if TS2 doesn’t meet your needs, just email me at support@binaryage.com

Secondly, TotalSpaces2 at the moment has no influence on which monitors spaces migrate to when external monitors are plugged in. In fact there isn’t any part of TotalSpaces2 that moves spaces from one monitor to the other. So whilst it’s something people do have problems with, we aren’t in a position to make a quick fix for it - it’s a feature that would take some time to develop.

This is a frustrating problem. You take the time to get everything the way you like it, assign helpful desktop pictures to each space, name them, etc, and bang! — thanks to a reboot, all that work is lost and the monitor assignments are forgotten. This is the second thread where I’ve encountered a response from the developers that, essentially, we’re up against architectural problems, it’s not TS2. And while the developers have my sympathy, I can’t help wondering whether you guys have bitten off more than you can chew. Does TS2 organise Spaces for you, as one might reasonably expect, or not? Does it make it easier and more fun to get things done, or does it create more work?

I can understand the frustration. OSX certainly should not forget which spaces were on which monitor. It also behaves inconsistently.

Can we fix it? Likely, but not necessarily as quickly as you would prefer - as I said it involves adding significant functionality to solve these multi monitor issues.

Should we fix it? As OSX does not keep the spaces on the right monitors, TS could step in and do that. Your argument that TS is an incomplete solution without fixing this is a strong one.

Oh, by the way - OSX still has the concept of a ‘main’ monitor even when using “Displays have separate spaces” mode.

You can drag the menu bar in System Preferences -> Displays -> Arrangement.

The display you drag it onto will be remembered as your main display, and should get your main display spaces when you have it plugged in. @jrobijns Doing this should affect which monitor gets “most of the remaining spaces”.

Hi Stephen,

Sorry about the late response. Very busy here. Anyway, I know it works like that. The ‘main’ monitor does makes the spaces come over there. Yes, I thought TS2 would fix this.
But… I can’t imagine this would take a huge amount of programming to fix to be honest. What I see happening is this:

  1. I start by creating 4 spaces per monitor. I have 3 monitors, so a total of 12 spaces.
  2. When I look at TS2, I see the spaces neatly lined up in ‘layout’ as 4 boxes: 1 2 3 4
  3. I have the dreaded reboot and then I have 12 spaces on the ‘main’ monitor and 1 space on the other 2 (when connected):
    Main: 1 2 3 4
    5 6 7 8
    9 10 11 12
    Others: 1 … … … (the … are empty boxes)

But… bear in mind I JUST saw it and the corrected it before replying (sorry about that) but I get a message saying ‘you need 4 desktops’ and ‘you have 1 desktops’ and the option to add the remaining desktops.
On the main (IF I recall correctly) I get a message saying ‘you need 4 desktops’ and ‘you have 12 desktops’ and the option to remove the remaining desktops.
Again, this is from memory while not paying a huge amount of attention, but I think it was like that.

My point is: IF TS2 indeed remembers what layout I actually wanted… and if TS already has a button that gives me the option to remove the ‘surplus’ desktops or to add the needed desktops according to my known preference…
Why not make that an automatic process?
TS2 obviously CAN manipulate the spaces, so it has all the rights needed.
TS2 knows what setup I wanted, because it tells me what I had and gives me the option to correct.
Why not let TS2 check what I wanted against what I actually have and correct it? That’s just automating what I would normally do by hand each time.
Let me be clear: I don’t actually care if I get all 12 spaces on my ‘main’ monitor when I just use the laptop without external screens. But the moments I connect the other displays, I want the spaces to be where I want them again.
Am I missing something or is this in fact something that is quite easy to do?

I think TS2 is the tool to do this. I don’t want a refund, but I do want a fix. Even if it’s a Apple ‘booboo’, I feel you’re the people to fix this. And yes, I’d be happy to pay extra for this ‘fix’.

Hi

Ok, yes - I’m willing to fix it, if needed.

I’m actually a bit puzzled by this - I have 9 spaces on my main monitor, and 3 on my other one when I have it plugged in.

When I unplug it I get 11 on my main monitor. (So spaces 2 and 3 from the ext monitor come to the main display.)

When I plug it back in, I again get 3 on my ext display. The system does remember.

Likewise after a reboot.

Your system doesn’t seem to be behaving this way. I don’t fully understand it. I assume you are running the latest 10.9.2?

On the possible fix:
TS2 keeps a track of how many columns each display is meant to have. (Not how many rows, because that changes with numbers of full screen apps). In your case, this is fine because you just have a single row of 4 on each display.

TS2 or a plugin to it could indeed detect the imbalance and add more spaces as needed. These would be new spaces: background and space name settings would be lost. And I would be worried about the accumulation of spaces on the main monitor each time there was a reboot - there may need to be some deletion as well, which would entail recording the proper number of spaces on the main monitor.

Alternatively, I could try to figure out how to move a space from one monitor to another. It’s a new bit of engineering, but probably not very hard - so we could record each space’s proper monitor and place it there if the system didn’t do it itself.

Either way, I agree, let’s see if we can resolve this.

Firstly though, can you just confirm for me - does unplugging and plugging in the monitor cause the problem? Or is it only a reboot?

It happens for me when I unplug my monitor and when I plug it back in.

How about as a fix you store in a config somewhere how many spaces are attached to a display id, and then when that monitor get plugged in, TotalSpaces reads that config and assigns the right amount of spaces to that monitor? It sounds pretty simple enough, doesn’t it?

On top of that, you could subtract the right amount of spaces from the ‘main’ monitor, up to the point where you come to the number set for that display.

What I’m wondering is if your display is being recognised by the system as the same one each time it’s plugged in. I have a feeling that it isn’t. (And clearly you aren’t the only one with this issue.)

I would be very interested to know whether your display id changes when you unplug it and plug it back in.

If you are prepared to run some ruby code in a Terminal, we can use the TotalSpaces2 API to find this out.

Sure, I’d be willing to do so.

What exactly do I need to do to help out?

Ok, thanks!

Firstly make sure you have the latest release of TotalSpaces - tick the “Include pre-releases” box in General preferences, and then choose check for updates from the menu. It should download 2.1.2 for you.

Second, go to a terminal and install the TotalSpaces2 ruby gem. If you are using the normal system ruby you’ll need to do as follows:

sudo gem install totalspaces2

And it will ask for your password.

After that you are ready.

Type irb, then enter the following commands:

require 'totalspaces2’
TotalSpaces2.display_list

Here is my transcript so you can see what it should look like:

Stephens-MacBook-Air: sds$ irb
irb(main):001:0> require ‘totalspaces2’
=> true
irb(main):002:0> TotalSpaces2.display_list
=> [{:display_id=>69679040, :display_name=>“Color LCD”, :width=>1440, :height=>900}]
irb(main):003:0>

You can type exit to exit from ruby.

If you do this, then unplug your monitor and plug it back in and do it again, then we should see whether the display id does in fact change.

Thanks!

Hmmm… I get the following error when running this:

linking shared-object ffi_c.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [ffi_c.bundle] Error 1

I’m assuming this has to do with my version of clang. What version do I need to build this correctly?

Oh damn. Please try this:

sudo bash
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install totalspaces2
exit

Got it. I will let you know the results once its all done building.

Alrighty, I got the results. I asked for the display list twice, once before unplugging my secondary monitor, and then after plugging it back in. These are the results I got:

[{:display_id=>441035357, :display_name=>“ASUS VS247”, :width=>1920, :height=>1080}, {:display_id=>69677760, :display_name=>“Color LCD”, :width=>1280, :height=>800}]

[{:display_id=>441035357, :display_name=>“ASUS VS247”, :width=>1920, :height=>1080}, {:display_id=>69677760, :display_name=>“Color LCD”, :width=>1280, :height=>800}]

The display ids are the same between them.

Ok, thanks! But despite this, OSX is not returning your spaces to their rightful places?

This is very useful information. It means we can indeed record the display id and try to use that.

Yeah, every single time I unplug my monitor and plug it back in I have to reset my spaces.

Also, a little off topic, can you point me to some docs on how to use a ruby script I’ve written using the TotalSpaces2 API?