Hi miracle4,
Thanks for contacting Apple Support Communities!
We understand that your Mac display is dark and flickering unexpectedly.
Did the diagnostic test report any issue with hardware? If not, check out the troubleshooting steps outlined here to help you to isolate this behavior further: If your Mac display doesn’t look right
"• If the display is black or dim: Try adjusting your display’s brightness.
• If images are too large or too small: Try adjusting your display’s resolution.
• If the colors don’t look right: Try using the display profile designed for your display. For example, if you’re using a Thunderbolt display, choose Apple menu
> System Settings, then click Displays
in the sidebar. (You may need to scroll down.) Click the pop-up menu next to “Color profile” on the right, then choose Thunderbolt Display. If that doesn’t work, try calibrating the display.
• If your display is blurry: Make sure your Mac has detected that display. Choose Apple menu > System Settings, then click Displays.
To see the Detect Displays button, press the Option key. Then click the button to detect the display.
• If the display is flickering: Make sure your Mac and display are connected to one another with good quality cables and adapters. You may also be experiencing interference from a nearby power line, a fluorescent light, a radio, a microwave oven, another computer, or another electrical device. Try relocating nearby electrical devices, or moving your Mac and display.
• If you see bright or dark spots on a flat-panel or Mac laptop screen: Your display may have pixel anomalies. If you suspect your Apple display contains a high number of anomalies, contact Apple or an Apple Authorized Service Provider for service. Repairs performed by untrained individuals or using non-genuine Apple parts may affect the safety and functionality of the device.
• If none of these solutions work: If you have an Apple display and can’t correct the problem, contact Apple or an Apple Authorized Service Provider for service. Repairs performed by untrained individuals or using non-genuine Apple parts may affect the safety and functionality of the device."
If your MacBook is an Intel based Mac, you can also reset the NVRAM which stores the settings for your display: Reset NVRAM on your Mac
If you're still experiencing the same behavior when you're through troubleshooting, you may consider reaching out to Apple directly as your Mac may require service. You can reach them here: Contact Apple Support
Take care!