Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Multiple monitors and random desktop backgrounds not working properly?

I have a folder of about 132 pictures that I use for desktop backgrounds. I have 3 monitors connected to two nVidia 7300 GT cards. I have my system set to change pictures every 30 minutes and to use a random order. Under Leopard, this worked just fine. However, I have noticed that with Snow Leopard, the behavior is not consistent. It works most of the time, but every couple of days, either two monitors will display the same desktop image, or all three monitors will display the same desktop image. The odds of this happening with 132 images on 3 different displays is pretty small, and for it to happen regularly indicates to me it's more than just coincidence.

If I go into system preferences and manually change the wallpaper and then uncheck and recheck "Random order", nothing happens, whereas in Leopard, unchecking and rechecking that box would actually change the desktop image. I have to manually select another picture, then recheck the "Change picture" and "Random order" boxes, and then the computer will be fine for the next few reboots. Or I can select another folder and then my backgrounds folder again.

Has anyone had any similar experiences? Does anyone know why this is happening? Does anyone know why Apple broke this functionality between Leopard and Snow Leopard? Is there a fix for this?

Mac OS X (10.6.2)

Posted on Mar 6, 2010 11:57 AM

Reply
12 replies

Mar 8, 2010 6:33 PM in response to mrbofus

Same problem here, tried fix step from this thread

http://discussions.info.apple.com/thread.jspa?threadID=2352142&tstart=0

now it kind of works, except that when I log in (I have it set to change the desktop random order when logging in) it chooses a new random wallpaper, then immediately sets both monitor wallpapers to the default snow leopard purple space thing... fun

oddly it seems to work fine if set to "waking from sleep" but any other setting it will choose a new wallpaper then replace them with the default

Message was edited by: MacZiMiZer

Message was edited by: MacZiMiZer

Mar 15, 2010 8:07 PM in response to mrbofus

mrbofus wrote:
every couple of days, either two monitors will display the same desktop image, or all three monitors will display the same desktop image. The odds of this happening with 132 images on 3 different displays is pretty small, and for it to happen regularly indicates to me it's more than just coincidence.


It took me a while to clear the cobwebs out of my brain to calculate the probabilities you mentioned, but I figured out that the probability of any one image showing up at the same time on two or three monitors, especially given the frequency with which they change, is rather high. I'd suggest: (a) adding several dozen more images to that folder, and/or (b) reducing the frequency that they change.

In any given half-hour, the probability of seeing the same image on any two or three monitors (A & B, B & C, A & C, or A & B & C) or all three monitors is 1/(132^2) + (131/(132^2))*3 = 0.0226124885 (2.26%)
Conversely, the probability of seeing three different images is (132 131130)/(132^3) = 0.977387511 (97.74%).

first consider this:
It would only take 22 hours to change desktop images 132 times across three screens.
Here's the math: 22 hours = 44 image changes x 3 screens = 132 image changes.

So, if you work on your computer 8 hours each day (8x2x3 = 48 changes), then sometime during the 3rd day your Mac would have changed the desktop image 132 times across your three screens. Less than that if you work on it more than 8 hours each day. The chances of one randomly selected image popping up at the same time on 2 or 3 of your screens every 2 or 3 days is highly likely.

If we assume that this event is binomially distributed with a probability of .0226124885 then we can actually calculated how many times we'd expect to see the same image on 2 or 3 screens in a given number of image changes. 45 is the magic number where that expected number is greater than 1. Why 45? For every 45 image changes, we would expect to see the same image on 2 or 3 screens once. As you said, this would mean that it happens fairly regularly.

On average, given the above assumptions, you'd expect that to occur about 1 time every 3 days: (0.0226124885 * 45) =1.01756198.

mrbofus wrote:
If I go into system preferences and manually change the wallpaper and then uncheck and recheck "Random order", nothing happens, whereas in Leopard, unchecking and rechecking that box would actually change the desktop image. I have to manually select another picture, then recheck the "Change picture" and "Random order" boxes, and then the computer will be fine for the next few reboots. Or I can select another folder and then my backgrounds folder again.


On this other topic: I wasn't able to exactly reproduce your 'system preferences' behavior.
System Preferences -> Desktop & Screen Saver -> select new wallpaper (automatically clears the check boxes for Change Picture and Random Order).

What I did find, which I also found quite annoying was this: if you manually select a new wallpaper image (automatically clearing the check boxes for Change Picture and Random Order), then re-check the Change Picture box, Snow Leopard automatically switches the wallpaper image displayed on my desktop back to the previous wallpaper image, but my manual selection remains selected in the System Preferences window. It does randomly switch the next time I boot up, but there seems to be a bug with switching the image when I check the Change Picture box.

Mar 19, 2010 4:43 PM in response to brianthedrummer

