Score:0

How to stop screen from turning black on Ubuntu 20.04?

in flag

I have a problem that on Ubuntu 20.04 on my laptop. After some minutes of no mouse movement and keystrokes the screen turns black and only turns back on when I close the lid and reopen it. For this I also have to log back in.

I made the following settings to stop this, but the problem persists:

  1. Privacy > Screen lock. Blank Screen Delay: Never, Automatic Screen Lock: Off
  2. Power: Dim screen when inactive: Off, Blank Screen: Never, Automatic Suspend: Off

I also installed and activated Caffeine, but the problem persists.

How can I stop screen from turning black? I'm using a "Dell XPS 17 (9710)" laptop.

edit: It was only after posting the question that I realised that the problem occurs only when I'm using the software "PyCharm". If any other window (like Terminal or Firefox) is focused, then the screen does not turn black. Even if PyCharm is running in the background.

nobody avatar
gh flag
Is `xset -dpms` helping?
cn flag
Ray
Does your Dell XPS 17 have an NVidia card? Some do, but not all of them do. If so, have you tried installing updated NVidia drivers?
user505117 avatar
in flag
@nobody xset -dpms didn't help, unfortunately
user505117 avatar
in flag
@Ray Yes, my Dell XPS 17 has an NVidia card. After your suggestion, I tried installing nvidia-driver-510 (that seemed to be the latest tested proprietory driver), but the problem persists.
KGIII avatar
in flag
[This says it's for Ubuntu Server](https://linux-tips.us/how-to-disable-sleep-and-hibernation-on-ubuntu-server/) but it should work for a desktop system just fine. Have you tried that route?
cn flag
Ray
You can find a more up to date NVidia driver on NVidia's web site [here](https://www.nvidia.com/download/index.aspx). Given that you're on 20.04, maybe the NVidia site will have a slightly more recent driver. It's worth a shot. Seems like your problem is with the screen saver not returning? You could turn off the screen saver, but I don't think that's a very good long term solution. Good luck with it! My XPS 17 is being repaired...when it is fixed, I might have your problem... We'll see!
user505117 avatar
in flag
I tried the two last solutions and nothing changed. But I realised that the problem only occurs when I'm using the program "PyCharm". So, my question is probably really a PyCharm question and not an Ubuntu question... I'll edit the question to reflect this.
xealits avatar
in flag
This problem shows up when watching a YouTube rented movie. I've been using Ubuntu for 10 years and it was never solved... unbelievable. The [docs](https://help.ubuntu.com/stable/ubuntu-help/display-blank.html.en) are also useless. "Screen Blank=Never" option does nothing. Just amazing.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.