[SRU] Xfce resets TV mode to NULL when power cycled

Bug #1308105 reported by Mario Limonciello
556
This bug affects 107 people
Affects Status Importance Assigned to Milestone
Xfce4 Settings
Fix Released
Critical
xfce4-settings (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Unassigned
Bionic
Fix Released
Medium
Unassigned

Bug Description

[Impact]

 * When a TV is power-cycled, it is no longer detected as an available display.

 * The root issue is in xfce4-settings: xfsettingsd.

 * The related patch correctly handles the NULL mode the TV enters when powered off.

[Test Case]

 * Connect a TV to a computer running xfce4-settings 4.12.0, this can be in a single configuration or dual-monitor.

 * Power the TV off.

 * Power the TV on.

 * Expected: TV powers on and remains connected as an available display.

 * Actual: TV powers on and is not connected or detected.

[Regression Potential]

 * Regression potential is minimal: The associated patch targets this very specific scenario and behavior, and does not interact with the rest of the codebase.

[Original Report]
I had an HTPC with Mythbuntu 12.04 installed. Upon upgrading a new behavior that if the TV is power cycled it no longer detects a link with the HTPC.

When this happens I can find in the xorg log that there is an accompanying log item:

[ 39829.509] (II) NVIDIA(0): Setting mode "NULL"

After debugging with NVIDIA at https://devtalk.nvidia.com/default/topic/729955/linux/tv-stops-being-detected/ we've deteremined it's a X client that reacts to the RANDR events causing the mode to be set to NULL.

Working through the list in an Xfce environment, the culprit is xfsettingsd. If xfsettingsd is running, it causes the TV to come up in a NULL mode. If it's killed, it remains in the mode it was previously running in.

Until this is fixed, this behavior can be worked around with a simple shell script:
==============================
#!/bin/sh
#Fix TV state when HDMI link is lost.
#By Mario Limonciello <email address hidden>

OUTPUT="HDMI-0"
BAD_MODE="1280x720"
GOOD_MODE="1920x1080"

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

Revision history for this message
Mario Limonciello (superm1) wrote :

For people on mythbuntu who encounter this with a mceusb remote, here's how i'm working around it:

1) Save this file to /home/user/fix_tv_state.sh and make it executable
==============================
#!/bin/sh
#Fix TV state when HDMI link is lost.
#By Mario Limonciello <email address hidden>

OUTPUT="HDMI-0"
BAD_MODE="1280x720"
GOOD_MODE="1920x1080"

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

2) Create ~/.lirc/irexec and put these contents:
==============================
begin
     remote = mceusb
     button = KEY_POWER
     prog = irexec
     repeat = 0
     config = /home/user/fix_tv_state.sh
end
==============================

3) Add to ~/.lircrc this line:
include ~/.lirc/irexec

4) Restart machine, lightdm or log out/in

Now power button on your mceusb remote will fix the HTPC video output state.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in nvidia-graphics-drivers (Ubuntu):
status: New → Confirmed
Changed in nvidia-graphics-drivers-331 (Ubuntu):
status: New → Confirmed
1 comments hidden view all 166 comments
Revision history for this message
Mario Limonciello (superm1) wrote :

After some more sleuth work with NVIDIA, we've discovered that this is happening because of a RANDR event. An X client is responding to the RANDR events and forcing it to this NULL resolution.

I checked what clients were running, and it's xfsettingsd causing this problem. If I kill xfsettingsd prior to turning on/off my TV it comes back at the right resolution.

Changed in xfce4-settings (Ubuntu):
status: New → Confirmed
Changed in nvidia-graphics-drivers (Ubuntu):
status: Confirmed → Invalid
Changed in nvidia-graphics-drivers-331 (Ubuntu):
status: Confirmed → Invalid
Changed in mythbuntu:
status: New → Confirmed
importance: Undecided → Medium
summary: - HDMI Handshake fails after TV powered off
+ Xfce resets TV mode to NULL when power cycled
description: updated
Revision history for this message
Mario Limonciello (superm1) wrote : Re: Xfce resets TV mode to NULL when power cycled

Here is the xfsettingsd debug output when the RR events are received. When the TV comes up there is a handful of change events and the end result is that the output gets disabled but not re-enabled.

xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 447.
xfce4-settings(displays): Detected CRTC 448.
xfce4-settings(displays): Noutput: before = 1, after = 0.
xfce4-settings(displays): Output disconnected: HDMI-0
xfce4-settings(displays): Disabling CRTC 447.
xfce4-settings(displays): No active output anymore! Attempting to re-enable the internal output.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 447.
xfce4-settings(displays): Detected CRTC 448.
xfce4-settings(displays): Noutput: before = 0, after = 0.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 447.
xfce4-settings(displays): Detected CRTC 448.
xfce4-settings(displays): Detected output 452 HDMI-0.
xfce4-settings(displays): Noutput: before = 0, after = 1.
xfce4-settings(displays): New output connected: HDMI-0

Revision history for this message
Jack Deslippe (jdeslip) wrote :

I'm seeing a similar issue after upgrading from mythbuntu 12.04 to 14.04. Only I'm using integrated graphics from intel sandybridge.

Revision history for this message
Stuart Matthews (mtrauts) wrote :

This issue also affects Gigabyte GA-EG45M-UD2H motherboard with Intel GMA X4500HD integrated graphics. Fresh install of mythbuntu 14.04. 13.10 was not affected.

