You are not logged in.

#1 2019-07-16 23:24:02

hazote
Member
Registered: 2013-07-24
Posts: 46

openbox menu width

hello,
I have a laptop with discret card (intel/nvidia)
for some applications I use a second TTY with nvidia only.

I ever noticed that under my TTY with nvidia openbox menu is a little tiny that under ma primary session with intel/nvidia

today I plug a wacom tablet, and If I launch the second TTY on nvidia only with wacom pluged, menu get bigger !
signal is get by HDMI

any idea of why? (I presume that this is in relation with resolution, but screen are two in 1920 and only menu box change)

some pictures:
primary session (intel/nvidia)

https://framapic.org/sWinhc34lWGQ/Sc1f2rhvr4DD.png

session nvidia only before plugin wacom:

https://framapic.org/mMxCy9aFVvQU/b79FkWb9N1AZ.png

session nvidia only launched after plugin wacom (so auto send HDMI signal)

https://framapic.org/PwGAGprWoSPl/O64skNBfkmP1.png


moderator edit -- replaced oversized images with links.
Pasting pictures and code

Last edited by 2ManyDogs (2019-07-16 23:34:12)

Offline

#2 2019-07-16 23:29:31

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: openbox menu width

I remember the Nvidia driver sets DPI according to what it finds in the monitor's EDID. You can check on this by running "xdpyinfo | grep resolution".

There's a way to set it to 96 DPI with an Xorg config file option. The option for this is described somewhere in Nvidia's documentation. You can find the documentation in /usr/ somewhere. Check the file listing for the "nvidia-utils" package to get the name.

Offline

#3 2019-07-17 00:33:51

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: openbox menu width

Ropid wrote:

I remember the Nvidia driver sets DPI according to what it finds in the monitor's EDID. You can check on this by running "xdpyinfo | grep resolution".

There's a way to set it to 96 DPI with an Xorg config file option. The option for this is described somewhere in Nvidia's documentation. You can find the documentation in /usr/ somewhere. Check the file listing for the "nvidia-utils" package to get the name.

thanks, I will look at this

Offline

#4 2019-07-17 08:52:29

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: openbox menu width

I looked into old backups I have here and found an example:

Section "OutputClass"
    Identifier "my nvidia settings"
    MatchDriver "nvidia-drm"
    # Option "UseEdidDpi" "False"
    Option "DPI" "96 x 96"
EndSection

You can throw this file into /etc/X11/xorg.conf.d/ and can use any name you like for it (the filename has to end in ".conf"). This file will work next to other files you have.

Offline

#5 2019-07-17 17:26:45

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: openbox menu width

under my nvidia only session "xdpyinfo | grep resolution"
return me 96x96

don't manage to configure Nvidia /EDID

I have created a  /etc/X11/xorg.conf.d/20-nvidia.conf
with

Section "OutputClass"
    Identifier "my nvidia settings"
    MatchDriver "nvidia-drm"
    # Option "UseEdidDpi" "False"
    Option "DPI" "96 x 96"
EndSection

this doesn't work

Offline

#6 2019-07-17 22:43:07

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

Re: openbox menu width

Section "Device"
    Identifier "my nvidia settings"
    MatchDriver "nvidia"
    Option "UseEdidDpi" "False"
    Option "DPI" "96x96"
EndSection

Also please your xorg log and "xrandr -q" output (w/ the tablet attached)

Offline

#7 2019-07-18 00:57:29

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: openbox menu width

xrandr -q
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 293mm x 165mm
   1920x1080     60.00*+
   1680x1050     59.95  
   1440x900      59.89  
   1360x768      60.02  
   1280x1024     60.02  
   1280x960      60.00  
   1280x768      59.87  
   1280x720      60.00  
   1024x768      60.00  
   800x600       60.32  
   640x480       59.94  
eDP-1-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1920x1080     60.02*+  60.01    59.97    59.96    59.93    48.03  
   1680x1050     59.95    59.88  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   640x400       59.88    59.98  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected (normal left inverted right x axis y axis)
HDMI-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-3 disconnected (normal left inverted right x axis y axis)
HDMI-1-3 disconnected (normal left inverted right x axis y axis)
  1680x1050 (0x50) 146.250MHz -HSync +VSync
        h: width  1680 start 1784 end 1960 total 2240 skew    0 clock  65.29KHz
        v: height 1050 start 1053 end 1059 total 1089           clock  59.95Hz
  1280x1024 (0x57) 108.000MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
  1280x960 (0x5a) 108.000MHz +HSync +VSync
        h: width  1280 start 1376 end 1488 total 1800 skew    0 clock  60.00KHz
        v: height  960 start  961 end  964 total 1000           clock  60.00Hz
  1024x768 (0x68) 65.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
        v: height  768 start  771 end  777 total  806           clock  60.00Hz
  800x600 (0x77) 40.000MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
        v: height  600 start  601 end  605 total  628           clock  60.32Hz
  640x480 (0x84) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz

