Cut your screen resolution exactly in half!
Cut your screen resolution exactly in half!
While working in another project that needed a smaller resolution screen, a friendly dev made an amazing tip:
To keep your screen resolution nice and sharp, simply cut your /native/ screen resolution in half! Say what? Why?
In my case, I was running a pretty standard modern resolution of 1920x1080. But when using xrandr, there was NO option for exactly half the res of a non-standard 960x540 ! I thought I was limited to the monitor's built-in choices which pretty much mimicked what I'd seen everywhere else.
But something odd like 960x540 ?? Who would run that? Someone who wants exactly half the native-resolution for some reason - like keeping it all sharp and spaced properly, that's who.
(Obviously running a full Xorg in Porteus much of this is mitigated by simply changing your fonts and DE options in your native resolution)
The key was to calculate a new modeline, and get it detected by xrandr (or lxrandr gui etc), and switch to it.
So for most, this is not really news. Handy article here:
https://wiki.archlinux.org/title/Xrandr
But the real news for me was that using exactly half-your native resolution could come in handy - perhaps for those running Porteus on a super high-res TV or high-end monster monitor, and they are running out of options with fonts and DE settings, and for some reason, ALL other default choices offered up by xrandr just seem a bit "off" or uncomfortable viewing.
Moral: run your high-res native monitor at exactly HALF. You'll need to calculate the new modeline (I use CVT for that for a little extra precision as compared to the older GTF)
To keep your screen resolution nice and sharp, simply cut your /native/ screen resolution in half! Say what? Why?
In my case, I was running a pretty standard modern resolution of 1920x1080. But when using xrandr, there was NO option for exactly half the res of a non-standard 960x540 ! I thought I was limited to the monitor's built-in choices which pretty much mimicked what I'd seen everywhere else.
But something odd like 960x540 ?? Who would run that? Someone who wants exactly half the native-resolution for some reason - like keeping it all sharp and spaced properly, that's who.
(Obviously running a full Xorg in Porteus much of this is mitigated by simply changing your fonts and DE options in your native resolution)
The key was to calculate a new modeline, and get it detected by xrandr (or lxrandr gui etc), and switch to it.
So for most, this is not really news. Handy article here:
https://wiki.archlinux.org/title/Xrandr
But the real news for me was that using exactly half-your native resolution could come in handy - perhaps for those running Porteus on a super high-res TV or high-end monster monitor, and they are running out of options with fonts and DE settings, and for some reason, ALL other default choices offered up by xrandr just seem a bit "off" or uncomfortable viewing.
Moral: run your high-res native monitor at exactly HALF. You'll need to calculate the new modeline (I use CVT for that for a little extra precision as compared to the older GTF)
That's a UNIX book - cool. -Garth
- Rava
- Contributor
- Posts: 5424
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Cut your screen resolution exactly in half!
Can you elaborate on that?
https://wiki.archlinux.org/title/Xrandr says
Added in 2 hours 25 minutes 24 seconds:Troubleshooting
Screen Blinking
For some LCD screens (e.g. Samsung 2343NW, Acer XB280HK, iiyama ProLite XUB3490WQSU-B1...), the command cvt -r (i.e. with reduced blanking) is to be used. E.g with ProLite XUB3490WQSU-B1 and Thunderbolt HDMI 2.0 adapter on Dell XPS 13, with 60hz (59,94 selected) this screen is blinking (and the adapter+LCD screen works perfectly on Windows), you have to do :
cvt -r 3440 1440
Wich giving you :
# 3440x1440 59.97 Hz (CVT) hsync: 88.82 kHz; pclk: 319.75 MHz Modeline "3440x1440R" 319.75 3440 3488 3520 3600 1440 1443 1453 1481 +hsync -vsync
Then you have to do :
xrandr --newmode "3440x1440R" 319.75 3440 3488 3520 3600 1440 1443 1453 1481 +hsync -vsync
and
xrandr --addmode DP1 3440x1440R
Now you can select 59.97hz mode with the best screen resolution, wich (sic!) not blinking anymore.
Thanks so much for your article. At times one needs a smaller resolution without the X/Y ratio being messed up, just like you wrote.
As example here the info xrandr (without any options) gives me about my main FullHD monitor:
Code: Select all
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 496mm x 292mm
1920x1080 60.00*+
1680x1050 59.95
1600x1200 60.00
1440x900 59.89
1280x1024 75.02 60.02
1280x960 60.00
1152x720 60.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94
While the smallest resolution 640x480 is obviously not; that is 4:3 or 1.33333… ratio.
I try on working it out creating a setup for your 1/4th resolution (half of x and half of y) 960x540 and report here my steps and if I ran into issues.
My system: Port 5.0rc3 XFCE 4.12
It took me some minutes getting the above info since I was on my mono-core Porteus i586 3.1 kernel + 4.0 System when visiting the forum (if you guessed that this is the quite limited machine: yes, indeed.) and had to switch rooms to access my 4 core (8 threads) 5.0rc3 x86-64 main machine to get the above info.
Cheers!
Yours Rava
Yours Rava
Cut your screen resolution exactly in half!
Sure! You might recognize this system. The reason I cut mine in exactly half was because I was using a very simplistic window manager, that has no sizing control of it's own. Therefore, if one wanted things not to look um, really teeny - tiny, this is how I did it on a modern monitor.
My native hardware resolution boots up at 1920x1080. So what I needed was to create a modeline for 960x540 at 60hz since that is not part of my monitors choice of selections:
Calculate the modeline - just the first line here generates the responses.
Great, got the numbers, but now what?
I eventually decided to run a full Xorg, but with this minimal window manager environment that has no user-adjustable handles other than screen res.
So, I made it part of my xorg setup. On this *non-porteus* system, it was placed in this directory as a file "5-monitor.conf"
/usr/local/share/X11/xorg.conf.d/5-monitor.conf
I was especially careful to get the Identifier for my screen right, HDMI-1. I've seen other systems that exclude the hyphen, so be careful if yours is actually HDMI1 for instance. Xrandr will tell you what the active screen is, but I've been bitten by missing hyphens before. 
The Modeline was taken from the cvt calculation made earlier (cvt 960 540 60)
I was also careful about the PreferredMode line, being sure that there are TWO "r" 's in there.
And also don't forget the underlines. Ah, xorg config files ... so much fun.
I threw the power-saving option of DPMS in because my monitor could do power saving, but not sure if it was truly necessary.
So basically this is how I made it more or less permanent. There are other ways to do this temporarily with xrandr.
What blew my mind was that I had never known that one /had/ to accept a monitors default selections, and could do a custom non-standard modeline! And by doing it exactly half the native resolution specs, it kept fonts sharp, spacing natural and so forth.
My native hardware resolution boots up at 1920x1080. So what I needed was to create a modeline for 960x540 at 60hz since that is not part of my monitors choice of selections:
Calculate the modeline - just the first line here generates the responses.
Code: Select all
tc@box:~$ cvt 960 540 60
# 960x540 59.63 Hz (CVT 0.52M9) hsync: 33.51 kHz; pclk: 40.75 MHz
Modeline "960x540_60.00" 40.75 960 992 1088 1216 540 543 548 562 -hsync +vsync
I eventually decided to run a full Xorg, but with this minimal window manager environment that has no user-adjustable handles other than screen res.
So, I made it part of my xorg setup. On this *non-porteus* system, it was placed in this directory as a file "5-monitor.conf"
/usr/local/share/X11/xorg.conf.d/5-monitor.conf
Code: Select all
Section "Monitor"
Identifier "HDMI-1"
Modeline "960x540_60.00" 40.75 960 992 1088 1216 540 543 548 562 -HSync +vsync
Option "PreferredMode" "960x540_60.00"
Option "DPMS"
EndSection