Revision history for this message
Thomas Goerke (t-tom-w) wrote :

I have the same issue with ASUS P5E-VM HDMI motherboard. Fresh install of 14.04. Previous version (13.??) was not affected.

Revision history for this message
Trey Boudreau (trey-v) wrote :

Same problem with Intel NUC D54250WYK. I've only ever run 14.04 on it.

Revision history for this message
Ernst Sjöstrand (ernstp) wrote :

One workaround is to install gnome-settings-daemon and check the box in Xfce session settings to start gnome services on startup.

Revision history for this message
rhpot1991 (rhpot1991) wrote :

I added the following in /etc/mythtv/session-settings to work around this issue:
killall xfsettingsd

This will kill xfsettingsd when mythfrontend starts.

Revision history for this message
Gabriel Pannwitz (gabkdlly) wrote :

I think that I was experiencing this problem. I tried the workarounds mentioned above, but none of them really "worked". But I do not seem to be experiencing this issue when I switched to using DVI instead of HDMI. For what is worth, I am running Xubuntu 14.04 on a Dell Studio-XPS.

Revision history for this message
Weston (westont) wrote :

I am experiencing the same with Mythbuntu 14.04 and an AMD A10 APU. Deactivating the autorunning of xfsettingsd fixed the problem.

Revision history for this message
Bubu Fearn (bubu-fearn) wrote :

I have the same bug with Xubuntu 14.04 on AMD Radeon 6770 with a Toshiba HDTV

Turn off TV and signal is lost and can't get it back again until I restart the desktop.

Revision history for this message
Bubu Fearn (bubu-fearn) wrote :

Oops, I got linked to this bug from

http://ubuntuforums.org/showthread.php?t=2220583&page=4

I didn't realise it was registered as an Nvidia bug though.

Clearly its not as my card is an AMD.

Revision history for this message
Stephen Michael Kellat (skellat) wrote : Re: [Bug 1308105] Re: Xfce resets TV mode to NULL when power cycled

AMD owns nVidia these days as one of their brands. You may perhaps be in
the right place.

Revision history for this message
Nick (soapduk) wrote : Re: Xfce resets TV mode to NULL when power cycled

^No AMD owns ATI, the other major graphics card provider.

I am also experiencing this problem on integrated Intel graphics on Xubuntu 14.04 when using HDMI. It's the first distro I have used on this system but I never had the problem on Xubuntu 12.04 on my previous sytem (which was VGA/D-sub).

I do not get 'NULL' in my /var/log/Xorg.0.log but the issue is basically the same problem. I do get null in dmesg however:

[code][ 0.152426] ACPI: SSDT (null) 0004C4 (v01 PmRef Cpu0Ist 00003000 INTL 20061109)
[ 0.153472] ACPI: SSDT (null) 000433 (v01 PmRef Cpu0Cst 00003001 INTL 20061109)
[ 0.160066] ACPI: SSDT (null) 00015F (v01 PmRef ApIst 00003000 INTL 20061109)
[ 0.163743] ACPI: SSDT (null) 00008D (v01 PmRef ApCst 00003000 INTL 20061109)[/code]

Revision history for this message
Straximus (straximus) wrote :

I downgraded xfce-settings to the 4.11.0 package from Saucy, and locked it at that version. It eliminated the issue, and everything appears to function normally.

Revision history for this message
Nick (soapduk) wrote :

Thanks Straximus, that worked for me too.

Revision history for this message
Paul V. Stodghill (paul-stodghill) wrote :
Download full text (4.3 KiB)

tl;dr - There is a bug in xfsettingsd that not only affects external monitors, but primary monitors as well.

I believe that I am encountering the same bug, but by a different scenario. This may also be the same bug as #1313539.

I am running Xubuntu 14.04 on two of my four computers. I have all four computers connected to a single keyboard, monitor and mouse via a 4port KVM switch. Prior 14.04 upgrade, this setup worked like a dream. Post 14.04 upgrade, I have found that switching to either of the Xubuntu machines results in a blank monitor. On one machine, I am usually able to get to a virtual console and reset of the video by restarting lightdm. On the other machine, I am not able to even get a virtual console, and I have to ssh into the machine in order to restart lightdm.

The dying video happens so frequently that I starting the process of migrating away to XFCE. I installed Gnome Shell on one machine and Fluxbox on the other. Neither of these WM's exhibited the dying video phenomena.

Based upon this bug report, I decided to investigate the possibility that xfsettingsd might be the problem. Here's what I did.

1) Log in to a Xubuntu session.

2) Open a terminal window. Because I needed to do part of this from the Xubuntu session and part of this via ssh, I opened a new Byobu session (screen or tmux would work too). Then,

    $ killall xfsettingsd
    $ XFSETTINGSD_DEBUG=1 xfsettingsd --replace --no-daemon 2>&1 | tee output.txt

3) After the initial output from xfsettingsd had finished,

    $ cp output.txt before.txt

4) Here's where the fun begins: I unplugged the monitor from the KVM switch. I waited a few seconds, and then I plugged the monitor back into the switch. No video. I switched the KVM to one of the other computers and verified that the monitor was corrected plugged in and working.

5) On one of the other computers with working video, I ssh'ed into the machine running the Xubuntu session and reconnected to the Byobu session. I found that xfsettingsd had crashed.

