Set monitor dpi (NOT font and icon size) in Cinnamon

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
gwi
Level 2
Level 2
Posts: 97
Joined: Mon Jun 04, 2012 4:20 pm

Set monitor dpi (NOT font and icon size) in Cinnamon

Post by gwi »

Hello,

How can I set my monitor's dpi value in Cinnamon? My monitor has 109 dpi (27" 2560 x 1440). When viewing documents at 100% (in Writer or Evince for example) they are shown too small. The size of fonts and icons in the userinterface is fine.

User interface scaling only shows the options Normal, Auto (which looks the same as Normal), and HiDPI (which is way too big).
How can I set the dpi value to 109?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Regards,

George

Linux Mint 21.2 Victoria Cinnamon 64-bit, Asus Vanguard B85, Intel Core i7 4770S
User avatar
Moem
Level 22
Level 22
Posts: 16226
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by Moem »

I assume you've tried menu=>preferences=>display?
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
gwi
Level 2
Level 2
Posts: 97
Joined: Mon Jun 04, 2012 4:20 pm

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by gwi »

Yes, but there I can only set the screen resolution, but that is already set to the monitor's native resolution (2560 x 1440).
The only other option there is rotation.
There is no possibility to set the DPI value.
Regards,

George

Linux Mint 21.2 Victoria Cinnamon 64-bit, Asus Vanguard B85, Intel Core i7 4770S
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by roblm »

gwi wrote:When viewing documents at 100% (in Writer or Evince for example) they are shown too small.
Have you tried this for LibreOffice Writer. Go to Tools > Options > View and increase the value under Scaling.

After opening a document with Evince, you can press Ctrl+Plus-Key.

You can also install dconf-editor with this command in the Terminal:

Code: Select all

sudo apt install dconf-editor
Open the program in the Menu > Administration and go to org > cinnamon > desktop > interface.
Change the value of text-scaling-factor. You must click just to the right of the value twice.
gwi
Level 2
Level 2
Posts: 97
Joined: Mon Jun 04, 2012 4:20 pm

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by gwi »

I know Ctrl-Plus, it is setting the zoom factor. That is not what I am looking for. What I want is select zoom 100%, and then have the document displayed at its actual size. Ctrl-Plus and Ctrl-Minus in Evince zoom in and out, but don't give me a 114% zoom that is required to view a document at its actual size. I would have to type that value every time I view a document.

At work I have to use Windows 10. There I can set the DPI to 109 (same monitor size and resolution as at home). No matter what application I use, 100% is actual size. I can hold a sheet of A4 size paper in front of the monitor, and the displayed document has the exact same size. It works in Word, print preview in whatever application I use.

Now at home I want to achieve the same in Linux Mint Cinnamon.
I am NOT looking for text scaling. I now how I can do that, but that is not the question here. As mentioned in my start post, font and icon size are fine.

Setting the scaling in LibreOffice Writer to 114% (109 DPI is 114% of the default 96 DPI) results in correct display of a document at 100% zoom.
But it should not be set in every individual application. The monitor DPI value is a hardware property, that should be handled at a global, desktop environment level. Setting that would an effect for every application. I mentioned Writer and Evince just as an example.

Looking at the response I received so far, I am beginning to think that Cinnamon unfortunately does not offer such an option.
Regards,

George

Linux Mint 21.2 Victoria Cinnamon 64-bit, Asus Vanguard B85, Intel Core i7 4770S
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by roblm »

Changing the text-scaling-factor value in dconf-editor will have a more global effect. It did affect Evince and Writer, so you may want to do some testing with it.

The X Config option DisplaySize x y, when added to the xorg.conf file, is supposed to be used to calculate the DPI, using the open-source graphics drivers. This info is from this web page:
http://manpages.ubuntu.com/manpages/tru ... onf.5.html
DisplaySize width height
This optional entry gives the width and height, in millimetres,
of the picture area of the monitor. If given this is used to
calculate the horizontal and vertical pitch (DPI) of the screen.
I used this command to check the DPI on my 24 inch screen with a 16:9 aspect ratio:

Code: Select all

xdpyinfo | grep -B2 resolution
The output is:

Code: Select all

Screen #0:
    dimensions:    1920x1080 pixels  (508x285 millimeters)
    resolution:      96x96 dots per inch
Then I attempted to change the DPI by adding the line DisplaySize 447 251 to a basic custom xorg.conf file, which should set the DPI to 109x109:

Code: Select all

Section "ServerLayout"         
   Identifier   "Layout0"		 
   Screen   0 "Screen0" 0 0  
EndSection

