If you turn on your mac and your MacBook pro or air turns on but stays black screen and mac is running in background then this an issue with display or it can be corrupted software’s or bugs or also due to software’s that are installed on your mac also cause this issue.
You can try force restarting your MacBook pro or air and remove any connected external devices which may also play a role in displaying black screen due to incompatibility issue or battery or power plug failure issues and reinstall macOS and boot mac in safe mode and check with display issue of MacBook pro or air if still it does not resolve black screen on mac.
MacBook Screen Goes Black, But Still Running
Follow below methods to fix MacBook black screen issue
Check MacBook is in Sleep Mode Or Not
If your macbook is in sleep mode or went to sleep mode then you need to wake your macbook and check and change sleep settings on your mac.
Force Shutdown and Restart your MacBook pro or Air
Press and hold the power button on your macbook pro or air until you see the apple logo and wait for your mac to restart and reboot.
Plug in Adaptor and Restart your Mac
Plug in the charging adapter and press and hold the power button, command and control button and turn on your mac.
Remove Connected External Cables
If you have connected any external cables, like external hard drives or any other external devices to your mac then disconnect and remove all cables and plug in the power adapter and turn on mac and check.
Shutdown your mac completely and press and hold power button, Shift key and control for 10 to 15 seconds and release all buttons, now wait for your mac to restart and this will reset smc and if your macbook starts normally then your issue will be resolved.
Reset PRAM or NVRAM for Display issues
Step 1: Shutdown your mac completely.
Step 2: Press and hold options, command, P, R and Power button for 10 seconds and release the keys
Step 3: Wait for your macbook to restart and if it restarts properly without any black screen then your issue of macbook black screen but mac is still running will be fixed successfully.
Boot Mac in Safe Mode
You can boot mac in safe mode and check and to boot mac in safe mode and if you are having intel based mac then first Restart your mac and then press and hold shift key until you see login screen and your macbook will be booted in safe mode.
To boot Apple silicon mac to safe mode -> press and hold power button until you see startup options -> Select Macintosh boot disk and hold shift key and click on continue in safe mode.
You can reinstall macOS and fix the issue of Macbook Screen black screen and if you are having apple silicone mac -> Press and hold power button until you see startup option and then select settings (gear icon) and continue -> Select Reinstall MacOS and Continue and reinstall macOS. After reinstall macOS MacBook black screen issue will be resolved.
For intel based mac, Press and hold command and R key -> until startup screen appears on your mac ->select reinstall macOS and continue and wait for mac to reinstall macOS.