xorg.log:  https://pastebin.com/kfDBpRA5
xorg.log.old:  https://pastebin.com/JuqMGn6V

don't know why but suddently, I can't boot to my "all days session".
the only change since last working session is taping "nvidia-xconfig"
xorg.conf : https://pastebin.com/QTbHTW0R
never mind: I fix it (have to replace intel under xorg device part)

Last edited by hazote (2019-07-18 11:20:17)

Offline

#8 2019-07-18 06:28:17

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

Re: openbox menu width

Please use "code" tags, not "quote" tags.
The HDMI output is ~160dpi, the eDP ~140dpi - that doesn't explain a dpi related change and 90dpi would be the wrong value anyway.
The config file won't work because

[    11.289] (==) Using config file: "/etc/X11/xorg.conf"

You've the garbage config written by nvidia-settings, remove that, it's also the cause for

Fatal server error:
[    11.340] (EE) no screens found(EE) 

during an attempt to run on the intel chip.
Ensure to read up https://wiki.archlinux.org/index.php/NVIDIA_Optimus and the subsequent links.

Because of this, the logs do not provide any further insight.

Offline

#9 2019-07-18 13:41:35

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: openbox menu width

seth wrote:

Please use "code" tags, not "quote" tags.
The HDMI output is ~160dpi, the eDP ~140dpi - that doesn't explain a dpi related change and 90dpi would be the wrong value anyway.

for the wacom I get from https://www.sven.de/dpi/ 165.63 DPI
my laptop screen LG LGD053F  seems to be 141.21 ppi

I see that desktop launch in 74 DPI

xrandr | grep -w connected
eDP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 340mm x 190mm

so I put in xorg.conf

Section "Monitor"
DisplaySize        340 190

and now, screen is in "143x144 dots per inch" but My openbox menu and some text/menu became bigger and uglier.

so my problem with the nvidia only session is related to dpi-openbox-(GTK?) relation

intel xorg log  https://pastebin.com/8mGZNYsk  (before modifing xorg for default dpi)
nvidia xorg log https://pastebin.com/qsZC5APU

edit: putting DPI conf under nvidia.conf give me now same result on two session.
it seems that this is a GTK probleme
also

xrdb -query | grep dpi

return nothing

Last edited by hazote (2019-07-18 13:56:44)

Offline

#10 2019-07-18 14:30:57

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

Re: openbox menu width

"so I put in xorg.conf"
Don't do that. Fix the dpi in the xrdb instead.

The intel chip will not adhere to any DPI configuration in xorg.conf.d, you'll have to "xrandr --dpi 140" in your session script (before running openbox and don't fork it!) instead.

And once more: remove the static /etc/X11/xorg.conf - from the log it's now probably mostly garbage anyway.

Offline

#11 2019-07-18 15:16:19

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: openbox menu width

seth wrote:

"so I put in xorg.conf"
Don't do that. Fix the dpi in the xrdb instead.

ok removed.
how to fix it in xrdb ? I haven't ~/.Xresources file

seth wrote:

And once more: remove the static /etc/X11/xorg.conf - from the log it's now probably mostly garbage anyway.

how to do that ? if it look for this file this mean that it leak config somewhere else right ?

Last edited by hazote (2019-07-18 16:28:58)

Offline

#12 2019-07-18 16:26:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,518
Website

Re: openbox menu width

hazote wrote:

how to fix it in xrdb ? I haven't ~/.Xresources file

You've answered your own question there - create the file.

hazote wrote:

I'm using Slim display manager, perhaps it is time to change it.

No, 6 years ago was the time to change:

wiki wrote:

Warning: The SliM project has been abandoned (last release was 2013, the project homepage is down), and is not fully compatible with systemd, including logind sessions. Consider using a different Display manager or Xinitrc.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#13 2019-07-18 16:31:39

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: openbox menu width

I created .Xressources

xrdb -query -all

return nothing under my intel session but is working (141 DPI) under my nvidia session
(it seems that Slim is incompatible) so I have to choose a new display manager.

My topic problem:
how to fix my problem of resolution of openbox menu, terminal and some application that are showing too big on screen (GTK ?)
for now I know there is a relation between DPI on boot session and on screen resolution of some elements (openbox menu, terminal...)
but after changing dpi after boot, these elements don't size change

Last edited by hazote (2019-07-18 16:34:56)

Offline

#14 2019-07-18 17:05:01

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: openbox menu width

You can load your .Xresources contents somewhere in your startup scripts, you don't have to change away from slim. The command is this:

xrdb -merge "$HOME/.Xresources"

Offline

