How to Fix MacBook Pro Going Back to Login Screen Randomly

Mac
Mac book Pro in coffee shop

A few months ago, macOS Mojave gets launched to the delight of many Mac users. It comes with an interface overhaul that needs to be initiated by the user, involving the popular Dark Mode. New features also include the Desktop Stacks, the reinvented Finder, and the new Gallery view, to name a few.

As far as issues go, however, a Mojave upgrade isn’t really immune to Mac errors. One issue that keeps bugging a number of users is when their MacBook Pro randomly goes back to the login screen. Here’s a specific case that demonstrates this problem.

A user updates his MacBook Pro to Mojave the previous day. After the installation process, he clicks on a user and tries to log in. Within just 30 seconds, the screen flickers, taking him back to the login screen.

The glitch happens for all accounts on his machine. He has tried repairing the disk as well as exhausting all other repair processes. But the error manages to persist on his laptop, which admittedly is an old one but should still work fairly well.

In other cases, the Mac keeps going to sleep or login screen multiple times a day even though the user is working on it and either browsing or typing. The lid is kept open and there is activity on the computer when the system goes back to the login screen, which is very similar when you press the Command + Shift + Power buttons.

This often happens shortly after the user has logged in for a few minutes. For instance, the user logs in in the morning to start work and a few seconds later, the screen is locked out. When the user tries to log back in, he is again locked out after a few seconds.

In some cases, the screensaver randomly turns on without any notice. Tapping the touch ID usually toggles between the screensaver and the login screen, but doing so does not unlock the computer. Even if the password has been typed in, the computer will just go from the login screen back to the screensaver. This has caused endless frustration to the affected users and there are very few references to this issue online.

Let’s get to the bottom of things with this quick article.

Why Does My Mac Keep Going to the Lock Screen?

One possible reason why your Mac locks the screen automatically is that you have set up a Hot Corner that quickly activates the screen saver when you leave your computer. To check whether this is the case, click System Preferences from the Apple menu, then go to Desktop & Screen Saver. Click on Screen Saver, and then choose Hot Corners.

Desktop and Screensaver Mac

Click the list next to the corner of the screen to see if any of the corners are set to “Put Display to Sleep.” If it is, remove it from the Hot Corners list to fix the error.

Another possible reason is that your Mac’s Energy Saver feature is not configured correctly. If your Energy Saver feature is not set up properly, it can cause your Mac to go to sleep randomly. To check, click Apple menu > System Preferences, then choose Energy Saver.

Mac Energy Saver

Adjust one or more of the following settings when your Mac goes to sleep. Keep in mind that some of these controls might not be available on your Mac.

  • “Turn display off after”
  • “Display sleep”
  • “Computer sleep”

If a slider is set to Never, sleep is disabled for that feature.

You also need to make sure that there are no magnets near your Mac because magnets can interfere with your operating system and put it to sleep.

MacBook Pro Goes Back to Login Screen Randomly

The difficulty here is that there appears to be no clear pattern or trigger for the misbehavior. The computer seems to return to login screen randomly and without any exact reason to do so, other than it happens following a Mojave update.

We’ve connected with our in-house experts and scraped the web for viable solutions to this post-Mojave update issue. Before performing these fixes, though, try to check everything from your hardware connections to your system’s stability via running a Mac repair tool that you trust. Sometimes, junk files that have accumulated over time can interfere with normal systems and processes, in turn ruining your Mac’s performance.

If your MacBook still randomly goes back to the login screen, try these solutions:

Making Basic Checks on Your MacBook

You can try to download iStat Pro and check on your actual RAM usage. It is recommended that you check how full your hard drive is, as you may already be using up your RAM. As a result, your hard drive may have insufficient space to create enough virtual memory.

Mac Activity Monitor

Make sure, too, that your laptop is not overheating. This can happen while you are playing videos, gaming, or working on intensive processes for a long period of time. Rule out this reason for why your laptop is crashing and randomly returning to the login screen.

Boot into Safe Mode

Before you try anything else, you need to find out whether the problem is caused by conflicts with third-party software. And you can do this by booting into a Safe Mode environment. Just press the Shift key when you restart to boot into Safe Mode. When you do this, all non-Apple components will be loaded so you can check whether the error is triggered by external factors.

Once you’ve booted into Safe Mode, observe your Macbook Pro if it is still going to sleep randomly. If it does, proceed to the next step.

Creating a New User Account

If it appears that the problem is occurring due to your user account, then you might want to consider creating a new one. Log out of your existing user profile and then log back in with the new one, checking if the issue is finally resolved.

Users and Groups - Standard

Add a user by following these steps:

  1. On your Mac, click Apple menu > System Preferences. Next, proceed to Users & Groups.
  2. Click the lock icon in order to unlock it. Enter an administrator name as well as password.
  3. Afterwards, click the Add button located below the list of users.
  4. Click the New Account pop-up menu. From here, select a type of user. An Administrator can add and manage other users, install apps, and change settings. A Standard user is set up by an administrator, while users with Managed with Parental Controls type can access only the content specified by the admin. Sharing Only users, on the other hand, can access shared files remotely, but they cannot log in to or change settings.
  5. Input a full name for the new user. Then, an account name is automatically generated. Use a different account name by entering it now. Note that you cannot change this later.
  6. Enter a password for the user. Re-enter it to verify. Enter a password hint as well.
  7. Hit Create User.
  8. Depending on the type of user you create, you can perform different steps. For an administrator, choose Allow user to administer this computer. For a managed user, choose Enable parental controls.

