Skip to content

The Eclectic Light Company

Macs, painting, and more
Main navigation
  • Downloads
  • M1 & M2 Macs
  • Mac Problems
  • Mac articles
  • Art
  • Macs
  • Painting
hoakley January 8, 2022 Macs, Technology

Explainer: Logging out and in

When something’s not working right on your Mac, one of the most common and effective solutions is to restart it. What happens next is that the Mac shuts down and immediately restarts, going through the full boot process. That’s not quite the same as shutting down, leaving your Mac a minute or two, then starting up, what’s often known as a cold boot. But in many cases, neither of those is necessary, and it’s quicker and less disruptive to log out and log back in again.

Take a look in Activity Monitor to understand how this might work. View all processes in the CPU tab and sort them by the User column. You’ll see the majority of users are you, the user who’s currently logged in. Those at the bottom of the list are running as root, and there are some with custom users such as _spotlight in the middle. When you log out but don’t restart your Mac, many of those processes running as the current user should be shut down, and only started up again when you log back in.

This can sometimes fix problems with WindowServer, although it isn’t normally shut down when you log out, neither is the troublemaker cfprefsd. Contrary to what you might expect, some user processes continue running uninterrupted even after you’ve logged out. However, in the recent past macOS itself has used user logout as a way to restart WindowServer without rebooting. When you suspect WindowServer problems, logging out and back in again is usually a first attempt, although in more recent versions of macOS, that may not help, and a complete restart may be the only way to address this.

cfprefsd is a particular nuisance here, as there are normally both root and user copies running to handle all those preferences. You wouldn’t expect the root copy to be affected by logging out, but at least the user copy could have the decency to do so. This means that, if you’re trying to slip a manual change to a preference file past cfprefsd, a full restart is likely to be required.

So how can you tell which processes could be refreshed by this manoeuvre? To find out, sort the list of processes in Activity Monitor by their Process Identifier or PID.

At the top, with PID 0, you’ll see kernel_task, followed by launchd with a PID of 1. As these PIDs are assigned in simple numerical order, they reveal the order of process startup. Find WindowServer in the list, and it’ll generally have a PID of around 152. Not too far below it you should see the first user process, loginwindow, at around 166; that’s also the first process to be given its own icon at the start of the line. Processes with lower PIDs were all started before login, and those with higher PIDs were started afterwards.

Some of those user processes, and some of those with PIDs greater than loginwindow, should be shut down when you log out, then be started up again, as needed, when you log back in again. But if try that and check PIDs again, and glance at the CPU Time column, it’s apparent that many user and other late-loading processes retain low PIDs and long CPU times. To refresh those a restart will be needed, another example where saving effort in macOS doesn’t help you maintain it.

Normally, this manoeuvre should only take a few seconds to complete. Because your Mac isn’t starting up from scratch, its Bluetooth remains working throughout, so there’s no frustrating delay before you can type your password in. With a bit of luck your Mac should then be back in fine fettle again, ready for you to resume work with the minimum of disruption.

What this doesn’t do, of course, is flush the caches and clean up any accumulated crud in your user account. For that, starting up in Safe mode remains the only solution. Remember that has changed on M1 Macs, which have to be shut down and started up in Recovery before the option of Safe mode is available. That’s not as convenient as holding the Shift key down on an Intel Mac, but neither do you have to remember all those arcane startup key combinations.

Share this:

  • Twitter
  • Facebook
  • Reddit
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

Related

Posted in Macs, Technology and tagged Activity Monitor, log in, login, macOS, PID, root, users, WindowServer. Bookmark the permalink.

6Comments