Section "Monitor"		
   Identifier    "Monitor0"
   Option  DisplaySize 447 251
EndSection 

Section "Device"
   Identifier   "Device0"
   Driver   "nouveau"   	
EndSection

Section "Screen"                                     
   Identifier   "Screen0"	   
   Device    "Device0"	       
   Monitor   "Monitor0"		
   DefaultDepth   24
EndSection
However, after logging out and back in, there appears to be no change and the output of the xdpyinfo command is the same.

With the Nvidia driver, there is an X Config option line, Option "DPI" "109 x 109", but when used in the xorg.conf file, there again appears to be no change.

If I use this command to set the DPI: xrandr --dpi 109, the xdpyinfo command shows the change but there is no visible screen change.

The DPI value of 96x96 appears to be fixed. Even on my 19 inch screen with a 5:4 aspect ratio, the DPI is the same.

Mint KDE has a Force fonts DPI setting but I don't know what total effect that has since I've never used KDE.
gwi
Level 2
Level 2
Posts: 97
Joined: Mon Jun 04, 2012 4:20 pm

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by gwi »

I tried the text-scaling-factor in dconf-editor. I only saw an effect in Writer, not in Evince.
Based on the description the scaling-factor would come close, but unfortunately that only accepts integers. (The description of the text-scaling-factor says the same, but it does accept fractions.)

Anyway, thanks for your effortss.
Regards,

George

Linux Mint 21.2 Victoria Cinnamon 64-bit, Asus Vanguard B85, Intel Core i7 4770S
rostek
Level 1
Level 1
Posts: 8
Joined: Fri Sep 20, 2019 4:32 pm

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by rostek »

Indeed there is no possible to change DPI on Linux mint.

All these methods failed.

I'm also looking for solution, however till now I found nothing.

It's really strange, because even Windows POwer Shell has such option:

-------------------------------------------------------------------------------------------------------
cd 'HKCU:\Control Panel\Desktop'
$val = Get-ItemProperty -Path . -Name "LogPixels"

Write-Host 'Change to 125% / 120 dpi'
Set-ItemProperty -Path . -Name LogPixels -Value 120

logoff;exit
-------------------------------------------------------------------------------------------------------

I need equivalent script in LInux as I can't watch at this huge icons and text on my desktop :-(

REgards
User avatar
trytip
Level 14
Level 14
Posts: 5371
Joined: Tue Jul 05, 2016 1:20 pm

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by trytip »

gwi wrote: Sun Jul 24, 2016 4:04 am User interface scaling only shows the options Normal, Auto (which looks the same as Normal), and HiDPI (which is way too big).
How can I set the dpi value to 109?
where is that? i don't have HiDPI. what do you have for font selection?

Image

you can also have scale factor for google chrome browser if you use it:

Code: Select all

firejail google-chrome-stable --ignore-gpu-blacklist --enable-native-gpu-memory-buffers --enable-gpu-rasterization --password-store=basic --force-device-scale-factor=1.3
Image
gwi
Level 2
Level 2
Posts: 97
Joined: Mon Jun 04, 2012 4:20 pm

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by gwi »

System Settings -> Preferences -> General
Regards,

George

Linux Mint 21.2 Victoria Cinnamon 64-bit, Asus Vanguard B85, Intel Core i7 4770S
User avatar
trytip
Level 14
Level 14
Posts: 5371
Joined: Tue Jul 05, 2016 1:20 pm

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by trytip »

gwi wrote: Wed Nov 20, 2019 3:06 pm System Settings -> Preferences -> General
:shock: how silly of my trying to find display options in display settings. and a powerful option like vsync is in general purpose? what do the methods mean for vsync? just thinking out loud
When viewing documents at 100% (in Writer or Evince for example) they are shown too small. The size of fonts and icons in the userinterface is fine.
you say they are too small but they are fine. if i don't see a picture or explain specifically what and where do you mean, hard to know what you see on your screen.
Image
gwi
Level 2
Level 2
Posts: 97
Joined: Mon Jun 04, 2012 4:20 pm

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by gwi »

