Eyal Lebedinsky (HE12026-02-05):
> Me too. I use fedora and have the same issue. Actually, using a KVM to switch 
> to another machine
> then back does the same thing (dark screen, monitor says no HDMI signal). I 
> ended up with the same solution (xrandr).
> BTW, the text consoles (ttyN) are visible, only the X11 one (tty1 for me) is 
> blank.
> 
> For me this started a few months ago, it was working fine until then.
> 
> I agree that X11 seems to think all is well.
> 
> I suspected it is the intel embedded GPU that is at fault, the vibe on the 
> 'net is that this driver is in bad shape.
> Changing X11 to use modesetting (was intel) did not help.

Thanks for confirming I am not alone having the issue.

I have written the following script (that you can consider public
domain), to be called from the greeter-wrapper. At first I considered
calling `xrandr --output $out --primary --auto` but I eventually decided
to kill the greeter wrapper and cause it to restart. Among other things
because greeter-setup-script creates a background image at the
resolution of the screen.

Regards,

-- 
  Nicolas George


#!/bin/zsh

if [[ $(</proc/$PPID/cmdline) != *wrapper*greeter* ]] ; then
  print -u2 "Must be started from greeter wrapper"
  exit 1
fi

restart=false
while true ; do
  xrandr=$(xrandr --current)
  xrandr=(${(f)xrandr})
  xrandr=(${(M)xrandr:#* connected *})
  if [[ $#xrandr != 0 ]] ; then
    break
  fi
  restart=true
  xev -root -event randr |
    while read -r ev det ; do
      if [[ $ev == RRScreenChangeNotify ]] ; then
        break
      fi
    done
done
if [[ $restart == true ]] ; then
  kill $PPID
fi

Reply via email to