Bug 2211563 - Display panel auto detect/100% needs to be re-selected every login
Summary: Display panel auto detect/100% needs to be re-selected every login
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: mate-control-center
Version: 38
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Wolfgang Ulbrich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-01 05:13 UTC by Dan
Modified: 2023-08-06 16:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
lightdm.conf (6.48 KB, text/plain)
2023-06-05 13:43 UTC, Dan
no flags Details
slick-greeter.conf (1.10 KB, text/plain)
2023-06-05 13:47 UTC, Dan
no flags Details
change DPI value (91.53 KB, image/png)
2023-08-06 16:23 UTC, Bill Therrien
no flags Details

Description Dan 2023-06-01 05:13:23 UTC
The problem began when I installed ASUS geforce RTX 3050 video card. The windows were huge. I used to be able to fit 4 firefox windows on 32" monitor at 3840x2160 resolution. After the installation of the video card I could only fit 2 firefox windows and greatly overlapped at that.

I found that if you change the display setting from "auto detect" to "100%" every thing is reduced back to size. But only until you log back in again and then everything becomes huge again. If you change the display setting from "%100" back to "auto detect" everything is reduced in size again until you log back in again. It doesn't matter whether "auto detect" or "100%" is selected only that you change the setting.

Reproducible: Always

Steps to Reproduce:
1.Change display from auto detect to 100% or 100% to auto detect
2.
3.

Comment 1 Dan 2023-06-01 05:19:01 UTC
If forgot to mention that you need the nvidia drivers from rpmfusion to be installed in order to reproduce the problem.

Comment 2 Wolfgang Ulbrich 2023-06-01 08:45:35 UTC
Still wondering why you want to use the wrong scaling factor for 3840x2160 resolution?
For this HIDPI resolution 200% is the right setting.
And it seems that the geforce RTX 3050 detect the right setting with autodetect.
If you want to use 100% for what ever reason ever you can set it with dconf/gsettings.
This is my setting for monitors with 3840x2160 pixel.
```
gsettings get org.mate.interface window-scaling-factor
2
```
0 = autodetect
1 = 100%
2 = 200%

This setting you will find in dconf-editor (org/mate/desktop/interface) or in mate-display-properties.

Comment 3 Dan 2023-06-01 13:24:51 UTC
Thanks for your response Wolfgang Ulbrich. I changed the scaling factor to a custom value of 1 with dconf-editor and did reduce the size to %100. However when I login again the display is back to %200. I checked the scaling factor in the dconf-editor to see if it had changed and is says the current value is 1. This is what I changed it to. I tried resetting the switch "Use default value" but when I login again the display is back to %200. Also the mate display is set to %100. It would seem that the geforce setting is used regardless of the dconf setting or the display setting when you login.

Comment 4 Wolfgang Ulbrich 2023-06-02 09:09:53 UTC
I switched myself from nvidia to amd ryzen with internal gpu, so i can't really reproduce it.
But did you tried nvidia-settings. Maybe there is a setting for scaling factor.
Or open an issue at rpmfusion and ask there for help.

Comment 5 Dan 2023-06-03 11:56:24 UTC
Thanks for the infomation Wolfgang Ulbrich. I checked nvidia-settings and resolution can be changed but scaling factor isn't mentioned. If you make a code change I can test it on my system.

Using the information you supplied I was able to develop a good workaround.

I created a shell script and named it setdisplay to set the scaling factor to %100.
Code:
gsettings set org.mate.interface window-scaling-factor 0
gsettings set org.mate.interface window-scaling-factor 1
kill `pidof caja`

Two gsettings are needed because you must insure that the windows scaling factor changes. caja needs to aborted so that caja has the new scaling factor. I added this script to the bin directory. I then added this script to the mate startup applications.
mate control panel->Personal->Startup Applications

I tried loggin a few times and it seems to work.

Comment 6 Wolfgang Ulbrich 2023-06-03 15:38:38 UTC
I recall that with my former GTX 1600 Nvidia card the scaling factor was always 100% for 3840x2160 pixel with first desktop start, means auto-selection was broken.
That auto-selection works out of box with GTX 3050 seems a progress.
Sadly this is not what you want.
I would really ask at rpmfusion for help, they knows it better how actual nvidia cards are working.
It is really weird that "org.mate.interface window-scaling-factor 1" will be overridden at startup.
Maybe there is new nvidia "systemctl --user" setting which control the session startup?
You can check this with "systemctl --user list-unit-files" or "systemctl --user list-units"
If rpmfusion say this is a Mate bug and gives us more information, then Mate upstream needs to be informed.
But in general scaling-factor 200% is the right setting for 3840x2160 pixel.

