You are not logged in.

#1 2019-01-14 04:29:56

ricks
Member
Registered: 2019-01-14
Posts: 12

Qt scaling factor reset not wanted - High DPI flag unwanted

Hey,

for quite a while now I am encountering the problem that my QT_SCALE_FACTOR=1.50 even though I set it in the /etc/profiles.d/ to 1. I really do not know how I can make it reset. Also I do not understand how or why the problem raised in the first place. qtdiag is saying that my monitor is on High Dpi scaling but I don't understand why and how I can make it stop because it is very annoying to have overscaled applications. I am using Qt 5.11.2.

Any help appreciated.
Thanks in advance.

Last edited by ricks (2019-01-16 10:26:45)

Offline

#2 2019-01-14 08:56:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,600

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

If the environment variable is at that value it's because something in the process of your session startup set it there.
What that is depends on what your session actually is (desktop environment, …) and how you start it (sddm, startx, …)

Everything local to your user and even shell (eg. bashrc) specific will dominate stuff in /etc/profile.d

Offline

#3 2019-01-14 15:33:45

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

Moving to Newbie Corner.

Offline

#4 2019-01-16 01:31:34

ricks
Member
Registered: 2019-01-14
Posts: 12

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

I am running I3wm and it is started by startx and I don't set the value in the zshrc bashrc or similar. Do you have a tip on where to look?

Offline

#5 2019-01-16 07:43:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,600

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

I'd start by checking whether it's set in the console login (pre-startx)
If not, i'll be drawn in by i3wm or xinit - you could narrow it more down by replacing i3 w/ eg. xterm in your .xinitrc.
If if is, things will rather revolve around /etc/profile*, ~/.profile and the global (/etc) and local shell settings.

Offline

#6 2019-01-16 07:55:15

ricks
Member
Registered: 2019-01-14
Posts: 12

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

It is already set pre-startx.
There is no ~/.profile and I checked /etc/profile* and did not find anything setting that value.

Offline

#7 2019-01-16 08:00:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,600

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

echo $SHELL
strace $SHELL 2>&1 | grep -E "open.*$HOME"

Offline

#8 2019-01-16 08:12:18

ricks
Member
Registered: 2019-01-14
Posts: 12

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

 ricks@archibald  ~  strace $SHELL 2>&1 | grep -E "open.*$HOME" 
