[Xubuntu 16.04] Display stays black if monitor is turned off/on

Bug #1575123 reported by Christian Pointner on 2016-04-26
52
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Xfce4 Settings
Unknown
Unknown
xfce4-settings (Ubuntu)
Undecided
Unassigned

Bug Description

I have a small PC running Xubuntu using my TV as a single/main display. Since upgrading the box to 16.04 when i turn off the TV and turn it back on the screen stays black (well actually it's blue but this it what my TV does if there is no input).

xrandr tells me that the graphics driver did correctly detect the TV going away and also coming back. The screen comes back if i run:

xrandr --display :0 --output HDMI3 --mode 1920x1080

The same is happening if i unplug the HDMI cable and plug it back in (tested with my TV and another HDMI monitor).
Also if no user is logged in and lightdm is shown everything works as expected.

My theory is that the xfce settings daemon does not configure 'new' screens despite the fact that the checkbox in the xfce4-display-settings 'Configure new displays when connected' is checked.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xfce4-settings (Ubuntu):
status: New → Confirmed
Mattia (io-mattia98) wrote :

I've had a similar problem with Xubuntu 14.04. This problem did not happen with VGA but only with DisplayPort (with DP2HDMI adaptor). Since then I've upgraded to Ubuntu 16.04 which works fine. I'm gonna try Xubuntu 16.04 on that machine and see if it still happens for me. I'd change the importance of this bug to important since you have to either run this or other commands (requires a keyboard, witch may not be possible if it's used as a MC) or reboot.
Whether this is a duplicate or not will be shown when I do the tests on my machine since it hasn't a Nvidia card.

Mattia (io-mattia98) wrote :

So,
I tried Xubuntu 16.04 on that machine and it made progress, but not completely fixed.
It still doesn't work with the DP2HDMI adaptor: TV off, TV on -> black screen. "sudo service lightdm restart" works too for bringing the screen back up. But, with a VGA to HDMI converter it now works. For some strange reason it didn't work on Xubuntu 14.04 even tho it worked when directly attached via VGA.

Anyways, it doesn't work via DP (DP2HDMI adaptor). It's probably the same problem.
This is not a duplicate because this machine does not have a Nvidia GPU but Intel on-board graphics. I'll post more info soon.

mgilroy (michael-gilroy) wrote :

I've the same issue on Ubuntu 16.04 with Intel Skylake. PC connected to the TV, we switch between the computer and TV regularly. Found I was able to get the screen to start using xrandr as suggested above.

To get the screen to start when the TV switched to the PC HDMI/DP

sudo nano /etc/udev/rules.d/95-monitor-hotplug.rules

SUBSYSTEM=="drm", RUN+="/usr/local/bin/fix_tv_state.sh

sudo nano /usr/local/bin/fix_tv_state.sh

Add the following:

###########################################
#!/bin/sh
#Fix TV state when HDMI link is lost.
#By Mario Limonciello <email address hidden>
export XAUTHORITY=/home/username/.Xauthority

OUTPUT="DP2"
BAD_MODE="1280x720"
GOOD_MODE="1920x1080"

for MODE in $BAD_MODE $GOOD_MODE; do
 sleep 2
 DISPLAY=:0 xrandr --output $OUTPUT --mode $MODE
 sleep 2
done

#################################

Note replace username with your username. Change the output to whatever you have e.g. HDMI2

sudo chmod +x /usr/local/bin/fix_tv_state.sh
sudo udevadm control --reload-rules

Change from HDMI back to TV, then back again. Screen comes on after a couple of seconds. Change the sleep times to suit.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.