Performing an SMS and PRAM/NVRAM Reset

System Management Controller (SMC) is a chip embedded in Intel-based Mac devices. It is responsible for the workings of most Mac parts, including keyboard and peripherals. It also figures in the operation of your hard drive and power supply. Reset the SMC of your MacBook with these steps:

MacBooks with Apple T2 security chip:

  1. Shut down your laptop.
  2. Press and hold the Power button for some 10 seconds. Restart afterwards. If you are having trouble upon startup, switch off your machine again.
  3. Press and hold the Power + Shift + left Control + left Option keys for a few seconds.
  4. Release all the keys and wait a few more seconds.
  5. Reboot your MacBook.

MacBooks with non-removable battery:

  1. Shut down your laptop.
  2. Press and hold the left Option + Control + Shift keys while you press the Power button for around 10 seconds.
  3. Release all the keys at once and wait for a number of seconds.
  4. Switch on your MacBook.

MacBook released before 2015:

  1. Shut down your laptop.
  2. Remove the battery.
  3. Press and hold Power for 15 to 20 seconds.
  4. Put back the battery again.
  5. Switch on your MacBook.

Older Mac models have Parameter Random Access Memory (PRAM), while modern Intel-based ones have Non-Volatile Random Access Memory (NVRAM). You can reset your PRAM or NVRAM when there are software-related issues, the computer forgot specific settings, or there are connectivity problems.

Follow these instructions to reset the PRAM or NVRAM:

  1. Turn off your MacBook.
  2. Press Power.
  3. Before reaching the grey screen, press the R + P + Command + Option keys all at once. Hold them down until the computer restarts and you hear the startup sound.
  4. Release the keys together.

Using Terminal

This method comes directly from Apple support, with guidance from their engineers. Here are the steps to follow closely:

  1. Boot into Recovery. Do this by holding the Command + R keys down and turning on your computer.
  2. Open Disk Utility. Next, choose the startup volume.
  3. Take note of the name of the volume, which is typically Macintosh HD. If the name is dimmed, hit the Mount button. Enter the password of a user who can unlock the disk.
  4. Take note of the number that is shown next to Available.
  5. It’s time to quit Disk Utility.
  6. Next, choose Utilities > Terminal. Replace the bolded hard drive name with the name your drive is called. Enter this command: cd “/Volumes/Macintosh HD/Library/Audio/Plug-Ins/HAL”
  7. If this command gets accepted, input this on the next line: mv *.plugin ..
  8. It the system takes the command, quit Terminal.
  9. Reboot your computer in normal mode and log in as usual.

Rename the .Plist Files

Sometimes preferences files get corrupted and cause your Mac to go to sleep randomly or kick you back to the login screen. You can easily fix this by renaming the plist files to reset them. Remember that you must boot your device in Safe Mode and log in using your admin account to fix this.

Renaming PList Files

Follow the steps below:

  1. Open Finder and click on Go in the menu bar.
  2. Press the Option key to reveal the Library menu.
  3. Click on Library to open the folder.
  4. Launch Terminal.
  5. Type in sudo mv and drag the Preferences folder from the Library folder directly to the open Terminal window.
  6. Rename the Preference folder. For example: sudo mv /Users/yourname/Library/Preferences to /Users/yourname/Documents/Preferences-Old
  7. Reboot your Mac.

Boot your Mac into macOS Recovery Mode

The macOS Recovery Mode is an important part of the built-in recovery system of your Mac. You can boot from macOS Recovery and take advantage of its utilities to recover from specific software issues or perform other operations on your Mac. To boot into macOS Recovery Mode, follow the steps below:

  1. Press and then hold the power button until your Mac turns off.
  2. Reboot your Mac and immediately hold down the Command + R keys.
  3. Release both keys when you see the loading bar.
  4. Wait for the macOS Utilities screen to pop up.

There are several operations you can do in macOS Recovery Mode when your Mac goes back randomly to the login screen. One of the things you can do is to repair the corrupted startup disk, in case your login problem is related to your hard drive.

It is possible that you are always logged out and brought back to the login screen due to disk corruption. Once your startup disk is damaged, some of the functions won’t load normally. To fix the damaged drive, you have to use Mac’s built-in helper in the macOS Utilities window, the Disk Utility. The appearance might be different in OS X and mac OS, but the functions are the same. Here’s how you can use it:

  1. Choose Disk Utility from the macOS Utilities window, then click Continue.
  2. Click on View and select Show All Devices to list all detected drives and volumes.
  3. Select Macintosh HD, which is the startup disk in the left sidebar.
  4. Click First Aid on the top menu of Disk Utility.
  5. Click on Run to check and repair errors in this drive.
  6. Once the drive is fixed, you are good to go.

Aside from fixing the corrupted disk, there are other things you can do within the macOS Recovery utility to fix Mac going back to the login screen. For instance, you can reset the password, reset the launch services database, check and fix user preference settings, and even reinstall the mac OS to make your computer work again.

Final Notes

It can be incredibly disruptive for your MacBook Pro to randomly return to the login screen following a Mojave update. Since it’s hard to figure out how long this issue will last and what is actually causing it, the solutions above are worth a try. Don’t think twice about getting help from Apple support if the issue persists!

Leave a Reply

Your email address will not be published. Required fields are marked *