Summary: | Display not recognized if initially disconnected | ||
---|---|---|---|
Product: | xorg | Reporter: | farmboy0+freedesktop |
Component: | Driver/AMDgpu | Assignee: | xf86-video-ati maintainers <xorg-driver-ati> |
Status: | RESOLVED NOTOURBUG | QA Contact: | Xorg Project Team <xorg-team> |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
farmboy0+freedesktop
2019-06-01 11:23:52 UTC
Are you using LightDM as display manager? I see the same behavior here with LightDM, but I'm thinking this is a problem in LightDM and is not a problem in xf86-video-amdgpu. What I noticed is that if I log in blind by typing my password, then my XFCE desktop will later work fine after I plug in the monitor cable. The desktop will start using the monitor. I am using SDDM. Havent tried logging in blind, I usually restart X. Not a driver or X server bug. Xorg doesn't automatically enable hot-plugged displays, this has to be done by a client. I got this to work right with LightDM. Looking at "man sddm.conf", it seems the same method could also work with SDDM. I created the following three scripts inside "/etc/lightdm/": ------------------------------------------------------------ $ tail -n+1 display-setup session-setup xrandr-auto.sh ==> display-setup <== #!/bin/bash /etc/lightdm/xrandr-auto.sh & ==> session-setup <== #!/bin/bash pkill -x xrandr-auto.sh ==> xrandr-auto.sh <== #!/bin/bash trap 'kill -- $(jobs -p)' EXIT LC_ALL=C xev -root -event randr | while read -r line; do # trigger only on certain lines if [[ $line == "RRScreenChangeNotify event"* ]]; then echo "$(date +%H:%M:%S.%N): screen change event" # in background, sleep a bit and run xrandr --auto # and don't start multiple background jobs if [[ ! $(jobs) ]]; then { sleep 1; echo "$(date +%H:%M:%S.%N): run xrandr" xrandr --auto } & fi fi done ------------------------------------------------------------ And then in "/etc/lightdm/lightdm.conf", I configured the following: [Seat:*] display-setup-script=/etc/lightdm/display-setup session-setup-script=/etc/lightdm/session-setup The interesting part is inside "xrandr-auto.sh". That script uses 'xev' to capture screen change events and it runs "xrandr --auto" when those events happen. This seems to solve the problem here for me. I can now boot without a monitor being connected, and when I connect the monitor the login screen will show up correctly. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.