Is there an X11 utility to scale a window? - Desktop Customization & Workflow

Users browsing this thread: 2 Guest(s)
Tmplt
Long time nixers
My main monitor is an Qnix QX2710 imported from Korea. It has a nice 1440p resolution and size, but did not come with decent EDID. As such, it only has a single RandR mode out of the box. It was only by pure luck I stumbled upon a mode line that over clocked the screen to 96Hz.

The problem this causes is that if I want to play a game in full screen, I have to run it in a 2560x1440 resolution. This isn't a problem in most cases, but I don't have the most powerful GPU. So if I want to play in a lower resolution, I have to play in windowed mode — or have the game in the upper left of the screen with black borders on the right and bottom. Similarly, some games cannot be played in something larger than an arbitrary resolution (often 1080p).

(I'm actually guessing a bit here. I only ever used just window managers, so I don't know if this issue can be fixed in some DE.)

So: is there some X11 utility that can scale a window up to a greater resolution, and thus remove the pesky black bars?



As a hacky workaround, I could probably use xrandr(1)'s --scale option, but the less I have to mess with my monitors' alignments, the better.
| web| git |
venam
Administrators
(21-08-2017, 09:41 PM)Tmplt Wrote: So: is there some X11 utility that can scale a window up to a greater resolution, and thus remove the pesky black bars?
You can make the window bigger but if the application "drawing" on it isn't aware of the size change then it's going to keep "drawing" at the same size. If you make the window bigger you'll still have those "black/empty" colors around it.

Some window managers respect the ICCCM default size of the window, be it minimum size of maximum size, etc.. Others don't.

Maybe a compositor "magnifying/zooking" tool exists. I'll try to look for one.
EDIT: Here are some
https://packages.debian.org/sid/x11/xzoom
http://magnifier.sourceforge.net/
https://www.kde.org/applications/utilities/kmag/
Compiz has a nice way to zoom in: https://askubuntu.com/questions/164820/d...-magnifier
josuah
Long time nixers
You can probably do this with weston, the reference wayland compositor:

https://www.reddit.com/r/linux/comments/...d/cjr7z0r/
http://www.chaosreigns.com/wayland/weston/ (search for "zoom")

You can also decrease your resolution and scale down the font of all text windows, and decrease browsers DPI

layout.css.devPixelsPerPx - in firefox's about:config

$ chromium --force-device-scale-factor=0.6 - for chromium, chrome, iridium...
venam
Administrators
A thread about an issue that is still barely solved and keeps bugging me.
Is there a way to scale the whole screen that is easy to do, or a magnifying glass. Be it on X11 or Wayland.
Since then I've also found the magnus tool which shows in a standalone window whatever the mouse follows as zoomed.

Personally, I'm still confused about this.
opfez
Members
I don't know exactly what you mean, but on my HiDPI laptop I add
Code:
xrandr --dpi 200 &
to my .xinitrc to scale things properly.

Looks like a project for our X11 wizards (mcol and phillbush) if it isn't solved)
venam
Administrators
(27-10-2020, 11:26 AM)opFez Wrote: I don't know exactly what you mean, but on my HiDPI laptop I add
Let me try to rephrase the original post.

You got a second screen but which only a single resolution appear in xrandr. Windows that you spawn on it are too small to read.
However, you don't want to use xrandr --scale XxY because of the hassle.
Also note that xrandr got plenty of options and capabilities that aren't present in GUI that wraps around it.
There's currently no solution to scale specific windows or a group of windows other than through a compositor, but I haven't encountered this even. Only zooming capabilities.

We could take the subject more broadly and discuss high dpi screen too, all in one swoop.
opfez
Members
Ah, I see. Thanks for clearing it up.

Yeah HiDPI and multiple resolutions is such a hassle. Probably one of the only areas Windows actually works nicely.
mcol
Nixers
(21-08-2017, 09:41 PM)Tmplt Wrote: As a hacky workaround, I could probably use xrandr(1)'s --scale option, but the less I have to mess with my monitors' alignments, the better.

Scaling to view only a subregion of the X Screen isn't ideal, because of the mentioned alignment issue, but simply changing the resolution of the output keeps everything tidy and deals with all the scaling, DPI, whatever for you:

Code:
xrandr --output eDP-1 --mode 1920x1080
game
xrandr --output eDP-1 --mode 2560x1440

Steam has a nice feature where you can modify the launch command on a per game basis, so if only some games need it (and of course, if you're using steam), a launch command equivalent to the above should do it for the games that can't use the full resolution themselves.