Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock screen gets blurred again when resuming from suspend #113

Open
pacho2 opened this issue Jun 10, 2021 · 13 comments
Open

Lock screen gets blurred again when resuming from suspend #113

pacho2 opened this issue Jun 10, 2021 · 13 comments

Comments

@pacho2
Copy link

pacho2 commented Jun 10, 2021

It suffers from the same issue as https://github.com/PRATAP-KUMAR/Control_Blur_Effect_On_Lock_Screen extension was suffering some time ago: when resuming from suspend, lock screen gets blurred again.

The problem is that I cannot see their git history before version 6 to know how do they fix it :S

I think they solve it commenting these lines:
https://github.com/PRATAP-KUMAR/Control_Blur_Effect_On_Lock_Screen/blob/master/extension.js#L26

But I am not completely sure

Thanks a lot

@pacho2
Copy link
Author

pacho2 commented Jun 10, 2021

I cannot say if this problem was added in version 33. I think that probably was all the time there but, until know, I was using both extensions (bing and control blur). Then, probably control blur extension was getting used at resume time and it seemed to work. But, for some reason, with last bing extension v33, both extensions have started to collide getting lock screen to stop working completely. I disabled control-blur to prevent that and I hit this issue :/

@neffo
Copy link
Owner

neffo commented Jun 10, 2021

You shouldn't run both these extensions with Blur enabled, as they work exactly the same way.

I can confirm I see the same issue. The solution above means that extension can't be disabled in a session, so not really a good option (in fact it's a reason for the extension to be rejected by the extensions.gnome.org moderators). I'm not sure when disable() is called, with an active extension (presumably standby), but we shouldn't ignore it.

@pacho2
Copy link
Author

pacho2 commented Jun 10, 2021

I found the old bug in the other extension
PRATAP-KUMAR/gse-control-blur-effect-on-lockscreen#1

If I remember correctly, that was the only option as, during suspend, "disable" will be called but, at resume time, extensions are not re-loaded until screen is unlocked :/

Well, the other option could be to try to detect if the other extension is enabled to skip the blur part. In any case, I don't understand what changed between v33 and v32 that caused both extensions to collide and cause lock screen to not work at all :/

@neffo
Copy link
Owner

neffo commented Jun 10, 2021

Possibly the order the extensions are loaded has changed. I'd suggest disabling Blur control in this extension. and leaving it on in the other.

@pacho2
Copy link
Author

pacho2 commented Jun 11, 2021

OK, I will do it , thanks

@pacho2
Copy link
Author

pacho2 commented Jun 14, 2021

I tried to use Control_Blur extension and disable it from Bing, but they still collide as reported in
PRATAP-KUMAR/gse-control-blur-effect-on-lockscreen#5

It is because of this:
https://github.com/neffo/bing-wallpaper-gnome-extension/blob/master/extension.js#L736

As that reseting of blur is called even when the blur setting is disabled from bing, it gets the blur messed up when resuming from suspend. Maybe that lines should be called only when blur._switch is enabled, otherwise bing extension will reset blur values when it wakes up from suspend (still don't understand why it can reset the blur from lock screen but not set it to the desired values... I guess it comes from gnome-shell internals about what extensions can do from lock-screen)

Commenting that two lines makes it not collide at all with the other extension, but I don't have the knowledge to make it conditional with the override-lockscreen-blur setting :/

@neffo
Copy link
Owner

neffo commented Jun 14, 2021

Ahh, this should really just check if it's explicitly enabled first. That's fixable.

@pacho2
Copy link
Author

pacho2 commented Jun 16, 2021

I have applied the commit to v34 and for now it seems to work fine

@neffo neffo mentioned this issue Jun 16, 2021
13 tasks
neffo added a commit that referenced this issue Sep 26, 2021
* dont reset blur on disable() if never enabled #113
* remove Lang and Mainloop refs in prefs and utils
* migrate to GObject from Lang module, fix build
* add image gallery
* add support for GNOME 41
* add thumbnails to gallery (faster loading)
* Add Japanese translation (#122) #14 thanks to @nexryai
* update README and metadata
* minor fix for GNOME 40+ on 1080p or lower screens

Co-authored-by: graubs <[email protected]>
Co-authored-by: Cen <[email protected]>
Co-authored-by: nexryai <[email protected]>
@pacho2
Copy link
Author

pacho2 commented May 6, 2022

Hi

It seems Gnome 42 now allows extensions to run in lock screen:
https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/2bf31dc49fd837e0e16fffba1130ddd9d924bb5f

That probably would avoid this issues

@pacho2
Copy link
Author

pacho2 commented Jan 24, 2023

It seems that simply appending the proper session-modes to metadata.json solves the problem for me :D

--- metadata.json.old	2023-01-24 17:24:07.124529927 +0100
+++ metadata.json	2023-01-24 17:24:19.852913263 +0100
@@ -6,5 +6,6 @@
     "description": "Sync your wallpaper to today's Microsoft Bing image of the day (the image you see when you visit Bing.com).\n\n *Disclaimer*: this extension is unofficial and not affiliated with Bing or Microsoft in any way. Images are protected by copyright and are licensed only for use as wallpapers.\n\nFeatures:\n* UHD resolution wallpapers\n* Automatically fetches current Bing wallpaper of the day and sets as both lock screen and desktop wallpaper (user selectable on GNOME versions that support it)\n* Doesn't poll continuously - only once per day and on startup (schedules a refresh when Bing is due to update)\n * random mode (from previously downloaded wallpapers)\n *NEW: select/cycle wallpaper through previously downloaded images\n* Language support: English (en), German (de), Dutch (nl), Italian (it), Polish (pl), Chinese (zh_CN, zh_TW), French (fr_FR), Portuguese (pt, pt_BR), Ukrainian (uk), Russian (ru_RU), Spanish (es), Korean (ko), Indonesian (id), Catalan (ca), Norwegian Bokmål (nb) & Nynorsk (ni), Swedish (sv), Arabic (ar), Hungarian (hu) and Japanese (ja) - a HUGE thanks to the translators\n\nThis extension was forked from the NASA APOD extension by Elinvention (https://github.com/Elinvention) and inspired by Bing Desktop Wallpaper Changer by Utkarsh Gupta (https://github.com/UtkarshGpta).\n\nAlways restart GNOME after manually updating extensions. Please report bugs to the GitHub page below:",
     "version": "44",
     "url": "https://github.com/neffo/bing-wallpaper-gnome-extension",
-    "gettext-domain": "BingWallpaper"
+    "gettext-domain": "BingWallpaper",
+    "session-modes": ["user", "unlock-dialog"]
 }

@neffo
Copy link
Owner

neffo commented Jan 24, 2023

Yep this should work fine, and has the advantage of continuing to fetch new wallpapers. Though you might have the issues with the icon vanishing or remaining active in the lockscreen. Most of the extension is shut down by default (except for the new dynamic blur).

So by default this should work better than it used to.

@pacho2
Copy link
Author

pacho2 commented May 20, 2023

For now I am locally patching it since I commented here without issues... but it is true that I didn't pay attention to the icon in the lockscreen 🤔

@pacho2
Copy link
Author

pacho2 commented Oct 26, 2023

This still looks to be working fine... maybe it could be finally upstreamed?

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants