Sometimes, maybe about 1 in 5 times, when I startup my laptop, there is no sound. I don't mean the startup sound doesn't play, no sound plays after that. If I go into the sound settings in the control panel, my speakers are enabled. However, when clicking the sound slider in the volume control in the taskbar, there is no green level indicating the beep being played. If I disable the speakers in the control panel and then reenable them, the level appears when I click the slider, but still no sound is played. Running the Windows audio playback troubleshooting returns no errors.
The Windows Audio and Windows Audio Endpoint Builder services are running in the services menu, and I restart them to no effect. I'm running the Realtek High Definition Audio drivers and according to Window they're up-to-date.
If I disable and reenable the speakers enough times in quick succession it seems to work, however this varies; sometimes it works after a couple of iterations, other times, after 50 or so iterations I give up.
I'm at my wits end. I've been trying to solve this problem for about a month and I don't know what to do at this point; I've done everything I can think of, so thanks in advance for your help.
EDIT: I just wanted to say that this didn't happen when I first bought the laptop, so I can only imagine it's something I've installed or tinkered with.