openat(AT_FDCWD, "/home/ricks/.zshenv", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/ricks/.zshrc", O_RDONLY|O_NOCTTY) = 3
openat(AT_FDCWD, "/home/ricks/.nvm/versions/node/v9.11.1/bin", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
openat(AT_FDCWD, "/home/ricks/.zcompdump-archibald-5.6.2", O_RDONLY|O_NOCTTY) = 3
openat(AT_FDCWD, "/home/ricks/.zcompdump-archibald-5.6.2", O_RDONLY|O_NOCTTY) = 3
openat(AT_FDCWD, "/home/ricks/.nvm/nvm.sh", O_RDONLY|O_NOCTTY) = 3
openat(AT_FDCWD, "/home/ricks/.nvm/bash_completion", O_RDONLY|O_NOCTTY) = 3
openat(AT_FDCWD, "/home/ricks/.nvm/versions/node/v9.11.1/bin", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
openat(AT_FDCWD, "/home/ricks/.zcompdump", O_RDONLY|O_NOCTTY) = 3
openat(AT_FDCWD, "/home/ricks/.zcompdump", O_RDONLY|O_NOCTTY) = 3
openat(AT_FDCWD, "/home/ricks/.zsh_history", O_RDONLY) = 3
 ricks@archibald  ~  
openat(AT_FDCWD, "/home/ricks/.zsh_history", O_RDONLY) = 3
openat(AT_FDCWD, "/home/ricks/.zsh_history", O_WRONLY|O_CREAT|O_NOCTTY|O_APPEND, 0600) = 3
openat(AT_FDCWD, "/home/ricks/.zsh_history", O_RDONLY) = 3
openat(AT_FDCWD, "/home/ricks/.zsh_history.new", O_WRONLY|O_CREAT|O_EXCL, 0600) = 3
 ricks@archibald  ~  echo $SHELL
/bin/zsh

Offline

#9 2019-01-16 08:35:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,600

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

Well, the obvious contender is ~/.zshrc but if you can rule that out, it seems to be provided by some global setting.
Try to create a new user, log in as that user and see whether QT_SCALING_FACTOR is there as well.
Also try chsh your login shell to /bin/bash to see whether it's drawn by something zsh specific (in doubt it's OMZ, because it's always OMZ…)

Offline

#10 2019-01-16 10:43:16

ricks
Member
Registered: 2019-01-14
Posts: 12

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

With a second user the QT_SCALE_FACTOR is 0.
While having /bin/bash let's see if it changes with having zsh as login shell.

Offline

#11 2019-01-16 10:44:58

ricks
Member
Registered: 2019-01-14
Posts: 12

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

When I apply zsh as the login shell it does not change.

I am totally confused now.

Offline

#12 2019-01-16 13:45:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,600

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

paste your ~/.zshrc and ~/.zprofile (if the latter exists)

Offline

#13 2019-01-16 14:12:37

ricks
Member
Registered: 2019-01-14
Posts: 12

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
ZSH=/usr/share/oh-my-zsh/

# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"

# Set list of themes to load
# Setting this variable when ZSH_THEME=random
# cause zsh load theme from this variable instead of
# looking in ~/.oh-my-zsh/themes/
# An empty array have no effect
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line to disable bi-weekly auto-update checks.
DISABLE_AUTO_UPDATE="true"

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
  git
  bundler
  dotenv
  rake
  rbenv
  ruby
  archlinux
)


# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh
if [[ ! -d $ZSH_CACHE_DIR ]]; then
  mkdir $ZSH_CACHE_DIR
fi

source $ZSH/oh-my-zsh.sh

#aliase

alias ll='ls -alh'
alias dd='dd status=progress'
alias _='sudo'

alias create_wifi_repeater='sudo create_ap wlp2s0 wlp2s0'

unshortenme() {
    URL=$1
    curl https://unshorten.me/s/$URL
}

youtube-audio() {
    YOUURL=$1
    youtube-dl $YOUURL -x --audio-format mp3 --audio-quality 0 "$1" --output "%(title)s.%(ext)s"
}

export EDITOR=nano

aurman() {
	INPUT=$1
	PARAM=$*
	PARAM2=`echo "$PARAM" | sed -e "s/^$INPUT//"`
	if [[ $INPUT = *"-S"* ]]; then
		command aurman $INPUT $PARAM2 --noedit
	else
		echo $INPUT
		command aurman $INPUT $PARAM2
	fi
}
	

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

.zprofile

#
# ~/.bash_profile
#

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx  

.bash_profile is not existent

Offline

#14 2019-01-16 14:17:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,600

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

seth wrote:

in doubt it's OMZ, because it's always OMZ…

I was being serious here …

Offline

#15 2019-01-16 14:34:57

ricks
Member
Registered: 2019-01-14
Posts: 12

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

Could you explain what you mean by OMZ?

Offline

#16 2019-01-16 14:42:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,426

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

Try without oh my zsh

Last edited by V1del (2019-01-16 14:43:23)

Offline

#17 2019-01-17 00:59:55

ricks
Member
Registered: 2019-01-14
Posts: 12

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

Tried without OMZ and still the same result.

Offline

#18 2019-01-17 08:25:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,600

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

dissect - stray some

dcounter=0
echo "((dcounter++)) $QT_SCALE_FACTOR"
…
echo "((dcounter++)) $QT_SCALE_FACTOR"
…
echo "((dcounter++)) $QT_SCALE_FACTOR"

into your zshrc, ensure there's one at the beginning and one at the end.

Login and see where the value changes, then narro down that section.

Offline

#19 2019-01-28 17:04:26

ricks
Member
Registered: 2019-01-14
Posts: 12

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

It id not work at all from the very first to the very last value it is all 1.50.

Offline

#20 2019-01-28 21:31:30

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,600

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

To be sure: that's straight out of a console login, not some xterm shell?

So it's exclusive to your user and set before zshrc is read, but you have no ~/.zprofile nor ~/.profile …
Did you already try altering the login shell of *your* user to /bin/bash?

Offline

#21 2019-01-28 23:30:51

ricks
Member
Registered: 2019-01-14
Posts: 12

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

I posted the ~/.zprofile above. This is straight out of console. I will try to alter the login shell of my user.

Offline

#22 2019-03-11 00:47:01

ricks
Member
Registered: 2019-01-14
Posts: 12

Re: Qt scaling factor reset not wanted - High DPI flag unwanted

Final workaround is to call startx with the QT_SCALE_FACTOR=1 before the comman as well as exporting it in the .xinitrc.

Offline

Board footer

Powered by FluxBB