The Modeline was taken from the cvt calculation made earlier (cvt 960 540 60)
I was also careful about the PreferredMode line, being sure that there are TWO "r" 's in there.

I threw the power-saving option of DPMS in because my monitor could do power saving, but not sure if it was truly necessary.
So basically this is how I made it more or less permanent. There are other ways to do this temporarily with xrandr.
What blew my mind was that I had never known that one /had/ to accept a monitors default selections, and could do a custom non-standard modeline! And by doing it exactly half the native resolution specs, it kept fonts sharp, spacing natural and so forth.
That's a UNIX book - cool. -Garth
- Rava
- Contributor
- Posts: 5424
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Cut your screen resolution exactly in half!
^
what you quoted is the whole of /usr/local/share/X11/xorg.conf.d/5-monitor.conf ?
Tried deciphering man xrandr but it gets confusing how it lists options.
and then it lists
by calling it
seemingly they ensured how they set up the manpage primitive not translates into easy to understand. 
what you quoted is the whole of /usr/local/share/X11/xorg.conf.d/5-monitor.conf ?
Could you explain these?
Tried deciphering man xrandr but it gets confusing how it lists options.
Code: Select all
RandR version 1.1 options
These options are available for X servers supporting RandR version 1.1
or older. They are still valid for newer X servers, but they don't
interact sensibly with version 1.2 options on the same command line.
Code: Select all
RandR version 1.2 options
These options are only available for X server supporting RandR version
1.2 or newer.
RandR version 1.3 options
Options for RandR 1.3 are used as a superset of the options for RandR
1.2.
RandR version 1.4 options
Options for RandR 1.4 are used as a superset of the options for RandR
1.3.
RandR version 1.5 options
Options for RandR 1.5 are used as a superset of the options for RandR
1.4.
Code: Select all
xrandr - primitive command line interface to RandR extension

