Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ignatius345

macrumors 604
Original poster
Aug 20, 2015
7,026
11,564
tl;dr When dragging windows around on my M1 iMac (running Ventura 13.5.2). I'm experiencing a graphics issue where the window lags behind the cursor. This only happens when I'm logged into both my personal and work user accounts. This issue emerged a couple months ago, under Ventura.

The details:

I often have two user accounts logged in, one for my personal stuff, one for work. Been working like this for a long time and generally it's been great. The iMac (8/8 core, 16GB memory) has always handled the workload very well.

In the past couple months or so, however, I'm experiencing weird lag in either of the accounts when logged into both of them, even if nothing taxing is really happening. Specifically, what I'm seeing is that when dragging windows around the screen, they lag behind the cursor. It feels like I'm dragging them through molasses or something. Otherwise it seems like things are fairly normal. I can launch Photoshop in well under 5 seconds, for instance. And *within* apps I don't see any huge issues.

I've checked Activity Monitor, and the processor usage and memory seem normal. There's a bit of swap being used, but that's not new.

Screenshot 2023-09-06 at 9.11.16 AM.png
Screenshot 2023-09-06 at 9.11.11 AM.png

The reason I can tell it's related to being logged into the two accounts is that when I log out of either one, the issue goes away.

What's weird is that, like I said, a few months ago I could be logged both accounts and everything was working quite smoothly, even with lots of apps open on both accounts.
 
Last edited:

zevrix

macrumors regular
Oct 10, 2012
240
142
I've checked Activity Monitor, and the processor usage and memory seem normal

your memory pressure is in the yellow. it's not normal.

once memory pressure is out of the green, you can expect all kind of performance issues.

check your app usage. you may have apps that gradually consume too much memory. sometimes relaunching such apps can bring your memory pressure back into the green.

if your memory pressure constantly gets into yellow it can also be a sign that your RAM is simply not sufficient for your regular workload.

and also check if any of your apps consume too much CPU. (on later systems on Intel machines, Apple's WindowServer was such a culprit. i remember having to make sure to not have more that 10 Finder windows open - otherwise WindowServer started consuming some ridiculous CPU amounts. that, fortunately, is in the past).
 
Last edited:

ignatius345

macrumors 604
Original poster
Aug 20, 2015
7,026
11,564
your memory pressure is in the yellow. it's not normal.

once memory pressure is out of the green, you can expect all kind of performance issues.
I also have an M1 Air with 8GB of RAM, and even when logged into two user accounts there, I've never seen this same specific issue. I'm familiar with the symptoms of overloaded RAM, and generally it's just beachball stuff, slowness when switching from one app to another, etc. This is different. It's a major slowdown specifically in graphics.

check your app usage. you may have apps that gradually consume too much memory. sometimes relaunching such apps can bring your memory pressure back into the green.

Just running some tests here, I went into my personal account, quit out of every single running application and came back to my work account. Memory pressure was green but the lag was as bad as ever. Like, if I grab a window and flick it around the screen quickly, it could lag by as much as 1/4 the way across the screen (very very ugly to see).

So, I logged back out of the personal account and came back again to the work account. The memory pressure was basically unchanged, still green, but now the graphics issue was immediately and totally gone. It seems like just being logged into a second account is causing this, even if nothing is really running there.

on later systems on Intel machines, Apple's WindowServer was such a culprit. i remember having to make sure to not have more that 10 Finder windows open - otherwise WindowServer started consuming some ridiculous CPU amounts. that, fortunately, is in the past).
I think I remember seeing that on my old Intel MacBook. I do at present use a lot of desktop spaces on both accounts with Mission Control. I'm going to do a bit of experimenting with the user accounts to see if that has an effect.

Again, the super weird part of all this is that 1) I'm not seeing this issue on my M1 Air with its 8GB of RAM, and I wasn't seeing it on this iMac prior to maybe a few months ago. The only thing I can think of that I installed new around that time was the Google Drive sync app. But that's also installed on the Air.

All very weird. Hoping maybe Sonoma fixes this somehow.
 

ignatius345

macrumors 604
Original poster
Aug 20, 2015
7,026
11,564
Just as an experiment to test out the Memory Pressure theory, I opened up my M1 MacBook Air, 8GB of RAM, logged into both personal and work user accounts. I opened up tons of apps on each account, just to stress test things: Illustrator, Photoshop, InDesign, plus email, web browsers, etc. Absolutely no issues. Windows drag like normal, and honestly things are still pretty responsive in general. Memory Pressure is pretty high here, plenty of swap space being used.

Screenshot 2023-09-07 at 10.53.09 AM.png

