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

QT_SCALE_FACTOR is set to 2 even if the Screen runs at 1920x1080 #158

Closed
skoehler opened this issue Apr 21, 2018 · 9 comments
Closed

QT_SCALE_FACTOR is set to 2 even if the Screen runs at 1920x1080 #158

skoehler opened this issue Apr 21, 2018 · 9 comments
Assignees

Comments

@skoehler
Copy link

skoehler commented Apr 21, 2018

Even though I have a 4K screen I run mate at 1920x1080. So when I login, the screen resolution changes to 1920x1080. Yet, mate does insist on setting QT_SCALE_FACTOR to 2 and QT_AUTO_SCREEN_SCALE_FACTOR to 0. I cant see any option to turn this off.

Can I disable setting those QT variables somehow? Or can I instruct MATE to enable QT_AUTO_SCREEN_SCALE_FACTOR and not set QT_SCALE_FACTOR?

Expected behaviour

QT_SCALE_FACTOR is set to 1

Actual behaviour

QT_SCALE_FACTOR is set to 2

Steps to reproduce the behaviour

Change the screen resolution from 3840x2160 to 1920x1080, logout, login, run some QT app

MATE general version

1.20.1

Package version

1.20.0-1

Linux Distribution

Arch Linux

Link to downstream report of your Distribution

n/a

@vkareh vkareh self-assigned this Apr 21, 2018
@vkareh
Copy link
Member

vkareh commented Apr 21, 2018

when I login, the screen resolution changes to 1920x1080

This part sounds strange. If you set the resolution and re-login, it shouldn't change: it should just be already set. The settings-daemon sets those env variables during the init phase, and of the resolution changes after that, yes, the QT_ vars would be stuck on the HiDPI values.

It sounds as though you have auto-detect on (org.mate.interface scaling-factor) and your screen is being detected as HiDPI even though you have a regular resolution. I've seen strange behavior like this for 4K monitors before...

@raveit65 you have a 4K monitor, right? Is this reproducible on your side? I did promise you a script to test and fix auto-detection and I didn't write it. Apologies, I had a surprise trip to visit a client, and now I'm on holiday this week with my family - I'll write it this week. I think it should help with this issue.

@skoehler
Copy link
Author

skoehler commented Apr 21, 2018

@vkareh
Copy link
Member

vkareh commented Apr 21, 2018

Got it, yeah this makes sense. I haven't used sddm, but I'll give it a try this week to try to fix this

@raveit65
Copy link
Member

raveit65 commented Apr 22, 2018

Can't say, i don't know how Qt scaling is working here, It seems that kaffeine scales fine but other apps like keepassx2 are 2 small, which are working with cinnamon session.
My current problem is more the cursor which starts to small in session and when i moved over applications it shows the wrong cursor image.
Which makes HIDPI unusable with marco WM.
I have to use metacity WM for working with my box.

@skoehler
Copy link
Author

skoehler commented Apr 22, 2018

@raveit65
Copy link
Member

raveit65 commented Apr 24, 2018

Ahh, good hint, KeePassXC is working well with HIDPI :)
... using a Hidipi monitor means to switch to another applications..... ;)

I'm running a 4K screen at a 1080p resolution.

Maybe it's possible to override the session env ?

@raveit65
Copy link
Member

raveit65 commented Apr 24, 2018

[root@mother rave]# cat /etc/profile.d/qt-style.sh 
if [ "x$DESKTOP_SESSION" = "xmate" ] || [ "x$XDG_SESSION_DESKTOP" == "xmate" ]; then

	# QT apps to use GTK styling
    export QT_STYLE_OVERRIDE=gtk

    # Workaround clutter issue (LP: #1462445)
    export CLUTTER_BACKEND=x11

	# QT apps HIDPI scaling
    export QT_AUTO_SCREEN_SCALE_FACTOR=0
    export QT_SCALE_FACTOR=2.0
fi

Try creating such a file with updated values for your case.
Maybe this helps.

@vkareh
Copy link
Member

vkareh commented May 26, 2018

@skoehler - I'm assuming this issue still persists? Could you run

gsettings set org.mate.interface window-scaling-factor 1

and restart your session? Let us know if the issue keeps happening afterwards. This setting forces the settings-daemon to a non-HiDPI scaling.

I'm looking at the code and I think I'm going to add an option to turn the QT scaling on/off. MATE currently makes the decision without giving the user an option to disable it.

@skoehler
Copy link
Author

skoehler commented May 27, 2018

Setting window-scaling-factor to 1 worked for me.

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

No branches or pull requests

3 participants