Add yours
  1. 1
    Alan Ralph on January 8, 2022 at 11:13 am

    I guess I’m fortunate in not experiencing many instances of apps slowing down or becoming unresponsive. And those are usually slow because they’re doing a LOT of processing for me, for instance ImageOptim compressing images or Permute or Handbrake transcoding media. Occasionally I’ll close and reopen an app if I spot it’s using a lot of memory while idle, but with 48GB of RAM I’m rarely in danger or running out! Using iStat Menu gives me an idea of how my system and most-used apps behave on a regular basis, so I only act nowadays if something is definitely not normal.

    LikeLiked by 1 person

    • 2
      hoakley on January 8, 2022 at 8:06 pm

      Thank you.
      Howard.

      LikeLike

  2. 3
    EcleX on January 8, 2022 at 11:31 am

    Thanks for the interesting article. Could we say that the “severity” or “comprehensiveness” of the process (to fix issues) is lower for logging out, then for restart and then for shutting down? In other words, is it convenient to try first to log out, if not fixed try to restart and if not fixed try to shut down? BTW, why it a good idea to wait a minute or two after shutting down as you said? Is it also a good idea to wait such minutes before safe booting from a shut down Mac?

    LikeLiked by 1 person

    • 4
      hoakley on January 8, 2022 at 8:13 pm

      I don’t think this has anything to do with severity, but comprehensiveness is exactly my point: logging out and back in restarts few processes. A restart should fix most, but may not give all your peripherals a fresh start, which is why I recommend leaving the Mac shut down for a minute or more when you want a cold boot. That should ensure that external displays, disks, and other peripherals start from cold. You don’t normally need to do that when Safe booting, but M1 Macs require that you shut down rather than simply restarting.
      Howard.

      LikeLike

  3. 5
    Simon Simpson on January 9, 2022 at 7:42 am

    The reason why it is a good idea to wait a few minutes after shutting down any electronic device before restarting is to allow any residual power held in the capacitors in the power supply to discharge thus ensuring that any memory is completely flushed of its contents.

    LikeLiked by 1 person

    • 6
      hoakley on January 9, 2022 at 10:50 pm

      Thank you. Yes, that’s worth the few moments, although I’m never sure as to how long those moments should last! With peripherals it’s rather easier to see.
      Howard.

      LikeLike

·Comments are closed.

Quick Links

  • Downloads
  • Mac Troubleshooting Summary
  • M1 & M2 Macs
  • Mac problem-solving
  • Painting topics
  • Painting
  • Long Reads

Search

Monthly archives

  • February 2023 (2)
  • January 2023 (74)
  • December 2022 (74)
  • November 2022 (72)
  • October 2022 (76)
  • September 2022 (72)
  • August 2022 (75)
  • July 2022 (76)
  • June 2022 (73)
  • May 2022 (76)
  • April 2022 (71)
  • March 2022 (77)
  • February 2022 (68)
  • January 2022 (77)
  • December 2021 (75)
  • November 2021 (72)
  • October 2021 (75)
  • September 2021 (76)
  • August 2021 (75)
  • July 2021 (75)
  • June 2021 (71)
  • May 2021 (80)
  • April 2021 (79)
  • March 2021 (77)
  • February 2021 (75)
  • January 2021 (75)
  • December 2020 (77)
  • November 2020 (84)
  • October 2020 (81)
  • September 2020 (79)
  • August 2020 (103)
  • July 2020 (81)
  • June 2020 (78)
  • May 2020 (78)
  • April 2020 (81)
  • March 2020 (86)
  • February 2020 (77)
  • January 2020 (86)
  • December 2019 (82)
  • November 2019 (74)
  • October 2019 (89)
  • September 2019 (80)
  • August 2019 (91)
  • July 2019 (95)
  • June 2019 (88)
  • May 2019 (91)
  • April 2019 (79)
  • March 2019 (78)
  • February 2019 (71)
  • January 2019 (69)
  • December 2018 (79)
  • November 2018 (71)
  • October 2018 (78)
  • September 2018 (76)
  • August 2018 (78)
  • July 2018 (76)
  • June 2018 (77)
  • May 2018 (71)
  • April 2018 (67)
  • March 2018 (73)
  • February 2018 (67)
  • January 2018 (83)
  • December 2017 (94)
  • November 2017 (73)
  • October 2017 (86)
  • September 2017 (92)
  • August 2017 (69)
  • July 2017 (81)
  • June 2017 (76)
  • May 2017 (90)
  • April 2017 (76)
  • March 2017 (79)
  • February 2017 (65)
  • January 2017 (76)
  • December 2016 (75)
  • November 2016 (68)
  • October 2016 (76)
  • September 2016 (78)
  • August 2016 (70)
  • July 2016 (74)
  • June 2016 (66)
  • May 2016 (71)
  • April 2016 (67)
  • March 2016 (71)
  • February 2016 (68)
  • January 2016 (90)
  • December 2015 (96)
  • November 2015 (103)
  • October 2015 (119)
  • September 2015 (115)
  • August 2015 (117)
  • July 2015 (117)
  • June 2015 (105)
  • May 2015 (111)
  • April 2015 (119)
  • March 2015 (69)
  • February 2015 (54)
  • January 2015 (39)