6) Executing "sleep 5; xfsettingsd" on the ssh session and switching to the Xubuntu machine restored the video.

7) I diff'ed the "before.txt" with the "output.txt". Here is the output that was generated when the monitor was unplugged and replugged.

xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 63.
xfce4-settings(displays): Detected CRTC 64.
xfce4-settings(displays): Detected CRTC 65.
xfce4-settings(displays): Noutput: before = 1, after = 0.
xfce4-settings(displays): Output disconnected: VGA1
xfce4-settings(displays): Disabling CRTC 63.
xfce4-settings(displays): No active output anymore! Attempting to re-enable the internal output.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 63.
xfce4-settings(displays): Detected CRTC 64.
xfce4-settings(displays): Detected CRTC 65.
xfce4-settings(displays): Noutput: before = 0, after = 0.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(di...

Read more...

Revision history for this message
Paul V. Stodghill (paul-stodghill) wrote :

Following Straximus's lead (comment #18), I downgraded to the xfce4-settings package from Saucy. I left the machines allow all weekend long, and this morning the video on both machines worked as expected.

There is a regression bug between xfce4-settings 4.11.0-1ubuntu1 (saucy) and 4.11.2-1ubuntu2 (trusty).

Revision history for this message
nick_s (nickstylianou) wrote :

This also affects me on Mythbuntu 14.04 x86 64bit with the open radeon driver and ATI RS880 [Radeon HD 4250] graphics controller.
The workaround for me was to disable xfsettingsd in the GUI Settings under "Session and Startup":
1) In the "Application Autostart" tab I unticked xfsettingsd.
2) In the "Session" tab I selected xfsettingsd and clicked "Quit Program".

Revision history for this message
Charles 'Buck' Krasic (charles-krasic) wrote :

Ahh, this issue has been driving me crazy since I did the 14.04 upgrade.

I'm using ubuntu 14.04 + xfce4 + plex connected to my yamaha receiver and panasonic hdtv (with pulse-eight cec usb dongle). (setup is years old).

