Score:1

Ubuntu 18.04 - the odyssey of black screen when in idle

cn flag

Good day everybody.

I'm making a custom iso of ubuntu using cubic. I'm all done except for 1 part: when in idle for x minutes the screen goes black. Of course i dont want that so here's all i've tried/done:

xset dpms 0 0 0 && xset -dpms  && xset s off && xset s noblank
gsettings set org.gnome.desktop.screensaver lock-enabled false
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
gsettings set org.gnome.desktop.screensaver idle-activation-enabled false
gsettings set org.gnome.desktop.screensaver lock-enabled false
gsettings set org.gnome.desktop.lockdown disable-lock-screen true
gsettings set org.gnome.desktop.session idle-delay 0
gsettings set org.gnome.settings-daemon.plugins.power idle-dim false
gsettings set org.gnome.settings-daemon.plugins.power active false
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
gsettings set org.gnome.desktop.screensaver idle-activation-enabled false

useless to say that none of the command above worked, the computer still goes in ? sleep ? with the black screen.

Any idea on how to solve this ?

(it's been 5 days of testing and googling without success)

Thanks for your time

us flag
You are not using the correct approach to set gsettings values, and I think this is what is causing your issue. Have you searched the answers at [Questions for Cubic](https://answers.launchpad.net/cubic) on how to set gsettings values?
Score:0
us flag

You need a gsettings override file.

Here is a the technique for setting gsettings values. You may need to add more keys and values depending on your needs (based on your original question). I've only shown two keys as an example...

  1. Open a new empty document in gedit (or other text editor) on your host system.

  2. Add the following contents to your file:

     [org.gnome.desktop.screensaver]
     lock-enabled = false
    
     [org.gnome.settings-daemon.plugins.power]
     idle-dim = false
    
  3. Save the file with the following name:

     90_ubuntu-settings.gschema.override
    
  4. In Cubic's terminal page, type the following command and press the enter key.

     cd /usr/share/glib-2.0/schemas/
    
  5. Open Nautilus (or other file browser) on your host system, and naviage to the directory where you saved the file 90_ubuntu-settings.gschema.override.

  6. Drag the file onto Cubic's terminal window.

  7. Click the Copy button in Cubic.

  8. The file will be copied to the /usr/share/glib-2.0/schemas/ directory inside Cubic.

  9. Then type the following command inside Cubic's terminal window.

     glib-compile-schemas /usr/share/glib-2.0/schemas/
    
  10. Finish making your other customizations, and generate your new Live ISO using Cubic.

Whenever you bootup or install your OS from the new Live ISO, Ubuntu will read default gsettings values from 90_ubuntu-settings.gschema.override.

If you add other settings to 90_ubuntu-settings.gschema.override, remember to execute the glib-compile-schemas command each time.

As you may expect, the user can always personalize your defaults using tools like Gnome Tweaks, Dconf Editor or the gsettings command.

cn flag
sorry, keep having black screen after 5 minutes
us flag
Do you think it is your hardware that is doing that?... If you have an external monitor, it may blank the screen independent of the OS, if no signal is detected. Turning off the monitor and turning it on usually fixes this, but I haven't found a way to change this from within the OS. If it is a laptop screen, there ~may~ be a setting in the BIOS for this behavior.
cn flag
i can confirm is not the monitor and double checked bios
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.