A followup from my previous issue, which was similar but involved the laptop’s monitor not turning back on. After I fixed the script (and the fix is still active), both the laptop and external monitor turned back on after being woken from sleep. However, in the past few days, the laptop turns back on while the external monitor does not. I can still move my cursor off the laptop screen, and the other monitor shows up in display settings, so it is being recognized, but I just get a black screen. What’s more, I’ve tried to disable/enable the external monitor from display settings, and even unplug and plug the HDMI connection, but that doesn’t help either. The only thing that works is restarting the laptop, at which point the external monitor is fully recognized again.
I’ve been updating my packages on a regular basis, but otherwise can’t think of anything that would have suddenly caused this.
UPDATE: I sort of discovered a workaround. When the laptop screen turns back on and presents the login, I can select the “Sleep” option, after which it goes to sleep. When I wake it up, the external monitor turns back on as well.
Have you tried undoing your changes to said script? You can temporarily override the DPKG diversion by installing a symbolic link to nvidia-sleep.sh.distrib:
cd /usr/bin
# make a backup of the local version
sudo cp -f --backup=t nvidia-sleep.sh{,}
sudo ln -sf nvidia-sleep.sh{.distrib,}
You think the problem is the changes I made to the script? Undoing it is easy - literally deleting the one line I put in - but I’m not sure how reverting it would solve this problem, given that the change is what relieved the other problem in the first place.
Well, if I recall, the problem wasn’t that the laptop didn’t wake but that said nvidia-sleep.sh did some hackery to switch virtual terminals on sleep/wakeup. Maybe that is required, when the driver works “correctly”, or whatever Nvidia take that word to mean. Perhaps there was some driver or kernel update in the meantime which fixed the actual cause of issue you were having; making nvidia-sleep.sh a no-op was merely a workaround for same.
I tried resetting the script, and it didn’t help anything. It just re-introduced the problem of the laptop not turning back on, alongside the external monitor.
Does it really not wake up? From the description in the other thread and what I remember from reading the script, simply switching the virtual console (VC) could do the trick. Try pressing CtrlAltF1 and CtrlAltF2; wait a few seconds after each invocation, to see if it has an effect.
I forgot to follow up on this. I’m not sure what changed (I think the video driver may have upgraded), but now the external monitor does successfully turn back on from sleep, even if it takes a while. I guess we can close this thread, although I’ll make a new one should this or a similar problem arise again.
In that case I suggest to select your last comments as the solution. That way people finding this thread will see it right away. The topic will automatically close 18 hours after the last reply. But you only need to ping the moderators to get it reopened, if need be.