I have a little Asus Eee PC X101CH. I had this problem with Linux Mint Xfce 18.2 installed. I don't have this problem anymore since i installed Linux Mint MATE 18.2. But you can try what follows if you are stuck with a black screen on resume from suspend. Like when you simply close the lid and re-open it.
FIRST, MAKE A SIMPLE KEYBOARD SHORTCUT
Get your monitor's name by typing
xrandr --listactivemonitors
in your terminal. Example:Code: Select all
xrandr --listactivemonitors
Monitors: 1
0: +*LVDS-1 1024/223x600/125+0+0 LVDS-1
LVDS-1
. Remember your monitor's name.- Go to: Start Menu > Preferences > Keyboard Shortcuts
- Click
Add
- Name it "Screen ON" and enter this command:
/usr/bin/xrandr --output LVDS-1 --auto
(Change "LVDS-1" to your monitor's name.) - Click
Apply
- Click over "Disabled" and press
Ctrl
+F7
- Close
xrandr --output LVDS-1 --off
. (Change "LVDS-1" to your monitor's name.) Pressing Ctrl
+F7
should get you out of trouble.That was all you needed. But if you want to make things more pleasant, do what follows.
GET YOUR SCREEN TURNED ON AUTOMATICALLY
- Copy the script named "01-SCREEN-ON.SH" listed at the bottom of this page.
- Paste it into a simple text editor, not into a big word processor.
- Change "USERNAME" to your user name.
- Get your monitor's name by typing
xrandr --listactivemonitors
in your terminal. Example:
In this example, the monitor's name is "LVDS-1".Code: Select all
username@computername ~ $ xrandr --listactivemonitors Monitors: 1 0: +*LVDS-1 1024/223x600/125+0+0 LVDS-1
- In your script, change every "LVDS-1" to your monitor's name.
- Save your script in plain text format and name it with ".sh" extension, like this: "01-screen-on.sh".
- Open this folder as administrator (right-click to do so):
/usr/lib/pm-utils/sleep.d/
- Place a copy of your "01-screen-on.sh" script in this folder.
- In your file manager, in that same folder, right-click on your script's icon to edit properties. Select "Permissions" tab and click on "Execute" to allow executing file as program.
- Restart your computer.
TROUBLESHOOTING:
/usr/lib/pm-utils/sleep.d/
might not be the right folder. There is a folder where the system will execute all the scripts on resume from suspend, but that folder might be somewhere else depending on your system's version. Search the web on this subject.- Make sure you have
/usr/share/sounds/linuxmint-login.wav
and/usr/share/sounds/linuxmint-gdm.wav
files. If not, replace them with some other sound. Those sounds are required. They help you know what is going on and they insert a required delay. - Make sure you have all the commands installed: sleep, xrandr & aplay.
- Read all this tutorial again.
Code: Select all
#!/bin/bash
# This script should power on your screen on resume from suspend.
# It was used with Linux Mint Xfce 18.2 on my Asus Eee PC X101CH.
#
# Lots of things are happening on resume from suspend. Screen is first
# turned on and back off. So this scripts starts with a sleep, then
# goes into a loop: sleep, check, exit or try to switch on, loop...
# Created by SebastJava with some inputs from dro0g, sdennie & swissz:
# https://ubuntuforums.org/showthread.php?t=1190894
case "$1" in
resume)
sleep 3
export DISPLAY=:0
export XAUTHORITY=/home/USERNAME/.Xauthority
for var in 1 2 3 4 5 6 7 8 9 10; do
sleep 1
if (xrandr --listactivemonitors|grep LVDS-1); then
aplay /usr/share/sounds/linuxmint-login.wav
echo "The monitor is active."; exit 0
else
xrandr --output LVDS-1 --auto --brightness 1.0
aplay /usr/share/sounds/linuxmint-gdm.wav
echo "XRANDR is trying to activate the monitor..."
fi
done
;;
esac
exit 0