Monitor stuck in "Power Save Mode" when return form startx

I’m using Ubuntu 18.04.
I usually using In text mode to display video images on the monitor.
I create a shell script.
Start to “startx” when the mouse is connected.
“startx” is stopped when the mouse is removed from USB port.
I want to video images display again on the monitor when return to text mode from the “startx”.

But, when the “startx” is stopped, the monitor says “No Input Signal” and goes completely black, and stays that way. The LED power light is amber/yellow.

Start to “startx” again, monitor is display again.

How do I disable power save mode for monitor?

Hi,

1.This sounds not normal the startx is gone when mouse is connected.
2. If you just want to unblank the monitor, you can try to echo 0 to blank node under /sys/class/graphics/fb"X"/blank. (please notice “X” could be 0~2 here).

Thank you advice.
I trid,
sudo sh -c “echo 0 > /sys/class/graphics/fb0/blank”
sudo sh -c “echo 0 > /sys/class/graphics/fb1/blank”
But situation has not changed.

Get a message like this when startx stops.
“Couldn’t get a file descriptor referring to the console”
Does that have anything to do with this?

Hi,

But situation has not changed.

Could you check if dmesg prints something after you done the echo 0 command?

Thank you again and sorry.I wronged.
I excetute command after stopping startx,
The monitor has recovered from power save mode.

I have a other question.
Can i setting HDMI screen resolution on text mode?

Hi,

If you are in text mode, then the method to change mode is using sysfs too.

First, dump the modes from fb

For example,

root@nvidia:/sys/class/graphics/fb0# cat modes
D:1920x1080p-60
U:720x400p-70
V:640x480p-60
U:640x480p-67
V:640x480p-72
V:640x480p-75
V:800x600p-56
V:800x600p-60
V:800x600p-72
V:800x600p-75
U:832x624p-75
V:1024x768p-60
V:1024x768p-70
V:1024x768p-75
V:1280x1024p-75
V:1152x864p-75
S:1280x800p-60
S:1280x1024p-60
S:1440x900p-60
S:1440x900p-75
S:1680x1050p-60
D:1280x720p-60
U:1920x1080p-24
U:1280x720p-50
U:1280x720p-60
U:1920x1080p-60
U:720x480p-59
U:640x480p-59
U:720x576p-50
U:1920x1080p-50
U:1920x1080p-24
U:1280x720p-60
U:1920x1080p-60

Then, pick one mode can echo it to mode.

root@nvidia:/sys/class/graphics/fb0# cat mode
U:1920x1080p-60

BTW, what is the purpose of changing resolution for “text mode”? I think you should just using the default mode which is assumed the best mode for you.

Thank you.
Successful!

I am creating a general purpose application.
Because I cannot specify the monitor to use
It should be displayed in the resolution desired by the user.

1 Like