OK, so when I first turn on my computer, I can concede that it's relatively likely for 2 of the 3 images to be identical. However, the two identical images always appear on my 2nd and 3rd monitors; my primary monitor never has a duplicate image. Moreover, when the 2nd and 3rd monitors show identical images upon startup, they continue to show identical images, even once the images start to change every 30 minutes.

I don't know what the odds are of two identical images showing on only the 2nd and 3rd monitors AND to continue showing identical images for the next 10 rotations [or however long I have the computer on] ONLY on those two monitors, but I would guess that those odds are much smaller.

The consistency of how the "random" images show on the 2nd and 3rd monitor and continue to do so as long as the computer is on, seems to indicate to me that there is some issue. But maybe the math will prove me wrong?

Thanks in advance for any insight!

Mar 20, 2010 6:27 AM in response to mrbofus

Interesting. The two monitors having the same image at every single rotation would be an exceedingly rare event in a truly random setup, however, this makes me think that your setup is not being treated as 3 independent random events.

In many cases "random" events on computers are based on some randomly chosen "seed" (i.e. starting number), and then they follow a mathematical formula to choose the next image (i.e. "seed" + 2). This means that if two monitors get the same "seed", then they would rotate through images in the same order because they follow the same formula.

Based on what you've described, it sounds like the OS chooses an image for each of your monitors in this way, but your second and third monitor often get the same "seed". Not knowing what Apple's random number generator formula is, I couldn't tell you how likely this is to happen. However, it should be simply 1/132 (0.75%) if their random number generator is working well.

Here are two alternative methods Apple could use that would avoid your situation:
(a) choose a "seed" for the first monitor, choose a "seed" for the second monitor that is not equal to the first "seed" (etc. 3rd, 4th, ). You'd never get the same initial image on different monitors this way, but they could still rotate through the images in the same order.
(b) randomize every image, rather than just the "seed". In this way, the initial image might be the same on different monitors, but it would be extremely highly unlikely for them to rotate in the same order.

Both are rather trivial changes in the code.

Mar 20, 2010 11:27 AM in response to brianthedrummer

That is a really interesting point, and I was hopeful that might point towards what was causing the problem (though still no closer to a fix). But, monitors 1 and 2 are on the same card and monitor 3 is on another card. However, monitors 2 and 3 are what usually display the same images when the issue happens.

I'm not really hopeful on a fix anytime soon, since I don't think something like this would be high up on Apple's list of bugs to fix. I have submitted a bug report with every iteration of Snow Leopard, but nothing yet. Hopefully the impending 10.6.3 update will fix it.

May 9, 2010 9:01 AM in response to mrbofus

The update also didn't fix my problem, though mine is slightly different. I have two monitors on one card, and they go to the same desktop everytime I boot. They change just fine randomly if set to every (time span). However, what's more odd is that when the desktop first comes up it does actually choose new wallpapers, but then it will go back to the same pair again, seems to be about the same time it loads the calibrated display setting for the main monitor. I've tried making a new calibration, and tried it under a different user, same result.

Jun 3, 2010 9:28 PM in response to mrbofus

Just thought I'd post an update:

As I've described before, sometimes two of the three monitors will show the same image, and then continue to show the same image every time it's supposed to change to a "random" image. What's even weirder, is that if I change the images manually to something different, the next time the images are supposed to "randomly" change, they go to a different image, but it's STILL THE SAME image on those two monitors. This doesn't go away until I restart the computer. ***?

Jul 9, 2010 4:13 PM in response to mrbofus

I got tired of staring at the same wallpaper when I've got about 100 total wallpapers in my bucket.

So I fought with automator, then I made an applescript to run each time I log in
=====================
tell application "Finder"
set randomImage to some file of folder "FOLDER:FOLDER:Pictures:desktops" as alias
tell application "System Events"
set theDesktops to a reference to every desktop
set picture of item 2 of the theDesktops to randomImage
end tell

set randomImage to some file of folder "FOLDER:FOLDER:Pictures:bigger desk"
set desktop picture to randomImage
end tell
=====================

Google is to thank mostly, kinda, for this

It's a mashup of various things I saw around with some tweaking for how I want it to work.

set picture rotation to 0 -- (0=off, 1=interval, 2=login, 3=sleep)

just before the set picture line. Of course the interval (I assume since I haven't tried it) goes back to what you had set. For now I have it completely off changing and just have the script handle it each time I log in.

This mainly helps those who were watching it choose a new wallpaper before forcing itself back to the same starting two every day, it won't help with the random algorithm somehow choosing the same images over and over. Of course with some tweaking it might fix other problems too. I am at least happy to have a new desktop each morning, I don't know why it frustrated me so much, but it's a little sanity check for me that I have a new wallpaper each time I start up my computer at home.

Message was edited by: MacZiMiZer

Multiple monitors and random desktop backgrounds not working properly?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.