#15 2019-07-18 20:06:15

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

Re: openbox menu width

seth wrote:

The intel chip will not adhere to any DPI configuration in xorg.conf.d, you'll have to "xrandr --dpi 140" in your session script (before running openbox and don't fork it!) instead.

Offline

#16 2019-07-18 20:22:49

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: openbox menu width

seth wrote:
seth wrote:

The intel chip will not adhere to any DPI configuration in xorg.conf.d, you'll have to "xrandr --dpi 140" in your session script (before running openbox and don't fork it!) instead.

Ropid wrote:

You can load your .Xresources contents somewhere in your startup scripts, you don't have to change away from slim. The command is this:

xrdb -merge "$HOME/.Xresources"

ok all is good now, exept I have some application that are now very big on screen
any solution ? or may I stay at 70-90 DPI and only change it when I need ?

Last edited by hazote (2019-07-18 20:32:18)

Offline

#17 2019-07-18 20:27:00

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

Re: openbox menu width

some application

Unless you're more specific, there's nothing we can say about this.

Offline

#18 2019-07-18 21:07:29

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: openbox menu width

sorry,

good:
xterm
pcmanfm
filezilla
deadbeef
baobab
steam

bad:
sakura (terminal)  edit: modif conf make it better ( by  putting font in 6 or 8)
chromium
yandex
freerapid downloader
krita even with HiDPI option, this isn't good to work with it

Last edited by hazote (2019-07-18 22:44:03)

Offline

#19 2019-07-19 12:06:43

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

Re: openbox menu width

For chromium and yandex (that's a rebranded chromium/chromium based browser?):
content or UI?
https://wiki.archlinux.org/index.php/Hi … gle_Chrome

What exactly is the problem w/ krita?

Offline

#20 2019-07-19 15:12:02

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: openbox menu width

seth wrote:

For chromium and yandex (that's a rebranded chromium/chromium based browser?):
content or UI?
https://wiki.archlinux.org/index.php/Hi … gle_Chrome

What exactly is the problem w/ krita?

yes yandex is based on chromium.
don't know why, but if I boot in 96 dpi, then pass in 161 and run chromium, it launch at the good size

krita ui is bigger . if I launch it a 75 or 96 dpi looking is good, but at 141 or 161, it became ugly with big text size.

perhaps I have better to stay in 96 dpi, and only work in 161 when I plug my graphical tablet.
it seems that if I launch session in 96 I haven't probleme, and change dpi after doesn't affect graphics, but when I plug the second screen I get scaling probleme.

Last edited by hazote (2019-07-19 16:15:33)

Offline

#21 2019-07-19 19:36:14

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

Re: openbox menu width

if I boot in 96 dpi, then pass in 161 and run chromium, it launch at the good size

What?

with big text size

I assume because you ran the system at 66% of the actual DPI, you configured oversized fonts everywhere (like in the terminal emulator) - you should fix rather that.
Also Qt and gtk provide integer factors to (force)scale UI elements, see https://wiki.archlinux.org/index.php/HiDPI#GUI_toolkits - you may feel mor comfortable enforcing a scale factor of "1"?

Offline

#22 2019-07-20 12:50:52

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: openbox menu width

env QT_FONT_DPI=96 krita

make it !

what I'm trying to say upper:
if I boot with my settings

xrandr --dpi 141.21 --output eDP1 --mode 1920x1080 &

in my autostart
or

Xft.dpi:   141

in my .Xressources,
when I launch chrome, it is big and unusable

if I launch my session with 96 dpi, and then make a xrandr --dpi 141 and lauch chromium: it is at a good size .

Last edited by hazote (2019-07-20 13:06:10)

Offline

#23 2019-07-20 13:01:29

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

Re: openbox menu width

I'm not sure when the autostart actually applies, but do not fork that call.

The QT environment basically fakes the DPI for the Qt font rendering, fix your font settings instead (you probably want to use smaller fonts)

Offline

#24 2019-07-20 13:38:01

hazote
Member
Registered: 2013-07-24
Posts: 46

Re: openbox menu width

ok so for chromium, applying

--force-device-scale-factor=1 

make it look better

what is the best way to "natively" launch application with options.
I mean I would like that if I type krita in a term, this would lauch "env QT_FONT_DPI=96 krita"

for now I make under /usr/bin/ a shortcut "krita" that point to a srcipt

#!/bin/sh
env QT_FONT_DPI=84 /usr/bin/krita.bak

pointing to the original launcher that I renamed in krita.bak.
little weird, but taping "krita" in a terminal work hmm

I manage to make it working with chromium and yandex by editing a conf file or adding option in "/usr/bin/yandex-browser-beta" file (don't know if this is a good way to do)

Last edited by hazote (2019-07-20 23:10:49)

Offline

Board footer

Powered by FluxBB