Comment 7 Dan 2023-06-04 12:33:19 UTC
Wolfgang Ulbrich thanks for your response. I filed a defect with rpmfusion.
https://bugzilla.rpmfusion.org/show_bug.cgi?id=6701
They closed the defect "resolved invalid" saying
nvidia-settings only runs in the user session after login.
The nvidia driver isn't aware of scaling and play no part, the DE is responsible for all scaling.
I asked what DE stands for: DE = Desktop Environment (Mate).

Here is my theory. I believe that the scaling factor is %200 in the login screen where a user is selected. I think this is where the %200 scaling factor comes from when Mate is started. This is fine because the scaling factor isn't known until a user is selected to get the proper scaling factor. I believe the proper scaling factor should be set by Mate in the early stages of Mate starting.

Comment 8 Wolfgang Ulbrich 2023-06-05 11:25:11 UTC
Are you using the default login-manager for Fedora Mate? 
Which is lightdm with slick-greeter as frontend.
Than you can check settings with lightdm-settings.

Comment 9 Dan 2023-06-05 13:43:01 UTC
Created attachment 1969049 [details]
lightdm.conf

Comment 10 Dan 2023-06-05 13:47:28 UTC
Created attachment 1969050 [details]
slick-greeter.conf

Comment 11 Dan 2023-06-05 13:51:43 UTC
I'm using the default everything, I haven't changed anything after installing F38. So that would be lightdm with slick-greeter if that is the default.
I checked /etc/lightdm/lightdm.conf and slick-greeter.conf but didn't see anything about scaling.
I have added attachments for this two .conf files so you can view them.

Comment 12 Wolfgang Ulbrich 2023-06-05 14:00:27 UTC
There is a GUI tool which called lightdm-settings.
```
[root@mother rave]# rpm -qa lightdm-settings
lightdm-settings-1.6.1-2.fc38.noarch
```
In this tool there is dropdown-menu called HIDPI-Support.

Comment 13 Dan 2023-06-05 14:24:08 UTC
HIDPI-Support is set to Auto

Comment 14 Dan 2023-06-05 14:51:27 UTC
Reading about HIDPI-Support has something to do with scaling. Is there where the %200 scaling is coming from? Should I disable HIDPI-Support?

Comment 15 Wolfgang Ulbrich 2023-06-05 14:58:05 UTC
Yes, HIDPI-support=activate means 200% scaling, HIDPI-support=deactivate means scaling 100%.
Try it out, i have no idea if this helps.

Comment 16 Dan 2023-06-05 15:05:35 UTC
I tried setting HIDPI to disable, but it didn't help. I still have %200 scaling.

Comment 17 Dan 2023-06-06 08:51:12 UTC
I think the HIDPI is the right place. I think that scaling is set to %200 in slick-greeter and it flows right through to when Mate is starting. I don't think the disable is working for the HIDPI setting. I took a quick look at the source for slick-greeter. I see two places scaling is set to 2 but never see scaling initialized to 1. I think once it gets set to 2 that is where is stays until someone changes it Mate display settings.

        var hidpi = UGSettings.get_string (UGSettings.KEY_ENABLE_HIDPI);
        debug ("HiDPI support: %s", hidpi);
        if (hidpi == "auto") {
            check_hidpi ();
        }   
        else if (hidpi == "on") {
            GLib.Environment.set_variable ("GDK_SCALE", "2", true);
        }

I think this should read:
        var hidpi = UGSettings.get_string (UGSettings.KEY_ENABLE_HIDPI);
        debug ("HiDPI support: %s", hidpi);
        GLib.Environment.set_variable ("GDK_SCALE", "1", true);
        if (hidpi == "auto") {
            check_hidpi ();
        }   
        else if (hidpi == "on") {
            GLib.Environment.set_variable ("GDK_SCALE", "2", true);
        }

What do you think?

Comment 18 Dan 2023-06-06 15:43:51 UTC
If HIDPI_Support disable works, I think this would fix my problem, however this is a very obscure and I doubt many people would figure it out. I think the scaling factor should be set at the beginning of Mate to whatever is specified in Mate Display settings.

Comment 19 Dan 2023-06-08 01:46:05 UTC
I have submitted a defect against slick greeter.

https://bugzilla.redhat.com/show_bug.cgi?id=2213170

Comment 20 Bill Therrien 2023-08-06 16:21:46 UTC
I've had this problem periodically over the years as I've done re-installs of Fedora and the Nvidia driver.

I think the issue is really with org.mate.font-rendering
By default this is set to 0 DPI. At least when I finally find my way back to it after encountering the issue. I'll have to try another fresh install to see if it is anything other than '0' before installing the nvidia driver.
However, setting this to 100 DPI fixes the problem persistently, and I have no further scaling problems afterward.

Comment 21 Bill Therrien 2023-08-06 16:23:34 UTC
Created attachment 1981984 [details]
change DPI value


Note You need to log in before you can comment on or make changes to this bug.