The procedure above (#22) did the trick for me. Thanks!

Revision history for this message
Paul V. Stodghill (paul-stodghill) wrote :

Unfortunately, the workaround in #22 does not work form me. Since my computers are plugged in to a KVM switch, I need xfsettings running in order to reset my mouse and keyboard settings after switching computers.

Workaround #18 works for me.

Has anyone reported this bug upstream?

Revision history for this message
JeanLuke (james-jasa) wrote :

I am having the same problem. I upgraded frm Mythbuntu 12.04 to 14.04 with the Asus M3N78 motherboard (Nvidia 8200 graphics card & nvidia-304-updates driver).

Using xfce4-settings from Ubuntu 13.10 (as per post #18) fixed it for me. I have not tried using the suggestion from post #10.

There is another fix in this thread that I'll try later this week -> http://ubuntuforums.org/showthread.php?t=2221496

Revision history for this message
JeanLuke (james-jasa) wrote :

I added the options:
       Option "ConnectedMonitor" "DFP-0"
       Option "UseDisplayDevice" "DFP-0"
to the "devices" section of my /etc/X11/xorg.conf and it seems to have fixed it - even with the current xfce4-settings installed.

Tests I have done:
1/ boot with the television off, turn it on and get display
2/ boot with the television on, power cycle it (off time about 30 minutes) and have display
3/ boot with the television off, switch it on for 5 minutes, off for 30 minutes, back on and have display

As above, I have the Asus M3N78 motherboard (Nvidia 8200 onboard graphics) with nvidia-304-updates driver, using HDMI.

Revision history for this message
Bengt Nilsson (bnilsson11) wrote :

I have Ubuntustudio amd64 14.04LTS on a HTPC with a TV connected to HDMI-0 on a GA-880GMA-UD2H, Radeon mobo graphics.

Tried to follow #26, but it seems I don't have any xorg.conf in my /etc/X11.
Any advice?

Revision history for this message
JeanLuke (james-jasa) wrote :

My solution only works for Nvidia graphics cards using Nvidia drivers, sorry. Technically, it's a work-around, not a fix.

For those who do use Nvidia drivers but do not have an xorg.conf file, you can generate one with the "nvidia-xconfig" tool run as root or with sudo. See http://http.download.nvidia.com/XFree86/Linux-x86/1.0-8756/README/chapter-03.html

Revision history for this message
Patrick Stump (pstump-y) wrote :

I did the fix in #26 and it fixed my issues as well.
The only difference was that in nvidia-settings my samsung tv was coming up as "DFP-1" so I had to change it to :
        Option "ConnectedMonitor" "DFP-1"
       Option "UseDisplayDevice" "DFP-1"

JeanLuke THANK YOU! This has been an huge source of frustration.

As of today this is still not assigned, so not really sure when they will get to fixing it.

Revision history for this message
In , Mario Limonciello (superm1) wrote :

In xfsettingsd 4.11.2 there appears to be a regression that when a TV hooked up to the computer via HDMI gets power cycled, it stops displaying anything.

It happens via a RANDR event being sent to all X clients when the TV gets turned off.

xfsettingsd thinks that it should switch to an internal output, but desktops don't have one. So when the TV comes back on the bus it seems like it's an extra monitor and xfsettingsd gets confused.

xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 447.
xfce4-settings(displays): Detected CRTC 448.
xfce4-settings(displays): Noutput: before = 1, after = 0.
xfce4-settings(displays): Output disconnected: HDMI-0
xfce4-settings(displays): Disabling CRTC 447.
xfce4-settings(displays): No active output anymore! Attempting to re-enable the internal output.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 447.
xfce4-settings(displays): Detected CRTC 448.
xfce4-settings(displays): Noutput: before = 0, after = 0.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 447.
xfce4-settings(displays): Detected CRTC 448.
xfce4-settings(displays): Detected output 452 HDMI-0.
xfce4-settings(displays): Noutput: before = 0, after = 1.
xfce4-settings(displays): New output connected: HDMI-0

Additional details can be found on the Ubuntu bug report located here:
https://bugs.launchpad.net/ubuntu/+source/xfce4-settings/+bug/1308105

Changed in xfce4-settings:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Alexander Schmidt (voidcastr) wrote :

I just bisected the git repository of xfce/xfce4-settings and identified the commit that introduced the issue as:

------------------------------------------

dbd76eb58bd9d7a55de753daa5572ef24867d924

Author: Lionel Le Folgoc <email address hidden> 2012-11-08 20:15:42
Committer: Simon Steinbeiss <email address hidden> 2012-11-08 20:50:40
Parent: 82ab3a355a4b7eff6cffa57ca5a8e8622feb2d31 (l10n: Updated Portuguese (pt) translation to 100%)
Child: cf67ba0d283d991c67a4e3df2de758f94cb2f7d2 (l10n: Updated Spanish (Castilian) (es) translation to 99%)
Branches: master, remotes/origin/bluesabre/display-settings, remotes/origin/bluesabre/display-settings2, remotes/origin/master, remotes/origin/ochosi/primary
Follows: xfce4-settings-4.11.0
Precedes: xfce4-settings-4.11.1

    Re-enable the internal display when the external one is disconnected

    (and add the possibility to start xfce4-display-settings --minimal when a new
    display is connected)

    Signed-off-by: Simon Steinbeiss <email address hidden>

------------------------------------------

Building and using its immediate predecessor fixes the issue for me. Can anybody confirm?

I am currently investigating the code, trying to find what's wrong. However, I have little to no experience regarding the code base, so this might take a while. Any help would be greatly appreciated.

Revision history for this message
In , Jate Sujjavanich (jatedev) wrote : Re: Xfce resets TV mode to NULL when power cycled

I am using the Yocto project to build a linux image containing xfce. I have been having the same problem with a failure to detect when disconnecting and reconnecting an LCD monitor.

I reverted commit dbd76eb58bd9d7a55de753daa5572ef24867d924, and I can confirm that I can now disconnect the monitor at will with detection.

I'll have to use this workaround for now.

Revision history for this message
In , Alexander Schmidt (voidcastr) wrote :

I am currently stuck analyzing this issue. The following considerations refer to commit dbd76eb58bd9d7a55de753daa5572ef24867d924.

After adding lots of debug output to displays.c, I noticed a potential issue in

static GPtrArray* xfce_displays_helper_list_outputs (XfceDisplaysHelper*)

which contains the line of

if (output_info->connection != RR_Connected)

When powering off a screen and powering it on again, the value of output_info->connection is always 1 (=RR_Disconnected). Hence, the rest of the surrounding loop's iteration is skipped, no modes are detected, etc.

According to my current understanding (which might be completely erroneous) of how the code works, this is wrong and it could hint to the actual cause of the issue - which I'm still unable to identify.

Further observations:

xfce_displays_helper_list_outputs is called twice in displays.c - once by xfce_displays_helper_init(...) and once by xfce_displays_helper_reload(...). In the former case, (output_info->connection != RR_Connected) is false for one of my outputs, thus modes are getting detected, etc. In the latter, it is not.

Can anybody assess whether or not I am on the right track?

Any help debugging this would still be greatly appreciated. :)

Revision history for this message
In , Alexander Schmidt (voidcastr) wrote :

Created attachment 5681
HDMI power cycling patch

Created and attached a small patch that fixes the issue for me. It applies to any xfce4-settings version starting from dbd76eb58bd9d7a55de753daa5572ef24867d924 (contained in 4.11.1), up to the current origin/master.

Can anybody confirm this patch fixing the issue while not introducing undesirable side effects?

As I understand, it is indeed a suitable solution (cf. the implementation in 641c6c4d7dda4ac41f811c8c0f9e26738f12a732 which used a corresponding approach) but it might conceal another underlying problem:

g_ptr_array_unref(GPtrArray*) is expected to have the same effect as g_ptr_array_free(GPtrArray*, TRUE) in case there is exactly one reference to the given argument. However, in the case at hand, the effects differ, which leads to the conclusion that there is more that just one reference left to the given argument, prior to calling g_ptr_array_unref. This could indicate some bug/leak -- but as I understand, calling g_ptr_array_free with free_seg=TRUE deals with that (somebody correct me if I'm wrong).

Revision history for this message
In , Jate Sujjavanich (jatedev) wrote :

I just tested the HDMI power cycling patch. I am able to unplug and replug the VGA connector on my motherboard and still detect it.

Revision history for this message
In , Sean Davis (bluesabre) wrote :

I've tested the patch, and noticed that without the patch xfsettingsd sometimes crashes when an external display (in this case, a TV) is unplugged. Without the patch, xfsettingsd no longer crashes.

Revision history for this message
In , Simon Steinbeiß (ochosi) wrote :

(In reply to Sean Davis from comment #5)
> I've tested the patch, and noticed that without the patch xfsettingsd
> sometimes crashes when an external display (in this case, a TV) is
> unplugged. Without the patch, xfsettingsd no longer crashes.

Now you got me confused, "without the patch" in both cases? Just to be sure, which is it?

Revision history for this message
In , Raj B (bigwoof) wrote : Re: Xfce resets TV mode to NULL when power cycled

I tested this patch and it seems to have fixed the problem for me.

I have Linux machine running Ubuntu Trusty with the latest nVidia drivers (337.25-0ubuntu1~xedgers14.04.2). I used XFCE as my window manager for a mythtv/xbmc setup.

patching xfsettingsd has solved the loss of display issue for me.

My machine is connected to an Onkyo receiver which is then connected to an Epson projector.

Revision history for this message
Bengt Nilsson (bnilsson11) wrote :

I would like to try "this patch".
Please supply a link to where I can find it, and some detailed instructions on how to apply it. I am not a programmer.

Regards,

B. Nilsson

Revision history for this message
In , Sean Davis (bluesabre) wrote :

Created attachment 5723
HDMI and Screen On Event Patch

I think I figured out the failure in the logic. You are right, since we are clearing the caches in that particular function, it makes sense to make sure they are truly freed.

The above fix uncovered another issue with the order of events when the "Configure new displays when connected" feature is enabled. I found that we are clearing our caches in the middle of the screen event (thats the leftover reference you found). I reordered the code for that function, and now I think I should have a fully functional patch.

Please try the attached patch and let me know if the issue is still resolved for you.

Thomas Mashos (tgm4883)
tags: added: downstream
Changed in xfce4-settings:
status: Confirmed → Incomplete
Changed in xfce4-settings:
status: Incomplete → In Progress
Changed in xfce4-settings:
status: In Progress → Fix Released
Changed in xfce4-settings:
importance: Medium → Critical
status: Fix Released → Confirmed
98 comments hidden view all 166 comments
Revision history for this message
In , graysky (da-audiophile) wrote :

In troubleshooing with ToZ in the forums, it seems as through this bug is related to bug #12480 as well. The patch from comment #53 seems to be allowing my monitor to wake from suspend under the 4.4.x series of kernels. I will preform more tests before calling this solved, but wanted to document this in the ticket.

Revision history for this message
In , graysky (da-audiophile) wrote :

Probably had 2 dozen or more suspend/wake cycles using the patch from comment #53 under linux v4.4.6 and it xfce4 is behaving as it should waking the monitor. If the patch as-is is grammatically correct, etc. I would recommended applying it to xfce4-settings.

Revision history for this message
In , James Bunton (jamesbunton) wrote :

Thanks jkampe68! Attachment 6590 completely fixes the problem for me on Ubuntu and Arch Linux. I've made an AUR package including your patch:

https://aur.archlinux.org/packages/xfce4-settings-blank-screen-fix/

Revision history for this message
In , Vincentiwilliam (vincentiwilliam) wrote :

Haven't had any problems since installing the patch from #53. I plan to upgrade Arch next weekend but haven't seen a new release of xfce4-settings (4.12.0-3).

Revision history for this message
In , Dg773 (dg773) wrote :

I was experiencing the same issue switching my display (through a kvm) between the Debian/Stretch machine running 4.12.0-2 and another machine. jkampe68's patch fixed the problem. Thank you.

Revision history for this message
In , Vincentiwilliam (vincentiwilliam) wrote :

I just upgraded Arch (-Syu) with xfce4-settings ignored in pacman.conf, then upgraded xfce4-settings from the aur using James' [url]https://aur.archlinux.org/packages/xfce4-settings-blank-screen-fix/[/url]
and all is well (tested KVM switch, tested turn off monitor), thanks James!

tags: added: patch
Revision history for this message
In , Drew Lustro (drewlustro) wrote :

Wow... thank heavens. I can also very that the patch from Comment #53 has solved this bug that has been driving me nuts for weeks. I would lose my entire X session every single day as soon as the screen blanked... quite troublesome when you're trying to make linux work as your daily drive, haha.

I had to learn how to patch a .deb file properly in the process, but that was worth it too.

Cannot thank you enough, @jkampe68

-- Hardware/Software --
GPU: GTX 970 over DisplayPort 1.2
Monitor: Dell P2715 (4K@60Hz, hardware rev A03)
OS: Xubuntu Xenial (16.04 LTS)
Manually patched xfce4-settings version: 4.12.0-2ubuntu1

Useful links on patching .deb's:
https://help.ubuntu.com/community/UpdatingADeb
http://www.cyberciti.biz/faq/appy-patch-file-using-patch-command/

Revision history for this message
In , Mtsaavedra (mtsaavedra) wrote :

I've had good luck with the patch (thank you!) but still see one problem. After my dual monitors turn back on, they are now in mirrored mode instead of side-by-side as they were before they went to sleep. Running `xfsettingsd --replace` after this restores the screens to their proper setup.

Revision history for this message
In , 3-rs (3-rs) wrote :

Running sparky linux with xfce. dual screen in expand mode after wake up works until kernel 4.3. after that it wakes up mirrored. see this thread:

https://forum.xfce.org/viewtopic.php?id=10951

hope this helps to find the cause.

Revision history for this message
In , Luuk van der Duim (wrinkledpassenger) wrote :

On Linux Mint 18 xfce, I too got bitten by this bug.
After power off / power on, the monitor reports 'no signal'.

Intel Integrated Q45/Q43 Graphics (Dell Optiplex 780 USFF)
DisplayPort <--> DVI-D cable
Acer V243HL LCD Monitor (1920x1080 @60Hz)

I applied 'Enable crtc if it is disabled after power cycle' patch as provided in comment #53 by jkampe68 to the source package of xfce4-settings (4.12.0-2ubuntu1)

This fixed the issue. Thank you jkampe68.

I sincerely hope this patch or an adaptation that fixes the problem accordingly will find its way into the xfce4-repository.

Thanks in advance!

    Luuk

Revision history for this message
In , Vincentiwilliam (vincentiwilliam) wrote :

xfce4-settings-4.12.0-5 has the patch applied in the (Arch Linux) package:
https://git.archlinux.org/svntogit/packages.git/commit/?h=packages/xfce4-settings

Revision history for this message
In , Bluesabre-1 (bluesabre-1) wrote :

I'm really impressed, thanks to the persistence with trying to find a solution to this bug. As several of you have mentioned, the patch in #53 / #54 (courtesy of jkampe68) seems to resolve the issue. I have tested this patch myself, and while not being able to reproduce the original issue, I have verified that there do not seem to be any regressions with this patch.

I have committed this change here: https://git.xfce.org/xfce/xfce4-settings/commit/?id=2233f20a7ec6d7cb7dcc5752d62d98e37d9c21ad

I'm planning to do a new release including this patch shortly. HUGE shout out to everyone that helped figure this one out!

Revision history for this message
In , Jkampe68 (jkampe68) wrote :

I see one issue in the patch;

When enabling the crtc it _unconditionally_ sets the output crtc (preferred) mode, rotation etc. properties.
In multimonitor setups this likely leads screens to appear mirrored after power cycle (see comment #63 and #64)

The patch should be improved by reading/restoring the crtc output properties from saved xfconfig. I simply was not up to the task to write that code, maybe someone can contribute?

Revision history for this message
In , Travis-o (travis-o) wrote :

Similarly I keep losing my configured resolution of 1280x720, with the system defaulting back to 1920x1080 every time (which looks rubbish on my crappy monitor).

Manually running "xfsettingsd --replace" is a workaround, but not ideal. All progress though, it's still much better than rebooting every time. Thanks a ton for getting us this far.

Revision history for this message
In , Dhekkir (dhekkir) wrote :

*** Bug 12786 has been marked as a duplicate of this bug. ***

Revision history for this message
In , David-lloyd (david-lloyd) wrote :

I've opened a downstream Fedora bug at https://bugzilla.redhat.com/show_bug.cgi?id=1375171 with a bit more information that might be useful.

Revision history for this message
In , Ncopa (ncopa) wrote :

(In reply to jkampe68 from comment #68)
> I see one issue in the patch;
>
> When enabling the crtc it _unconditionally_ sets the output crtc (preferred)
> mode, rotation etc. properties.
> In multimonitor setups this likely leads screens to appear mirrored after
> power cycle (see comment #63 and #64)
>
> The patch should be improved by reading/restoring the crtc output properties
> from saved xfconfig. I simply was not up to the task to write that code,
> maybe someone can contribute?

I suggest that we close this issue and create a new for the mirrored-after-power-cycle.

27 comments hidden view all 166 comments
Revision history for this message
Patricio (patriciov) wrote : Re: Xfce resets TV mode to NULL when power cycled

Hi.
This affects me too.
I'm looking for what some other users refer to as "Alexander's patch" but I can't find it.
Additionally, I see the post numbers jump fro #2 to #41... How can I see the other posts? Perhaps the patch was posted there?

Revision history for this message
Alexandre ACEBEDO (aacebedo) wrote :

Hi!
The XFCE4's maintainer claimed to have merged the patch for this bug here:
https://bugzilla.xfce.org/show_bug.cgi?id=11107#c67 on 2016-08-12.

A new version of xfce-settings (4.12.1) has been released on 2016-09-15 so we can assume that the fix is integrated in the release.

Note that the patch is not the same as the one I've linked in comment #107. I still have to test the new version.

Note also that the 4.12.1 version was not integrated in ubuntu 16.10 so we still have to recompile and install it manually :(

Revision history for this message
Patricio (patriciov) wrote :

Thanks for that!
I think I'll keep waiting for the patched version to come out for my distro (32bit Xubuntu 16.04) as I'm really trying to avoid installing dev tool and compiling from source... I guess I'm just too old and grumpy now and prefer to spend time using my computers than fixing them. I already filled my quota of applying manual patches for things to just work in the 90's :D.

Anyway, I really appreciate the effort many of you guys put into making my life easier with great, open software.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

I have an ASUS Z170M-Plus Mobo with an Intel Core i3-6100T, Intel HD 530 graphics and a Samsung TV connected through HDMI, running Mythbuntu 16.04.

I had the issue that when I turned the TV off and then back on again, the TV would say "No Signal" and I would have to run
$ sudo service lightdm restart
to get it to work again.

Based on Alexandre's comment #128, I installed xfce-settings 4.12.1 from here:
https://packages.debian.org/stretch/amd64/xfce4-settings/download
http://ftp.uk.debian.org/debian/pool/main/x/xfce4-settings/xfce4-settings_4.12.1-1_amd64.deb
and installed it on my Mythbuntu 16.04 installation. To my surprise, I didn't have any dependency issues, it all applied without problems and now the problem seems fixed! I can turn the TV off and on again and the picture comes back as expected.

Great work all in getting this sorted.

Revision history for this message
Jonathan Boler (galatians) wrote :

I also installed http://ftp.uk.debian.org/debian/pool/main/x/xfce4-settings/xfce4-settings_4.12.1-1_amd64.deb but my 2nd monitor doesn't come back on after it's entered power-save mode when I move the mouse which does turn my primary laptop display back on.

No combination of xrandr commands or switching to the console with CTRL-ALT-F1 brings it back on. The only thing that works is to power cycle the monitor which causes the display setup to switch back to single display mode. Then I have to go re-configure the dual display setup which is really annoying because I have to move all my windows back to their correct positions on the 2 displays.

I've tested my external monitor on windows and it always comes back on immediately even after entering the same power save mode so it's not an issue with the monitor.

Interestingly when I use the displayport over USB-C pass through it all works correctly. It's only with HDMI that the problem occurs.

I'm using a Dell Precision 5510 laptop with Intel Graphics enabled and the nvidia graphics disabled on Xubuntu 16.04.1 with all updates applied. I've also tested this with the same results on Ubuntu 16.10 with all updates applied.

xrandr shows it's still sending the signal to the external HDMI display even though the display is still in power saving mode:

tenpin: ~ xrandr
Screen 0: minimum 8 x 8, current 1920 x 2160, maximum 32767 x 32767
eDP1 connected 1920x1080+0+1080 (normal left inverted right x axis y axis) 346mm x 194mm
   1920x1080 59.93*+ 59.93
   1680x1050 59.95 59.88
   1600x1024 60.17
   1400x1050 59.98
   1600x900 60.00
   1280x1024 60.02
   1440x900 59.89
   1280x960 60.00
   1368x768 60.00
   1360x768 59.80 59.96
   1152x864 60.00
   1280x720 60.00
   1024x768 60.00
   1024x576 60.00
   960x540 60.00
   800x600 60.32 56.25
   864x486 60.00
   640x480 59.94
   720x405 60.00
   640x360 60.00
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080 60.00*+ 50.00 59.94
   1920x1080i 60.00 50.00 59.94
   1600x1200 60.00
   1280x1024 75.02 60.02
   1152x864 75.00
   1280x720 60.00 50.00 59.94
   1024x768 75.03 60.00
   800x600 75.00 60.32
   720x576 50.00
   720x576i 50.00
   720x480 60.00 59.94
   720x480i 60.00 59.94
   640x480 75.00 60.00 59.94
   720x400 70.08
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

Jonathan,

Given the latest version of xfce-settings (4.12.1) was easy to install and fixed all of my issues (see comment #130 above), it would be interesting to know whether this also fixed your problem.

Kind regards,

Aaron

Revision history for this message
Patricio (patriciov) wrote :

I downloaded xfce4-settings 4.12.1-11 as stated in comment #130 but for my i386-based xubuntu 16.04 from https://packages.debian.org/stretch/i386/xfce4-settings/download

This solved it for me.

Revision history for this message
Bengt Nilsson (bnilsson11) wrote :

I tried xfce4-settings 4.12.1-11 as mentioned in #133 and indeed it "works", X does not crash.
However, the set screen resolution is lost. When I turn on the screen again, the desktop defaults to the highest possible screen resolution.
In my case, it means that my desktop menu bar and docky are placed outside the screen bounds, tricky to reset.
Better than it was before, but not quite there yet.

Revision history for this message
Stefan Fleischmann (sfleischmann) wrote :

Note that there is a Ubuntu package of 4.12.1 available now http://packages.ubuntu.com/zesty/xfce4-settings which can be installed at least without dependency issues on Ubuntu 16.04.

The upstream commit that fixes the issue is here https://git.xfce.org/xfce/xfce4-settings/commit/?id=2233f20a7ec6d7cb7dcc5752d62d98e37d9c21ad.

As mentioned in the upstream bug report: "[...] one issue in the patch; when enabling the crtc it _unconditionally_ sets the output crtc (preferred) mode, rotation etc. properties". Anyway it was decided to merge the patch and address that issue in a new bug #. So maybe the best way is to do the same here, i.e. mark this as fixed in zesty and apply the patch in xenial and yakkety. And create a new bug for the lost screen resolution and other settings.

Changed in xfce4-settings:
status: Confirmed → Fix Released
Revision history for this message
Anna Thomas (annabel82) wrote :

Running Xubuntu 16.04.1 with all updates applied as of 31/01/17 this bug affected me when using the HDMI port of a Braswell chipset Shuttle XS36V5. When resuming my Samsung TV from standby the HDMI wouldn't wake up and thus no picture. It was the only display device attached. Tried various combinations of power management settings in UEFI/XFCE/TV to no avail, as well as a different HDMI port on TV as well as different HDMI.

Upon a 'sudo reboot' from SSH or by pressing the power button on the shuttle (had power button set to 'shutdown' instead of 'ask') the TV would wake up within a second or two and show the shutting down logo.

Consulted your Freenode IRC channel, Flocculant suggested applying:

https://launchpadlibrarian.net/269857837/xfce4-settings_4.12.0-3ubuntu1_amd64.deb

Which i did with 'dpkg -i xfce4-settings_4.12.0-3ubuntu1_amd64.deb && apt-get install -f' and this fixed it. Petition to get this fix applied to a SRU for 16.04 thanks <3

19 comments hidden view all 166 comments
Revision history for this message
In , Mtsaavedra (mtsaavedra) wrote :

Hi - sorry to comment on an old closed bug, but has anyone ever reported the remaining problem (monitors mirrored after wake) as Natanael Copa suggested in #72? I searched but could not find anything.

Revision history for this message
In , Vincentiwilliam (vincentiwilliam) wrote :

Not here, I'm unfamiliar with the mirrored monitors issue other than mentioned in the bug report.

Revision history for this message
In , Simon Steinbeiß (ochosi) wrote :

Please create a new issue if needed but refrain from posting questions like that here. This is not a mailing list.

tags: added: xenial
19 comments hidden view all 166 comments
Revision history for this message
Dion Bonner (dion.b) wrote :

This is affecting me on Mythbuntu 16.0.4.3 - with all updates applied as of 10.09.2017. Machine is an Intel NUC NUC6CAYS.

Display is a Panasonic TV connected via HDMI.

As with other users above running xrandr --output 'DP-1' --mode '1920x1080' brings the display back to life, as does restarting X11. The problem can be cured by killing xfsettingsd.

dmesg and Xorg.log (concatenated together) attached so that you can get a sense of the hardware involved.

Sorry not sure whether this issue is Ubuntu specific or whether the bug belongs upstream with the XFCE guys. Happy to help in any way I can.

20 comments hidden view all 166 comments
Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote : Re: Xfce resets TV mode to NULL when power cycled

Unfortunately, the version in 16.04 was not patched.

The bug is fixed in 18.04 which installs xfce4-settings 4.12.4.

Changed in xfce4-settings (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Herb Miller Jr. (herbmilleriw) wrote :

Is there any hope of this being backported to 16.04? This is a big problem for our customers running our digital signage players running 16.04. This is a pretty critical bug to leave unaddressed in an LTS that still has two years of support left.

Sean Davis (bluesabre)
summary: - Xfce resets TV mode to NULL when power cycled
+ [SRU] Xfce resets TV mode to NULL when power cycled
Sean Davis (bluesabre)
Changed in nvidia-graphics-drivers (Ubuntu Xenial):
status: New → Invalid
Changed in nvidia-graphics-drivers (Ubuntu Bionic):
status: New → Invalid
Changed in nvidia-graphics-drivers-331 (Ubuntu Xenial):
status: New → Invalid
Changed in nvidia-graphics-drivers-331 (Ubuntu Bionic):
status: New → Invalid
Changed in xfce4-settings (Ubuntu Bionic):
status: New → Fix Released
Sean Davis (bluesabre)
description: updated
Revision history for this message
Sean Davis (bluesabre) wrote :

Attaching xenial debdiff

Revision history for this message
Sean Davis (bluesabre) wrote :

Uploaded package version 4.12.0-2ubuntu1.16.04.1

Changed in xfce4-settings (Ubuntu Xenial):
status: New → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Mario, or anyone else affected,

Accepted xfce4-settings into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xfce4-settings/4.12.0-2ubuntu1.16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in xfce4-settings (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Mathew Hodson (mhodson)
no longer affects: nvidia-graphics-drivers (Ubuntu)
no longer affects: nvidia-graphics-drivers (Ubuntu Xenial)
no longer affects: nvidia-graphics-drivers-331 (Ubuntu)
no longer affects: nvidia-graphics-drivers (Ubuntu Bionic)
no longer affects: nvidia-graphics-drivers-331 (Ubuntu Xenial)
no longer affects: nvidia-graphics-drivers-331 (Ubuntu Bionic)
affects: mythbuntu → ubuntu-translations
no longer affects: ubuntu-translations
Revision history for this message
Vladimir Kuznetsov (vovakuz) wrote :

I have installed the package xfce4-settings (version 4.12.0-2ubuntu1.16.04.1) from xenial-proposed.
The fix worked for me. Thanks!

Mathew Hodson (mhodson)
tags: added: regression-release verification-done-xenial
removed: dist-upgrade downstream verification-needed verification-needed-xenial
Changed in xfce4-settings (Ubuntu):
importance: Undecided → Medium
Changed in xfce4-settings (Ubuntu Xenial):
importance: Undecided → Medium
Changed in xfce4-settings (Ubuntu Bionic):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xfce4-settings - 4.12.0-2ubuntu1.16.04.1

---------------
xfce4-settings (4.12.0-2ubuntu1.16.04.1) xenial; urgency=medium

  * debian/patches/lp1308105.patch:
    - Fix Xfce resetting TV mode to NULL when power cycled (LP: #1308105)

 -- Sean Davis <email address hidden> Tue, 26 Mar 2019 21:52:13 -0400

Changed in xfce4-settings (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for xfce4-settings has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Displaying first 40 and last 40 comments. View all 166 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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