I have to conclude that whatever is happening on my iMac has to do with something installed there or something about the way I'm using it. Will have to keep digging.
 
Last edited:
  • Like
Reactions: zevrix

ignatius345

macrumors 604
Original poster
Aug 20, 2015
7,026
11,564
OK, one more very interesting data point. When logged into both users on the iMac, the slowdown only occurs in the work account. Personal account runs smooth as silk. Something is definitely up, but I really wish I knew what it was because it's a drag to have to sign out of and back into my personal account every day.
 

Brian33

macrumors 65816
Apr 30, 2008
1,437
360
USA (Virginia)
You've done some good troubleshooting. It certainly doesn't seem to be a memory issue. One of my (Intel, 8GB mem) Macs commonly has two or three users logged in; I agree you shouldn't be seeing laggy window drags!

When logged into both users on the iMac, the slowdown only occurs in the work account.
Well, narrowing that down helps somewhat. It suggests there's something different about the work account.. possibly one or more .plist files...

Perhaps the issue may be related to WindowServer. Honestly I'm just guessing, but This article at eclecticlight.co says:
WindowServer, sometimes referred to with a space as Window Server, is a group of interconnected services which handle window management, compositing of windows into the display image, and event-routing for apps. As a key part of the GUI, it’s launched to support the login window and runs until the user logs out. It has moved around between different systems over the years: originally it was Quartz Compositor, then part of Core Graphics, and currently is part of SkyLight. In Catalina, it’s to be found in /System/Library/PrivateFrameworks/SkyLight.framework/Resources, alongside pointer/cursor support.
Apps manage the contents of their own windows, and can generate OpenGL (now deprecated) and Metal code to take advantage of GPUs, for example. WindowServer takes each window from each running app and builds them into a layered display image. It passes that on to the graphics drivers to render in the graphics card(s), thus into the display(s).

The Terminal command below should show you the last 10minutes of WindowServer's log messages. Though I wasn't able to glean much from them, perhaps you'll see some error messages pop out. Despite what the (2020) article says, I wasn't able to find any log messages for subsystem 'com.apple.windowserver' -- maybe they've all been moved to "SkyLight".

You need to run this as an 'admin' user to display system log messages. Note that all those quotes are important:

log show --style compact --info --last 10m --predicate 'subsystem=="com.apple.SkyLight"'

Another idea is to delete (better yet, just move, so you can replace it if necessary) the offending user's windowserver .plist file. I think logging out and then back in will recreate it with "default" values (though I haven't tried this). This command: find ~/Library/Preferences -iname "*windowserver*" -ls should show you where it is. (Mine is in ~/Library/Preferences/ByHost).

I know that kind of problem would really bug me -- I hope you figure it out!

(EDIT: commands mentioned above were tested/run on my Intel Mac running Monterey.)
 

ignatius345

macrumors 604
Original poster
Aug 20, 2015
7,026
11,564
You've done some good troubleshooting. It certainly doesn't seem to be a memory issue. One of my (Intel, 8GB mem) Macs commonly has two or three users logged in; I agree you shouldn't be seeing laggy window drags!


Well, narrowing that down helps somewhat. It suggests there's something different about the work account.. possibly one or more .plist files...

Perhaps the issue may be related to WindowServer. Honestly I'm just guessing, but This article at eclecticlight.co says:


The Terminal command below should show you the last 10minutes of WindowServer's log messages. Though I wasn't able to glean much from them, perhaps you'll see some error messages pop out. Despite what the (2020) article says, I wasn't able to find any log messages for subsystem 'com.apple.windowserver' -- maybe they've all been moved to "SkyLight".

You need to run this as an 'admin' user to display system log messages. Note that all those quotes are important:

log show --style compact --info --last 10m --predicate 'subsystem=="com.apple.SkyLight"'

Another idea is to delete (better yet, just move, so you can replace it if necessary) the offending user's windowserver .plist file. I think logging out and then back in will recreate it with "default" values (though I haven't tried this). This command: find ~/Library/Preferences -iname "*windowserver*" -ls should show you where it is. (Mine is in ~/Library/Preferences/ByHost).

I know that kind of problem would really bug me -- I hope you figure it out!

(EDIT: commands mentioned above were tested/run on my Intel Mac running Monterey.)
Thank you! Lots to chew on here. When I get a little time over the weekend I'll see what I can do. It's definitely an annoyance.

