Disable Unredirect Fullscreen

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
B1-66ERDK

Disable Unredirect Fullscreen

Post by B1-66ERDK »

Cinnamon 2.x uses unredirect by default.

Is there any way I can disable Unredirect Fullscreen??

If not, is there then a way that I can start a program and tell it to redirect even if its a fullscreen program??

The reason I want this is because, of tearing in games.

Because when a program is unredirected it does not seem to care if i enable vsync in nvidia-settings and not even in the game itself..

Enabling vsync works fine for the desktop (cinnamon) but not the unredirected fullscreen programs..

This worked nicely for me in cinnamon 1.8 but since 2.x and it by default using unredirect fullscreen, this is giving me problems.

Thanks in advance
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
B1-66ERDK

Re: Disable Unredirect Fullscreen

Post by B1-66ERDK »

So i have found a solution.

This is what i did:

From the desktop you press ALT+F2

Then you press lg and then hit enter

Then a ternimal pops up, and you insert this:
Meta.disable_unredirect_for_screen(global.get_screen())

And then hit enter again, and now Unredirect is disabled :)

So now i just need a way to make this permanent so I don't have to do it everytime i reboot.
Luno

Re: Disable Unredirect Fullscreen

Post by Luno »

You are my hero :>

This resolved my problem with heavy tearing in every Unity3D game (Composite detected = VSync forced off). Now it would be really nice to have this setting applied at startup automatically.
mbalazs81

Re: Disable Unredirect Fullscreen

Post by mbalazs81 »

Is this a bug?
B1-66ERDK

Re: Disable Unredirect Fullscreen

Post by B1-66ERDK »

Hey guys, did not know this thred was still running.. So for those of you looking for at more permanent fix you can do this:

As root open op the file called main.js located in /usr/share/cinnamon/js/ui/

For example like this: sudo gedit /usr/share/cinnamon/js/ui/main.js

And then change everywhere is says Meta.enable_unredirect_for_screen(global.screen);

And change that so it says Meta.disable_unredirect_for_screen(global.screen); instead.. you can use the search to find them.

Save the changes and reboot.

And now unredirect will always be disabled at boot.
Oc3lot

Re: Disable Unredirect Fullscreen

Post by Oc3lot »

I had the same problem and disabling the unredirect solved the issue. Is there any downside?Why isn't disable by default? It's a nvidia problem or a cinnamon problem?
User avatar
clem
Level 12
Level 12
Posts: 4303
Joined: Wed Nov 15, 2006 8:34 am
Contact:

Re: Disable Unredirect Fullscreen

Post by clem »

This is coming in Cinnamon 2.4:

https://github.com/linuxmint/muffin/com ... 75987928ed

Unredirecting fullscreen was introduced in 2.0 to give these windows better performance by not compositing them (typically this would allow a game to implement its own VSYNC and say get higher FPS or rely more on CPU and not affect GPU, or at least.. use GPU in the manner that it defined without having to "pay" for compositing).

With today's commit it's being disabled by default again and a new option will appear in Cinnamon Settings to turn it back on.
Image
Oc3lot

Re: Disable Unredirect Fullscreen

Post by Oc3lot »

I read an article about CCSM which allow to enable the unredirect but disable it for specific applications:
Image

Does it work? Can it be implemented? This should made happy all kind of users... maybe.
User avatar
clem
Level 12
Level 12
Posts: 4303
Joined: Wed Nov 15, 2006 8:34 am
Contact:

Re: Disable Unredirect Fullscreen

Post by clem »

That's a bit overkill I think, but we can think about it for the future.

There's a checkbox in Cinnamon Settings now (in the upcoming 2.4). Although it affects all windows, you can enable/disable it without having to log out or to restart Cinnamon.

What we have also are WM hints, for applications to specifically require to bypass or not to bypass compositing. We'll need to look into that a bit more as well (and so will upstream as I doubt they're used properly by most games and/or media players).
Image
Locked

Return to “Cinnamon”