desktop-packages team mailing list archive
-
desktop-packages team
-
Mailing list archive
-
Message #159374
[Bug 1308105]
As suggested in comment 49
I think proper solution is enable crtc upon reconnection IF it is disabled.
Here is a prototype for patch - I'm hoping maintainer (Sean?)
can suggest "correct code" to enable crtc.
diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 095e323..af70256 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -415,6 +415,7 @@ xfce_displays_helper_screen_on_event (GdkXEvent *xevent,
XfceRROutput *output, *o;
XEvent *e = xevent;
gint event_num;
+ gint j;
guint n, m, nactive = 0;
gboolean found = FALSE, changed = FALSE;
@@ -496,9 +497,37 @@ xfce_displays_helper_screen_on_event (GdkXEvent *xevent,
{
xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "New output connected: %s",
output->info->name);
+ /* need to enable crtc for output ? */
+ if (output->info->crtc == None)
+ {
+ xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "enabling crtc for %s", output->info->name);
+ crtc = xfce_displays_helper_find_usable_crtc (helper, output);
+ if (crtc)
+ {
+ crtc->mode = output->preferred_mode;
+ crtc->rotation = RR_Rotate_0;
+ crtc->x = crtc->y = 0;
+ /* set width and height */
+ for (j = 0; j < helper->resources->nmode; ++j)
+ {
+ if (helper->resources->modes[j].id == output->preferred_mode)
+ {
+ crtc->width = helper->resources->modes[j].width;
+ crtc->height = helper->resources->modes[j].height;
+ break;
+ }
+ }
+ xfce_displays_helper_set_outputs (crtc, output);
+ crtc->changed = TRUE;
+ }
+ }
+
changed = TRUE;
}
}
+ if (changed)
+ xfce_displays_helper_apply_all (helper);
+
/* Start the minimal dialog according to the user preferences */
if (changed && xfconf_channel_get_bool (helper->channel, NOTIFY_PROP, FALSE))
xfce_spawn_command_line_on_screen (NULL, "xfce4-display-settings -m", FALSE,
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to nvidia-graphics-drivers in Ubuntu.
https://bugs.launchpad.net/bugs/1308105
Title:
Xfce resets TV mode to NULL when power cycled
Status in Mythbuntu:
Confirmed
Status in xfce4-settings:
Confirmed
Status in nvidia-graphics-drivers package in Ubuntu:
Invalid
Status in nvidia-graphics-drivers-331 package in Ubuntu:
Invalid
Status in xfce4-settings package in Ubuntu:
Confirmed
Bug description:
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 <superm1@xxxxxxxxxx>
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
==============================
To manage notifications about this bug go to:
https://bugs.launchpad.net/mythbuntu/+bug/1308105/+subscriptions