Tags

APFS Apple AppleScript Apple silicon backup Big Sur Blake bug Catalina Consolation Console diagnosis Disk Utility Doré El Capitan extended attributes Finder firmware Gatekeeper Gérôme HFS+ High Sierra history of painting iCloud Impressionism iOS landscape LockRattler log logs M1 Mac Mac history macOS macOS 10.12 macOS 10.13 macOS 10.14 macOS 10.15 macOS 11 macOS 12 macOS 13 malware Mojave Monet Monterey Moreau MRT myth narrative OS X Ovid painting Pissarro Poussin privacy realism Renoir riddle Rubens Sargent scripting security Sierra SilentKnight SSD Swift symbolism Time Machine Turner update upgrade Ventura xattr Xcode XProtect

Statistics

  • 13,770,249 hits
Blog at WordPress.com.
Footer navigation
  • About & Contact
  • Macs
  • Painting
  • Language
  • Tech
  • Life
  • General
  • Downloads
  • Mac problem-solving
  • Extended attributes (xattrs)
  • Painting topics
  • Hieronymus Bosch
  • English language
  • LockRattler: 10.12 Sierra
  • LockRattler: 10.13 High Sierra
  • LockRattler: 10.11 El Capitan
  • Updates: El Capitan
  • Updates: Sierra, High Sierra, Mojave, Catalina, Big Sur
  • LockRattler: 10.14 Mojave
  • SilentKnight, silnite, LockRattler, SystHist & Scrub
  • DelightEd & Podofyllin
  • xattred, Metamer, Sandstrip & xattr tools
  • 32-bitCheck & ArchiChect
  • T2M2, Ulbow, Consolation and log utilities
  • Cirrus & Bailiff
  • Taccy, Signet, Precize, Alifix, UTIutility, Sparsity, alisma
  • Revisionist & DeepTools
  • Text Utilities: Nalaprop, Dystextia and others
  • PDF
  • Keychains & Permissions
  • LockRattler: 10.15 Catalina
  • Updates
  • Spundle, Cormorant, Stibium, Dintch, Fintch and cintch
  • Long Reads
  • Mac Troubleshooting Summary
  • LockRattler: 11.0 Big Sur
  • M1 & M2 Macs
  • Mints: a multifunction utility
  • LockRattler: 12.x Monterey
  • VisualLookUpTest
  • Virtualisation on Apple silicon
  • LockRattler: 13.x Ventura
Secondary navigation
  • Search

Post navigation

In memoriam Antoine Coypel 2
Saturday Mac riddles 133

Begin typing your search above and press return to search. Press Esc to cancel.

  • Follow Following
    • The Eclectic Light Company
    • Join 3,130 other followers
    • Already have a WordPress.com account? Log in now.
    • The Eclectic Light Company
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
%d bloggers like this: