Comments (9)
Hi @dkambersky,
Thanks for the feedback.
The --dpi
setting that you can set with xrandr is an indication to applications, it doesn't configure the hardware. So, forcing DPI value with 96x96 will be a workaround.
from mons.
Yeah, I'm aware, though a lot of the applications I use actually take note of it - i3wm, urxvt (hence the huge fonts in the screenshot, among other things). I just don't want it creeping up to ridiculous values, I'm not expecting it to be a DPI scaling silver bullet.
Do you need any more info from me? It might be that the physical dimensions detected are getting smaller, I don't really know what depends on what there.
EDIT: I should probably clarify that the screenshot is of a fullscreen terminal on a 1680*1050 display, the fonts are usually a fraction of the size.
from mons.
Me neither.
As you said, the DPI increasing happens when you switch monitors, it means performing the -s
option and then -o
.
While I am investigating, you should use the following command to adjust the DPI value:
xrandr --dpi <value>
Nevertheless, a first workaround would be to run xrandr --dpi 96
or using xdpyinfo directly.
from mons.
Hi, thanks for the fix! However, it's still not working correctly for me, but I suspect that might be a fault of some auto-detection not neccessarily done by mons - my secondary (120dpi) monitor gets detected as 165x166 dpi, and the primary (96dpi) gets detected as 166x166 for some reason - at least it doesn't creep up with every execution anymore.
Would passing the target DPI as a flag to mons be something that's possible? This utility is otherwise awesome, so I'd love to use it in place of my hacky xrandr script, but it's causing some of my most used GUI elements to be ridiculously oversized.
from mons.
@dkambersky, thanks again for testing.
Could you please give me your monitor size information ?
from mons.
eDP1-1 (laptop, 13.3", 1080p display, I usually use 120dpi on it):
- Resolution 1920x1080
- Physical size 294mm x 165mm
HDMI-0 (external, 20", 1680x1050, 96dpi)
- Resolution 1680x1050
- Physical size 434mm x 270mm
here's xrandr's output with the monitor plugged in, after mons -e left
. In this state xdpyinfo
reports a DPI of 166x166 (occasionally 165x166). Switching back to only the laptop's monitor does not change the DPI.
Thanks for looking into this!
from mons.
The DPI value given by mons is correct but does not fit for applications.
Actually, there is a huge difference between xdpyinfo and xrandr regarding monitor physical sizes.
Information from xrandr are correct.
Sample:
$ xrandr | grep ' connect'
eDP1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 344mm x 194mm
$ xdpyinfo | grep '^screen' -A1
screen #0:
dimensions: 1920x1080 pixels (508x285 millimeters)
Physical sizes:
- xrandr: 344mm x 194mm (correct)
- xdpyinfo: 508mm x 285mm
DPI calculation (from xdpyinfo sources):
/*
* there are 2.54 centimeters to an inch; so there are 25.4 millimeters.
*
* dpi = N pixels / (M millimeters / (25.4 millimeters / 1 inch))
* = N pixels / (M inch / 25.4)
* = N * 25.4 pixels / M inch
*/
DPI results:
- xrandr: 1920 x 25.4 / 344 = 141 (correct, but displaying issues)
- xdpyinfo: 1920 x 25.4 / 508 = 96
I suspect X library to give real and 96dpi-like physical sizes.
Those from xdpyinfo are 96dpi-like sizes.
Finally, to fix that DPI issue, three options:
- Finding and adding an option to xrandr command to avoid increasing the value
- (or) Adding an option to mons for setting arbitrarily a value (if not used 96 by default)
- (or) Force 96 by default into mons after switching second to primary mode
So be it. I will add a DPI option to mons.
from mons.
Thanks!
from mons.
Feel free to report issue.
from mons.
Related Issues (20)
- Feature Request: Flag to trigger optional rotation HOT 2
- Bug: mons -s works only one time HOT 5
- mons -a; problem going from 4:3 external to 16:9 internal HOT 3
- Unable to install mons HOT 3
- Add mons to the FreeBSD ports HOT 4
- Tagging recent commits
- Please provide examples in --help and README.md HOT 2
- Feature Request: --verbose mode to print all xrandr calls executed, and --dry-run to print but not call
- Feature Request: Ability to supply scale setting for a given monitor
- Mirroring makes primary montior blank
- Feature Request: set refresh rate
- Makefile installs an empty manpage if help2man isn't present
- Daemon mode doesn't work on Ubuntu with dash as /bin/sh
- Is it possible to use 2 monitors in extended mode with a third monitor mirroring one of them?
- Ignore intel VIRTUAL[1-9] outputs HOT 1
- AUR packages outdated / broken HOT 1
- PKGBUILD Arch Linux mons-git "broken"
- Daemon mode fails due to non-existing "/sys/class/drm/*/status"
- ./mons.sh: line 86: fg: no job control HOT 1
- RAM usage goes up when switching i3 workspaces in secondary monitor only mode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mons.