Bug 1182457

Summary: resume from sleep docked causes no output to external display
Product: [Fedora] Fedora Reporter: Peter Hatina <phatina>
Component: cinnamonAssignee: leigh scott <leigh123linux>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: fale, leigh123linux, lkocman, miketwebster, phatina, pschiffe, raveit65.sun, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tint2-0.11-13.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-30 07:09:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Hatina 2015-01-15 07:23:09 UTC
Description of problem:  Resuming from sleep (lenovo t430s) docked, an external display isn't activated.  Having the session unlocked, the display output changes properly.


Version-Release number of selected component (if applicable):
cinnamon-2.4.5-2.fc21.x86_64



How reproducible:


Steps to Reproduce:
1. Suspend F21 box running Cinnamon undocked (only notebook's display is active)
2. Dock the notebook (don't open notebook's panel).
3. Resume from sleep.

Actual results:
External display isn't activated.

Expected results:
I can see login screen on the external display.

Comment 1 leigh scott 2015-01-15 08:19:53 UTC
Why do you expect it to automatically be aware of the second screen and swap to it?
Does any other DE do this?

Comment 2 Peter Hatina 2015-01-15 09:15:10 UTC
I expected this behavior because, when Cinnamon is running, I can dock/undock the notebook and diplays are set up properly. Only case, when the output isn't activated is when I resume the notebook.

Comment 3 leigh scott 2015-01-15 11:02:57 UTC
(In reply to Peter Hatina from comment #2)
> I expected this behavior because, when Cinnamon is running, I can
> dock/undock the notebook and diplays are set up properly. Only case, when
> the output isn't activated is when I resume the notebook.

Can you test gnome-shell to see if it works there, if it does maybe I can find a commit to backport to cinnamon.

Comment 4 Peter Hatina 2015-01-15 11:50:00 UTC
GNOME Shell behaves as expected. An external display is activated properly.

Comment 5 Lubos Kocman 2015-01-15 11:52:27 UTC
Hello,

works for me on GNOME Shell. Peter actually tried his scenario and my setup with 2 external displays worked just fine after resume.

Thinkpad X230
kernel-3.17.8-300.fc21.x86_64
gnome-shell-3.14.3-1.fc21.x86_64
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) 


Lubos
rel-eng

Comment 6 leigh scott 2015-01-15 13:29:57 UTC
Does this make a difference?

gsettings set org.cinnamon.settings-daemon.plugins.xrandr default-monitors-setup clone

Comment 7 Peter Hatina 2015-01-15 13:35:10 UTC
No. *Only* if I open the lid, then both monitors get set up.

Comment 9 Peter Hatina 2015-01-15 16:26:04 UTC
Commit 6defe42c needs to be backported, as well.

Comment 10 Peter Hatina 2015-01-16 08:48:02 UTC
Do you know, which tag from gnome-settings-daemon points to cinnamon-settings-daemon HEAD?

Comment 11 leigh scott 2015-01-16 08:53:05 UTC
(In reply to Peter Hatina from comment #10)
> Do you know, which tag from gnome-settings-daemon points to
> cinnamon-settings-daemon HEAD?

I believe c-s-d was forked from 3.4 or 3.6, since then it had other bits added (mainly systemd, logind and upower).

Comment 12 leigh scott 2015-01-16 08:56:22 UTC
(In reply to leigh scott from comment #11)
> (In reply to Peter Hatina from comment #10)
> > Do you know, which tag from gnome-settings-daemon points to
> > cinnamon-settings-daemon HEAD?
> 
> I believe c-s-d was forked from 3.4 or 3.6, since then it had other bits
> added (mainly systemd, logind and upower).

The c-s-d version in cinnamon originated from ubuntu g-s-d source, so has some of there changes as well.

Comment 13 Peter Hatina 2015-01-16 13:14:31 UTC
I did some backports.  Now I see, that proper output is activated; but:

Lock screen gets repositioned with some delay (say 3-4 seconds), so in the meantime, I can see the desktop.

Can you help me debug this?


I created *.src.rpm, so that you can have a look:

https://phatina.fedorapeople.org/rpms/cinnamon-settings-daemon/cinnamon-settings-daemon-2.4.3-2.fc21.src.rpm

Comment 14 Peter Hatina 2015-01-16 13:28:35 UTC
Scratch build for F21: http://koji.fedoraproject.org/koji/taskinfo?taskID=8637654

Comment 15 leigh scott 2015-01-16 13:34:46 UTC
The patch looks good, I wonder if this commit would help.

https://git.gnome.org/browse/gnome-settings-daemon/commit/plugins/xrandr?id=32f7a938fca072e14bad1928b492e29ba0e3090c

Comment 16 Peter Hatina 2015-01-16 14:22:35 UTC
Will test later, for sure.

Comment 17 leigh scott 2015-01-16 21:14:28 UTC
Ok after a little debugging I found this

(cinnamon-settings-daemon:4003): GLib-GIO-ERROR **: Settings schema 'org.cinnamon.settings-daemon.plugins.power' does not contain a key named 'lid-close-suspend-with-external-monitor'

https://dl.dropboxusercontent.com/u/6907158/cinnamon-settings-daemon-2.4.3-3.fc21.src.rpm

http://koji.fedoraproject.org/koji/taskinfo?taskID=8645208

you my need to backport some of this commit if adding the schema back doesn't work.

https://git.gnome.org/browse/gnome-settings-daemon/commit/plugins/power/gsd-power-manager.c?h=gnome-3-8&id=6defe42c31b18ad8dbb2fff3869b0fccbd821e97

Comment 18 Peter Hatina 2015-01-17 20:23:38 UTC
Using a bit different setup: I woke the notebook (lid closed) with external monitor connected directly to it's VGA output.  External monitor also wasn't activated.

Comment 19 Peter Hatina 2015-01-18 16:06:56 UTC
Changed a bit the behavior of power_client_changed_cb(): for every randr event, we configure the display output.  It's done because, notebook can be resumed from sleep without opening its lid, so the if-else excluded the second part, where the *needed* auto-configuration was done.

For me, it seems to be working. I will post my experience after several days.

Please review: https://phatina.fedorapeople.org/rpms/cinnamon-settings-daemon/cinnamon-settings-daemon-2.4.3-4.fc21.src.rpm

Comment 20 leigh scott 2015-01-20 11:31:57 UTC
(In reply to Peter Hatina from comment #19)
> Changed a bit the behavior of power_client_changed_cb(): for every randr
> event, we configure the display output.  It's done because, notebook can be
> resumed from sleep without opening its lid, so the if-else excluded the
> second part, where the *needed* auto-configuration was done.
> 
> For me, it seems to be working. I will post my experience after several days.
> 
> Please review:
> https://phatina.fedorapeople.org/rpms/cinnamon-settings-daemon/cinnamon-
> settings-daemon-2.4.3-4.fc21.src.rpm

The patch is working fine here (single screen Lenovo T410), once your happy with it would you like to commit it here? (if you don't have an account I can do it for you).

https://github.com/linuxmint/cinnamon-settings-daemon

and I will apply a patch to the fedora package.

P.S Many thanks for your hard work and testing.

Comment 21 Peter Hatina 2015-01-20 11:41:03 UTC
(In reply to leigh scott from comment #20)
> (In reply to Peter Hatina from comment #19)
> > Changed a bit the behavior of power_client_changed_cb(): for every randr
> > event, we configure the display output.  It's done because, notebook can be
> > resumed from sleep without opening its lid, so the if-else excluded the
> > second part, where the *needed* auto-configuration was done.
> > 
> > For me, it seems to be working. I will post my experience after several days.
> > 
> > Please review:
> > https://phatina.fedorapeople.org/rpms/cinnamon-settings-daemon/cinnamon-
> > settings-daemon-2.4.3-4.fc21.src.rpm
> 
> The patch is working fine here (single screen Lenovo T410), once your happy
> with it would you like to commit it here? (if you don't have an account I
> can do it for you).

Sure. I guess, the end of work week should be suitable. I want to play for some time with this.

> 
> https://github.com/linuxmint/cinnamon-settings-daemon

I do have github account and will do a pull request.

> 
> and I will apply a patch to the fedora package.
> 
> P.S Many thanks for your hard work and testing.

Comment 22 Peter Hatina 2015-01-31 15:46:21 UTC
Pull request created: https://github.com/linuxmint/cinnamon-settings-daemon/pull/77

Comment 23 Peter Hatina 2015-02-10 09:34:02 UTC
Merged with master.

Comment 24 leigh scott 2015-03-01 21:23:33 UTC
Hi Peter,

I'm getting some assertion errors in my logs related to your patch, does this pull break docking for you?

https://github.com/linuxmint/cinnamon-settings-daemon/pull/81

Comment 25 leigh scott 2015-03-01 22:09:08 UTC
(In reply to leigh scott from comment #24)
> Hi Peter,
> 
> I'm getting some assertion errors in my logs related to your patch, does
> this pull break docking for you?
> 
> https://github.com/linuxmint/cinnamon-settings-daemon/pull/81

test build

https://koji.fedoraproject.org/koji/buildinfo?buildID=616687

Comment 26 Peter Hatina 2015-03-02 06:50:49 UTC
Quick test: It looks like nothing's got broken.

Comment 27 Fedora Update System 2015-03-20 16:50:05 UTC
tint2-0.11-13.fc22,cinnamon-settings-daemon-2.4.3-3.fc22,cinnamon-screensaver-2.4.1-2.fc22,cinnamon-control-center-2.4.2-2.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/tint2-0.11-13.fc22,cinnamon-settings-daemon-2.4.3-3.fc22,cinnamon-screensaver-2.4.1-2.fc22,cinnamon-control-center-2.4.2-2.fc22

Comment 28 Fedora Update System 2015-03-22 04:31:25 UTC
Package tint2-0.11-13.fc22, cinnamon-settings-daemon-2.4.3-3.fc22, cinnamon-screensaver-2.4.1-2.fc22, cinnamon-control-center-2.4.2-2.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing tint2-0.11-13.fc22 cinnamon-settings-daemon-2.4.3-3.fc22 cinnamon-screensaver-2.4.1-2.fc22 cinnamon-control-center-2.4.2-2.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-4378/tint2-0.11-13.fc22,cinnamon-settings-daemon-2.4.3-3.fc22,cinnamon-screensaver-2.4.1-2.fc22,cinnamon-control-center-2.4.2-2.fc22
then log in and leave karma (feedback).

Comment 29 Fedora Update System 2015-03-30 07:09:34 UTC
tint2-0.11-13.fc22, cinnamon-settings-daemon-2.4.3-3.fc22, cinnamon-screensaver-2.4.1-2.fc22, cinnamon-control-center-2.4.2-2.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.