I made a photo of my monitor, showing a document in LibreOffice Write, at 100%. Display scaling is set to Normal.
The paper size in Writer is set to A4, which is 21 cm wide and 29,7 cm high. (Sorry for the quality, I had to scale down a lot to be able to add it as an attachment.)
normal-dpi.jpg
As you can see by the ruler I kept in front of the monitor, the page is shown as 18,5 cm, where it should have been 21 cm.
With display scaling set to Auto, the result is exactly the same as with Normal. With display scaling set to Double (Hi-DPI) everything is blown up to 200% (menu's, icons, etc.) and the page is shown with a width of 37 cm (18,5 cm x 2).

So I would like to be able to set display scaling with a percentage by entering a number (like 114%), not by choosing an option like 100%, 125%, 150%.
With 114% 18,5 becomes 21,09. Being able to use decimals would even be better, since 21 is 113,5% of 18,5.
Regards,

George

Linux Mint 21.2 Victoria Cinnamon 64-bit, Asus Vanguard B85, Intel Core i7 4770S
yooyo

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by yooyo »

Im using desktop setup with 27"(2560x1440) and 24" (1920x1080) Dell screens. With 100% scaling UI on 24" screen is bigger than on 27" screen.
In order to make UI elements same physical size on both screens Im usging xrandr hack with specific scaling. Check this link:

https://blog.summercat.com/configuring- ... randr.html

I did some math and found how much I have to set smaller screen scaling to match bigger screen. In my case I need to reduce scaling on smaler screen. Is it possible to add scaling less than 100%... ex. 82.35%

After xrandr trick fonts on smaller screen is slightly blurry but UI elements and windows size perfectly match on both screens.

Upcoming release will support scaling per monitor.. It would be nice to have scaling less than 100% and to choose any float number between 30% and 200%.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11145
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by AZgl1800 »

roblm wrote: Mon Jul 25, 2016 9:37 am
gwi wrote:When viewing documents at 100% (in Writer or Evince for example) they are shown too small.
Have you tried this for LibreOffice Writer. Go to Tools > Options > View and increase the value under Scaling.
I have a 17" laptop, and am experiencing the same problem as the OP is.
No matter the document, the fonts are so damn small, I can't read them.

Here in Firefox, I am using 210% zoom just so I can read this forum.

In LibreOffice Writer, there is no such option as "Scaling", so where did you find it?
when I create a document in LO Writer, I have to set the font size to 18 or 24, and then before I send the completed document to someone, I have to reset 'ALL' to 12....
and that destroys the formatting that I used.


No Scaling.png
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by roblm »

Screenshot from 2020-02-19 08-50-57.png
gwi
Level 2
Level 2
Posts: 97
Joined: Mon Jun 04, 2012 4:20 pm

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by gwi »

What version LibreOffice is that? I don't have the User interface - Scaling option (version 6.0.7.3).

Besides, I want a solution that is working for every application, not just in LibreOffice. As said before, the current solution is far too coarse, with fixed options like 100%, 125%, 150%. If it can be done in Windows, why not in Cinnamon?
Regards,

George

Linux Mint 21.2 Victoria Cinnamon 64-bit, Asus Vanguard B85, Intel Core i7 4770S
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by roblm »

gwi wrote:What version LibreOffice is that? I don't have the User interface - Scaling option (version 6.0.7.3).
I'm using Mint 18.3 with LibreOffice version 5.1.6.2.
User avatar
JerryF
Level 16
Level 16
Posts: 6554
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by JerryF »

rostek wrote: Wed Nov 20, 2019 10:41 am Indeed there is no possible to change DPI on Linux mint.

All these methods failed.

I'm also looking for solution, however till now I found nothing.

It's really strange, because even Windows POwer Shell has such option:

-------------------------------------------------------------------------------------------------------
cd 'HKCU:\Control Panel\Desktop'
$val = Get-ItemProperty -Path . -Name "LogPixels"

Write-Host 'Change to 125% / 120 dpi'
Set-ItemProperty -Path . -Name LogPixels -Value 120

logoff;exit
-------------------------------------------------------------------------------------------------------

I need equivalent script in LInux as I can't watch at this huge icons and text on my desktop :-(

REgards
Please don't hijack someone else's thread. It's not polite and against forum rules. :wink:
User avatar
AZgl1800
Level 20
Level 20
Posts: 11145
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by AZgl1800 »

roblm wrote: Wed Feb 19, 2020 3:57 pm
gwi wrote:What version LibreOffice is that? I don't have the User interface - Scaling option (version 6.0.7.3).
I'm using Mint 18.3 with LibreOffice version 5.1.6.2.
Apparently the newer version Version: 6.0.7.3, has removed scaling


LO Scaling.png
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
wraith3690
Level 1
Level 1
Posts: 3
Joined: Mon Jul 21, 2014 10:00 am

Re: Set monitor dpi (NOT font and icon size) in Cinnamon

Post by wraith3690 »

go to menu then control centre then under look and feel select appearance then go to fonts tab and select the details button and the dpi setting is in there
Locked

Return to “Graphics Cards & Monitors”