(Eclectic Light is such a great resource. I don't know how that guy finds the time to write so extensively about the deep level Mac stuff, release experimental software and write about art at the same time. He must never sleep.)
 
Last edited:
  • Like
Reactions: zevrix

ignatius345

macrumors 604
Original poster
Aug 20, 2015
7,026
11,564
The Terminal command below should show you the last 10minutes of WindowServer's log messages. Though I wasn't able to glean much from them, perhaps you'll see some error messages pop out. Despite what the (2020) article says, I wasn't able to find any log messages for subsystem 'com.apple.windowserver' -- maybe they've all been moved to "SkyLight".

You need to run this as an 'admin' user to display system log messages. Note that all those quotes are important:

log show --style compact --info --last 10m --predicate 'subsystem=="com.apple.SkyLight"'

OK, so I ran that Terminal command in my Work account (the one where I'm seeing the window lag), but I'm too much of a novice to understand the output. Still, this below looks wrong to me, and there at least 1500 identical lines like this below. When I run that same command from my Personal account, I don't see any of these "timed out" messages.

Screenshot 2023-09-15 at 9.18.30 AM.png


Another idea is to delete (better yet, just move, so you can replace it if necessary) the offending user's windowserver .plist file. I think logging out and then back in will recreate it with "default" values (though I haven't tried this). This command: find ~/Library/Preferences -iname "*windowserver*" -ls should show you where it is. (Mine is in ~/Library/Preferences/ByHost).

I know that kind of problem would really bug me -- I hope you figure it out!

(EDIT: commands mentioned above were tested/run on my Intel Mac running Monterey.)
...so, given the above I'll probably move on to this next troubleshooting step. I'm a little nervous to do it right now because I am working all day and don't want to bork my Work account if this doesn't work. I'll hold off until I've got my MacBook Air on hand (stupidly left it at the office), just so I'm not totally hosed if I can't log into the Work account on the iMac.

Thanks again! Will report back for posterity.
 
Last edited:
  • Like
Reactions: Brian33

Brian33

macrumors 65816
Apr 30, 2008
1,437
360
USA (Virginia)
Still, this below looks wrong to me, and there at least 1500 identical lines like this below. When I run that same command from my Personal account, I don't see any of these "timed out" messages.
Yes, 1500 lines of that seems to indicate a problem, IMHO. My log output doesn't have any messages containing "timed out". For example:

Code:
2023-09-15 10:40:11.654 I  WindowServer[192:2f4] [com.apple.SkyLight:packages] 0[outside of RPC]: window 2e5 parted space 1
2023-09-15 10:40:12.761 I  WindowServer[192:2f4] [com.apple.SkyLight:packages] 0[PostFilteredEventTapData]: space 1 front connection changed from 1a21f to 2c067
2023-09-15 10:40:12.761 I  WindowServer[192:2f4] [com.apple.SkyLight:packages] 0[PostFilteredEventTapData]: requesting window 38 resign key appearance
2023-09-15 10:40:12.761 I  WindowServer[192:2f4] [com.apple.SkyLight:packages] 0[PostFilteredEventTapData]: requesting window 38 resign main appearance
2023-09-15 10:40:12.763 I  WindowServer[192:2f4] [com.apple.SkyLight:cursor] <private> Taking cursor environment
2023-09-15 10:40:12.764 I  WindowServer[192:2f4] [com.apple.SkyLight:cursor] <private> Showed cursor
2023-09-15 10:40:12.766 Df WindowServer[192:2f4] [com.apple.SkyLight:default] [ ConnectionDebug ] New conn 0x69a9f, PID 1837 in session 257 on console
2023-09-15 10:40:12.791 I  WindowServer[192:2f4] [com.apple.SkyLight:packages] 1a21f[SetWindowHasKeyAppearance]: request window 38 set inactive key appearance
2023-09-15 10:40:12.791 I  WindowServer[192:2f4] [com.apple.SkyLight:packages] 1a21f[SetWindowHasMainAppearance]: request window 38 set inactive main appearance
2023-09-15 10:40:12.811 I  WindowServer[192:2f4] [com.apple.SkyLight:packages] 2c067[SetWindowHasKeyAppearance]: request window 2d2 set active key appearance
2023-09-15 10:40:12.811 I  WindowServer[192:2f4] [com.apple.SkyLight:packages] 2c067[SetWindowHasMainAppearance]: request window 2d2 set active main appearance
2023-09-15 10:40:12.873 Df WindowServer[192:2f4] [com.apple.SkyLight:default] [ ConnectionDebug ] Closing conn 0x69a9f, PID 1837 in session 257 on console
2023-09-15 10:40:13.712 Df WindowServer[192:2f4] [com.apple.SkyLight:default] [ ConnectionDebug ] New conn 0x59fa3, PID 1837 in session 257 on console
2023-09-15 10:40:15.686 Df WindowServer[192:2f4] [com.apple.SkyLight:default] [ ConnectionDebug ] Closing conn 0x59fa3, PID 1837 in session 257 on console
2023-09-15 10:40:16.703 Df WindowServer[192:2f4] [com.apple.SkyLight:default] [ ConnectionDebug ] New conn 0x51a1f, PID 1837 in session 257 on console
2023-09-15 10:40:17.594 Df WindowServer[192:2f4] [com.apple.SkyLight:default] [ ConnectionDebug ] Closing conn 0x51a1f, PID 1837 in session 257 on console
2023-09-15 10:40:18.899 I  WindowServer[192:2f4] [com.apple.SkyLight:cursor] <private> Taking cursor environment
2023-09-15 10:40:18.900 I  WindowServer[192:2f4] [com.apple.SkyLight:cursor] <private> Showed cursor
2023-09-15 10:40:18.901 I  WindowServer[192:2f4] [com.apple.SkyLight:packages] 2541b[TransactionCommitSync]: current space changed 1 -> 67
2023-09-15 10:40:18.902 I  WindowServer[192:2f4] [com.apple.SkyLight:packages] 2541b[TransactionCommitSync]: window 35 parted space 1
2023-09-15 10:40:18.902 I  WindowServer[192:2f4] [com.apple.SkyLight:packages] 2541b[TransactionCommitSync]: window 2de joined space 68
2023-09-15 10:40:18.902 I  WindowServer[192:2f4] [com.apple.SkyLight:packages] 2541b[TransactionCommitSync]: window 36 parted space 1
2023-09-15 10:40:18.902 I  WindowServer[192:2f4] [com.apple.SkyLight:packages] 2541b[TransactionCommitSync]: window 2df joined space 68

I noticed that all the lines you showed have the same timestamp, down to the thousandth of a second! I think having "errors" happening so fast is likely to be related to your poor window-drag response time. Unfortunately I have no clue why the transactions are timing out. I don't have an understanding of how WindowServer works; is it executed as several processes, and if so, which ones? The only process on my Monterey system containing the string "window" in its name is "loginwindow.app". Is that related? ... I don't know! I tried googling the logged errors without finding much help.


About recreating the windowserver plist:
I'm a little nervous to do it right now because I am working all day and don't want to bork my Work account if this doesn't work. I'll hold off until I've got my MacBook Air on hand
I think you're right to be cautious about my suggestion to move the windowserver .plist file in the hopes a new one would be re-created. In a little bit I may try it with a less important user account to see if anything bad happens.

My current user's file is called 'com.apple.windowserver.BC0836B6-931D-551E-B5EB-987E179FB8C2.plist'
I was curious so I "printed" it to the terminal by using the 'plutil -p' command:

plutil -p com.apple.windowserver.BC0836B6-931D-551E-B5EB-987E179FB8C2.plist

It's 266 lines and seems to have a lot of display information, but nothing obvious related to your issue, so I may be way off track about it. I attached it just if you're curious. (This is from Monterey running on a 2015 MacBook Pro with no external monitor.)

If I get a chance to try deleting a user's windowserver...plist file, I'll post again.
 
Last edited:
  • Like
Reactions: ignatius345

Brian33

macrumors 65816
Apr 30, 2008
1,437
360
USA (Virginia)
If I get a chance to try deleting a user's windowserver...plist file, I'll post again.
Heh. I created a new user, and checked two existing users on this Mac and none of them had a windowserver .plist file at all. So it appears not to be neccessary at all. Likely a red herring (sorry).

Dummy that I am, I also realized I didn't account for capitalization when looking for windowserver processes running... there is (on Monterey) a process running this command:

/System/Library/PrivateFrameworks/SkyLight.framework/Resources/WindowServer -daemon

So that's something. There appears to be just a single instance (not one for each logged in user).

You could look at it in Activity Monitor.app to see if it's using an inordinate amount of cpu time. (Pick View->Show all processes, and then use the magnifying glass search field in the upper right corner and put in WindowServer.) On this old Macbook Pro, it uses 2-8 % of CPU with not much happening, up to 45% of CPU if I drag a window around in circles.
 

Brian33

macrumors 65816
Apr 30, 2008
1,437
360
USA (Virginia)
How do you log in to 2 accounts at the same time?

Well, you can't have both accounts displayed on the screen at the same time, but you can easily log into multiple accounts with "fast user switching" enabled. It puts a drop-down on the menu bar that allows you to log into another user account or go back to the login window, while leaving the first account logged in (with no screen). All the processes for that account will still be running... you just can't have user interaction with them until you "fast user switch" back to that first account. While you do have to enter a password, each switch doesn't have to do a whole logout and login and it is much faster.

In Monterey and earlier, the setting is in System Preferences-->Users & Groups-->"Show fast user switching menu as". I don't know where they might have moved the setting in Ventura's System Settings.
 

ignatius345

macrumors 604
Original poster
Aug 20, 2015
7,026
11,564
In Monterey and earlier, the setting is in System Preferences-->Users & Groups-->"Show fast user switching menu as". I don't know where they might have moved the setting in Ventura's System Settings.
It's under Control Center now -- confusingly no longer in Users & Groups.

I find it's easiest to just search for things in System Preferences now. The iOS-style list interface is not very intuitive to browse and remember.
 
  • Like
Reactions: Brian33

ignatius345

macrumors 604
Original poster
Aug 20, 2015
7,026
11,564
Heh. I created a new user, and checked two existing users on this Mac and none of them had a windowserver .plist file at all. So it appears not to be neccessary at all. Likely a red herring (sorry).

Dummy that I am, I also realized I didn't account for capitalization when looking for windowserver processes running... there is (on Monterey) a process running this command:

/System/Library/PrivateFrameworks/SkyLight.framework/Resources/WindowServer -daemon

So that's something. There appears to be just a single instance (not one for each logged in user).

You could look at it in Activity Monitor.app to see if it's using an inordinate amount of cpu time. (Pick View->Show all processes, and then use the magnifying glass search field in the upper right corner and put in WindowServer.) On this old Macbook Pro, it uses 2-8 % of CPU with not much happening, up to 45% of CPU if I drag a window around in circles.
I'll have to look next time the lag hits me. Maddeningly, it's not consistent. I did survey my CPU usage when it was happening and didn't see anything bonkers.

My current hunch is that there's something installed and running on my Work user account that isn't running in my Personal -- and also isn't running on my MacBook Air at all. I'll start hunting around for it. Also, vaguely hoping that the Sonoma update fixes it, but not holding my breath.
 

Brian33

macrumors 65816
Apr 30, 2008
1,437
360
USA (Virginia)
I'm convinced that the log messages you saw "WindowServer... transaction 484 timed out" are relevant, but I don't know where to go from there!

My current hunch is that there's something installed and running on my Work user account that isn't running in my Personal -- and also isn't running on my MacBook Air at all.
Yes, I think that's the best path now.

Presuming some piece of software is causing this, it seems it may be starting automatically. The usual way this is done is with a "Launch Agent" (if it's intended to run at user login). Usually they have a '.plist' file in either /Library/LaunchAgents or ~/Library/LaunchAgents. You might want to check the files in those directories -- the filename usually has a company or product name and it might remind you of what's been installed.

In Ventura, I think LaunchAgent .plist files might also be allowed in the .app bundles, so those particular ones would be harder to find.
 
  • Like
Reactions: ignatius345

ignatius345

macrumors 604
Original poster
Aug 20, 2015
7,026
11,564
OK, so this is mildly embarrassing, but I finally stumbled on the cause of this issue: too many virtual desktops.

Turns out I was using quite a few virtual desktops (formerly called "Spaces") under Mission Control. I like to keep separate ones for separate tasks or things I'm working on -- like, a space that's just Mail and Messages; another with Calendar, Things, Reminders; maybe another with a web browser; another with Music and TV... It all works fine when working on a single user account, but from what I can tell it starts causing graphics issues when multiple users are logged in.

So, now I'm keeping things tighter, limiting my use to one or maybe two desktops, hiding apps I'm not actively using instead of just spreading it all out on 5 or 6 of them. This has resulted in things remaining smooth and usable even with multiple users logged in simultaneously.
 

Brian33

macrumors 65816
Apr 30, 2008
1,437
360
USA (Virginia)
Well, that’s interesting. It seems that the multitude of virtual desktops imposes a lot of overhead on the windowserver process. Still, this seems like a bug to me, as you state that you didn’t have this issue in the past, and from my reading of your first post, it started when you began running Ventura.

In any case, I’m glad you found a solution, and many thanks for updating the thread here!
 
  • Like
Reactions: ignatius345

ignatius345

macrumors 604
Original poster
Aug 20, 2015
7,026
11,564
Well, that’s interesting. It seems that the multitude of virtual desktops imposes a lot of overhead on the windowserver process. Still, this seems like a bug to me, as you state that you didn’t have this issue in the past, and from my reading of your first post, it started when you began running Ventura.

In any case, I’m glad you found a solution, and many thanks for updating the thread here!
I'm glad I finally stumbled on the solution. I was actually eyeballing bigger and badder Macs, hoping I could just throw RAM and processor power at the problem :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.