Cheers!
Yours Rava
Yours Rava
Cut your screen resolution exactly in half!
Oh sure. You can do it on a temporary / per session basis rather than putting into an xorg config file.
But it takes THREE steps. Four if you havent done the cvt calculation first.
1) Tell the system about the NEWMODE existence
2) Add that new mode to the system
3) Choose the new mode, and switch the output to it.
In my case of desiring to cut a native 1920x1080 exactly in half to 960x540 (from my previously calculated modeline with cvt):
If one is using a graphical utility, like LXrandr, then once you do the first two commandline steps, you can now be pleasantly surprised at finding your newly added mode in the drop down menu you can now switch to rather than having to execute that last line.
I suppose it might be possible to make this some sort of script, rather than editing an xorg config file, or doing it by hand all the time.
But it takes THREE steps. Four if you havent done the cvt calculation first.
1) Tell the system about the NEWMODE existence
2) Add that new mode to the system
3) Choose the new mode, and switch the output to it.
In my case of desiring to cut a native 1920x1080 exactly in half to 960x540 (from my previously calculated modeline with cvt):
Code: Select all
xrandr --newmode "960x540" 40.75 960 992 1088 1216 540 543 548 562 -Hsync +Vsync
xrandr --addmode HDMI-1 "960x540"
xrandr --output HDMI-1 --mode "960x540"
I suppose it might be possible to make this some sort of script, rather than editing an xorg config file, or doing it by hand all the time.
That's a UNIX book - cool. -Garth
Cut your screen resolution exactly in half!
For most, this is probably unnecessary, but maybe just a neat hack for those doing presentations on huge high-resolution screens, OR for those that may be running a window manager environment rather than a DE desktop environment, and just can't see the menus!
Like perhaps Fluxbox, Openbox or others that are either too much of a pain in the butt to configure, or the configuration tool has not been compiled in etc etc. Changing your res is about the only choice, and if your resolution is high enough not to blow your eyes out when you cut the res in half - might make for a pleasurable environment.
Like perhaps Fluxbox, Openbox or others that are either too much of a pain in the butt to configure, or the configuration tool has not been compiled in etc etc. Changing your res is about the only choice, and if your resolution is high enough not to blow your eyes out when you cut the res in half - might make for a pleasurable environment.
That's a UNIX book - cool. -Garth
- Rava
- Contributor
- Posts: 5424
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Cut your screen resolution exactly in half!
Easily done. Just put a
Code: Select all
#!/bin/sh
First make sure your HDMI (or probably VGA) output is HDMI-1 - in my case it is HDMI-0 - but on rare occasions - I never figured out why - it is HDMI-1 on the very same machine.
I presume getting back to the standard full HD resolution is just this then:
Code: Select all
xrandr --output HDMI-0 --mode "1920x1080"
If that's the case the script only needs its first two lines and I can use the XFCE display setting to switch - unless I want it via *.desktop file as well. (That .dektop would not work if the script not got started first, of course)
I created me already three of these for full-HD left, right and normal orientation since my monitor can be turned by 90° and it is quicker to go to the main menu / settings / select orientation than to go into XFCE's display settings and do it there.

Currently I am on my single-core 3.1kernel 4.0i586 Porteus again without any external monitor to it (it only has VGA anyway) so I cannot test it right away, but I will as soon as I switch machines. And then [ArnieVoice] I'll be back [/ArnieVoice] and report on it.

Not only that, but on a 16/9 aspect monitor you can look for other smaller resolutions that work okay on your monitor, not just the half x / half y one that is "960x540".
Could be your native supported modes not have other common 16/9 resolutions, e.g. common ones for video resolutions like
1280x720
1024x576
800x450
640x360

The worst that could happen is a messed up screen. But when your desktop only has the XTerm open and you created yourself a script for resetting to a known working resolution, even they you could execute that script blindly and be back in a working environment.
Make sure to switch to another known to work resolution first (e.g. one that is natively supported by your monitor) and test the restore-resolution-script so that you know how to be able to recover - and that your restore-resolution-script is coded flawlessly.

Even when you use changes and your settings got auto-saved, and you not manage to execute the restore-resolution-script and have to reboot, by using a script solution the theoretically messed-up resolution would not be supported in the anew started Porteus since you would have to manually execute the script introducing the setting to the system, so by default the Porteus DE should revert to one of the standard working resolutions instead.
At least I think so.

Cheers!
Yours Rava
Yours Rava
Cut your screen resolution exactly in half!
Rava you made me laugh - I'm thinking of changing the motd to the /arnievoice/ .
He was also my governor for awhile.
Thinking of having my Porteus start up like Knoppix with the voice. But my favorite if the system has an error notification would be:
/arnievoice/ Get in the chopper!


Thinking of having my Porteus start up like Knoppix with the voice. But my favorite if the system has an error notification would be:
/arnievoice/ Get in the chopper!

That's a UNIX book - cool. -Garth
Cut your screen resolution exactly in half!
Indeed. Beware of mixing resolutions with unsupported frequency modes from your monitor vendor.
Great stuff!
> Does not compute_ 
https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=102066#p102066
https://forum.porteus.org/viewtopic.php?p=102306#p102306
https://forum.porteus.org/viewtopic.php?p=72741#p72741

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=102066#p102066
https://forum.porteus.org/viewtopic.php?p=102306#p102306
https://forum.porteus.org/viewtopic.php?p=72741#p72741
- Rava
- Contributor
- Posts: 5424
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Cut your screen resolution exactly in half!
Is there a /arnievoice/ generator?
Like vocaloid Hatsune Miku - only über manly instead of über girly.
Just imagine /arnievoice/ "All programs will be terminated"
Better having a safe reset.
One could also code a
Code: Select all
sleep 10
If the tested resolution works just delete those lines.
Cheers!
Yours Rava
Yours Rava
- Rava
- Contributor
- Posts: 5424
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Cut your screen resolution exactly in half!
I tried it with mode "1280x720" but failed:
HDMI-0 is the correct identifier as you can see by my working turn by 90° .desktop:
Code: Select all
guest@porteus:/$ cvt 1280 720 60
# 1280x720 59.86 Hz (CVT 0.92M9) hsync: 44.77 kHz; pclk: 74.50 MHz
Modeline "1280x720_60.00" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync
guest@porteus:/$ xrandr --newmode "1280x720" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync
guest@porteus:/$ xrandr --addmode HDMI-0 "1280x720"
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 139 (RANDR)
Minor opcode of failed request: 18 (RRAddOutputMode)
Serial number of failed request: 27
Current serial number in output stream: 28
Code: Select all
guest@porteus:/$ grep xran /usr/share/applications/monitorrotate-left.desktop
Exec=/usr/bin/xrandr --output HDMI-0 --rotate left
Cheers!
Yours Rava
Yours Rava
- Rava
- Contributor
- Posts: 5424
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Cut your screen resolution exactly in half!
Neither does 960x540
Maybe it's because I use the nvidia-340.108-k.5.4.30 module and the NV driver rejects the xrandr --addmode ?
Code: Select all
guest@porteus:/$ cvt 960 540 60
# 960x540 59.63 Hz (CVT 0.52M9) hsync: 33.51 kHz; pclk: 40.75 MHz
Modeline "960x540_60.00" 40.75 960 992 1088 1216 540 543 548 562 -hsync +vsync
guest@porteus:/$ xrandr --newmode "960x540" 40.75 960 992 1088 1216 540 543 548 562 -hsync +vsync
guest@porteus:/$ xrandr --addmode HDMI-0 "960x540"
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 139 (RANDR)
Minor opcode of failed request: 18 (RRAddOutputMode)
Serial number of failed request: 27
Current serial number in output stream: 28
Cheers!
Yours Rava
Yours Rava
Cut your screen resolution exactly in half!
Before I tried this, I wondered too, but when it worked, all I could think of is that this sage advice was a left-over from the glass crt days.
But I'm not a heavy hardware guy. The only thing I can think of at this point, is that all the boxes I have are using Intel video hardware. And this has only been tried on my 22-inch HP monitor. Lucky combination?
My thought is that for those where this doesn't work, it may be a driver issue, or perhaps differences in monitors that are hard-coded to NOT let any non-standard "supported resolutions" work. Driver? Monitor?
That's a UNIX book - cool. -Garth
- Rava
- Contributor
- Posts: 5424
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Cut your screen resolution exactly in half!
Good question, when I do a test run with a different kernel where no nvidia native driver exists, and I recall during that test this very thread, I could do a "Cut your screen resolution exactly in half!" test that not works with my current GPU and monitor using the native NV driver… then we know if using the generic non native display driver makes a difference.
Still, if so, I still prefer the native nvidia driver + supported kernel version combo.
Cheers!
Yours Rava
Yours Rava
Cut your screen resolution exactly in half!
You are right. This is probably a thing of the past.
The times I have tried (using live CD's) changing the resolution on other computers, it has simply turned the screen black at worst. Back in the days of CRTs (it's been a couple of years since I've seen them around), the sum of incorrect resolution + unsupported scan rate would damage the monitor.
> Does not compute_ 
https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=102066#p102066
https://forum.porteus.org/viewtopic.php?p=102306#p102306
https://forum.porteus.org/viewtopic.php?p=72741#p72741

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=102066#p102066
https://forum.porteus.org/viewtopic.php?p=102306#p102306
https://forum.porteus.org/viewtopic.php?p=72741#p72741