LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-06-2013, 01:20 AM   #1
michaelslack
Member
 
Registered: Feb 2013
Location: Sydney
Distribution: slackware
Posts: 83

Rep: Reputation: 34
How to ensure xfce can detect/adapt to different DPIs?


Dear slackers,

I am running slackware64-current on a samsung smart pc pro. It has a very high-resolution but not-too-large native display. I usually use it at work connected to a much bigger monitor. I have been using it either big-monitor-only (while at work) or small-native-display-only (when elsewhere).

The thing is, the dots-per-inch (DPI) of the native display works out at a very high 191. Out-of-the-box xfce, for this machine anyway, does not seem to be aware of the DPI, but going into Settings -> Appearance -> Fonts one can enter a Custom DPI setting, and everything is fine.

However if I connect the external monitor, the fonts are now way too big, so I have to go back and change the Custom DPI setting back to something less to get things sensible. I can disable the custom DPI setting and fonts on the external monitor are a reasonable size. But if I switch back to the native display I need to switch on the custom DPI again. It appears that the system has difficulty detecting the DPI of the native display.

I thought maybe that xrandr could fix it.

When I boot the machine with the external display connected, once xfce starts up the native display is dark, only the external monitor is showing the desktop. Running an xrandr query returns:


Code:
$ xrandr -q
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 8192 x 8192
eDP1 connected (normal left inverted right x axis y axis)
   1920x1080      60.0 +
   1400x1050      60.0  
   1280x1024      60.0  
   1280x960       60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200      60.0*+
   1920x1080      50.0     60.0  
   1600x1200      60.0  
   1680x1050      59.9  
   1280x1024      60.0  
   1440x900       59.9  
   1280x960       60.0  
   1280x800       59.9  
   1280x720       50.0     60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   720x576        50.0  
   720x480        59.9  
   640x480        60.0  
DP1 disconnected (normal left inverted right x axis y axis)
Note that it is aware of the physical size of the external (HDMI1) monitor, but not the native display (eDP1).


Now, I executed various xrandr commands, as you see below, and then ran another query.
The commands only differ in that
  • for the first one I passed the parameter --auto to the native display
  • for the second I passed --auto and --dpi 191 and
  • for the third I only passed --dpi 191

Code:
$ xrandr --output HDMI1 --auto --rotate normal --pos 0x0 --output eDP1 --auto  --below HDMI1
$ xrandr --output HDMI1 --auto --rotate normal --pos 0x0 --output eDP1 --auto  --below HDMI1 --dpi 191
$ xrandr --output HDMI1 --auto --rotate normal --pos 0x0 --output eDP1 --dpi 191  --below HDMI1          
$ xrandr -q
Screen 0: minimum 320 x 200, current 1920 x 2280, maximum 8192 x 8192
eDP1 connected 1920x1080+0+1200 (normal left inverted right x axis y axis) 256mm x 144mm
   1920x1080      60.0*+
   1400x1050      60.0  
   1280x1024      60.0  
   1280x960       60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200      60.0*+
   1920x1080      50.0     60.0  
   1600x1200      60.0  
   1680x1050      59.9  
   1280x1024      60.0  
   1440x900       59.9  
   1280x960       60.0  
   1280x800       59.9  
   1280x720       50.0     60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   720x576        50.0  
   720x480        59.9  
   640x480        60.0  
DP1 disconnected (normal left inverted right x axis y axis)
Notice that now for the native (eDPI) display it has physical dimensions in the query output, which it didn't initially. However it still does not fix the problem. Whether I have two displays or just the native display, the native display's DPI remains unknown to the system until I enter a Custom DPI setting via the xfce settings menu as described above.

Does anyone know what is going on here? I guess a workaround would be to use xrandr --scale <<something>> (this enlarges windows/fonts but not things like the mouse pointer) but it would be better if the system could just tell in some other way what the DPI of the native display was. It may not be possible with this version of xfce to have two monitors with (very) different DPIs, it could be a ``global desktop setting''? If so that's ok, I am happy to just use one at a time -- only without having to manually change the DPI each time! I don't know if this is actually slackware-specific -- it might not be, but I would nonetheless like to see if any other slackers have some idea what to do.

I guess there might be machine-specific info you need, I'm sorry I don't know what that would be; just let me know and I'll post it.

Many thanks,

Michael
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xfce can't detect second display jmvankeuren Linux - Newbie 14 07-24-2012 12:40 PM
Wish to adapt existing keyboard driver to create new one RevClifford Linux - Laptop and Netbook 1 01-07-2009 04:52 PM
novatel merlin PCMCIA adapt XCA 3 joel2001k Linux - Hardware 0 09-26-2007 01:50 PM
Slower to adapt to technology? Clark Bent General 3 07-26-2004 11:56 PM
How do I make a C program adapt to both Windows and Linux? natalinasmpf Programming 15 03-25-2004 11:15 PM


All times are GMT -5. The time now is 09:48 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration