[Solved] How to force LightDM resolution?

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Gofer83
Level 1
Level 1
Posts: 36
Joined: Thu Feb 03, 2011 10:57 am

[Solved] How to force LightDM resolution?

Post by Gofer83 »

Hi,

how can I force Lightdm resolution in Mint 18.2 @ Cinnamon?
It starts in 1920x1080. Would like to have it in 3840x2160.
I have already removed MDM greeter but its folders and files are still present in the system under /etc/mdm. Is this correct?

For MDM resolution following always worked:

Code: Select all

sudo xed /etc/mdm/Init/Default 

Code: Select all

mode="$(xrandr -q|grep -A1 "HDMI-1 connected"| tail -1 |awk '{ print $1 }')" 
if [ -n "$mode" ]; then 
xrandr --output HDMI-1 --primary --mode 3840x2160 
fi 
Current xrandr output:

Code: Select all

Screen 0: minimum 8 x 8, current 3840 x 2160, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 1020mm x 570mm
   3840x2160     30.00 +  59.94*   50.00    29.97    25.00    23.98  
   4096x2160     59.94    50.00    29.97    25.00    24.00    23.98  
   1920x1080     60.00    59.94    50.00    29.97    25.00    23.97    60.00    50.04  
   1680x1050     59.95  
   1600x900      60.00  
   1440x900      59.89  
   1366x768      59.79  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94  
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
My system:
Kernel: 4.8.0-58-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.4.3 (Gtk 3.18.9)
Distro: Linux Mint 18.2 Sonya
CPU: Quad core Intel Core i7-6700K (-HT-MCP-) cache: 8192 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 32064
clock speeds: max: 4300 MHz 1: 838 MHz 2: 987 MHz 3: 2172 MHz 4: 1222 MHz 5: 1121 MHz 6: 1631 MHz
7: 1273 MHz 8: 1020 MHz
Card: NVIDIA Device 1b80 bus-ID: 01:00.0
Display Server: X.Org 1.18.4
driver: nvidia Resolution: 3840x2160@59.94hz
GLX Renderer: GeForce GTX 1080/PCIe/SSE2 GLX Version: 4.5.0 NVIDIA 381.22 Direct Rendering: Yes

SOLUTION FOUND:
1. Create a script (output section depends on how you connect your monitor - my was HDMI-1):

Code: Select all

#!/bin/bash
# Setting the correct resolution for LightDM Login Screen 
mode="$(xrandr -q|grep -A1 "HDMI-1 connected"| tail -1 |awk '{ print $1 }')" 
if [ -n "$mode" ]; then 
xrandr --output HDMI-1 --primary --mode 3840x2160 --rate 60
fi 
2. Make it executable with chmod a+x command (in my case it was):

Code: Select all

chmod a+x /usr/local/bin/lightdm_res
3. Add a line to the config file in /etc/lightdm/lightdm.conf.d/70-linuxmint.conf, so the lightdm calls it during startup:

Code: Select all

display-setup-script=/usr/local/bin/lightdm_res
This made my lightdm appear in UHD@60fps, but all was very small.
Setting the HiDPI support in Cinnamon settings->Login Window to ON brought the normal scaling back.
CASE CLOSED :D
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
SYSTEM: Linux Mint 20.2 x86_64 | KERNEL: 5.11.0-22-generic | GUI: Cinnamon 5.0.4 | CPU: i7-6700K @ 4.3Ghz | GPU: Asus GTX1080 Strix (nVidia Driver 465.27) | RAM: 64GB Gskill Trident Z | SSD: Sandisk 240GB | DISPLAY: 4K@60Hz
JosephM
Level 6
Level 6
Posts: 1463
Joined: Sun May 26, 2013 6:25 pm

Re: How to force LightDM resolution?

Post by JosephM »

In Cinnamon settings->Login Window there is a setting to enable HiDPI support. Does this not work for you? I don't have a HiDPI machine to test this currently.
When I give opinions, they are my own. Not necessarily those of any other Linux Mint developer or the Linux Mint project as a whole.
Redsandro
Level 4
Level 4
Posts: 201
Joined: Sun Jul 17, 2011 6:40 pm
Contact:

Re: [Solved] How to force LightDM resolution?

Post by Redsandro »

Gofer83 wrote: Setting the HiDPI support in Cinnamon settings->Login Window to ON brought the normal scaling back.
CASE CLOSED :D
I would really really like to know what file changes when you flip `HiDPI` support from `Auto` to `Enable`, so I can automate this.

Any clue?
🤘 Amp.lol. No bloat, just radio.
Ninite-killer. 1000+ packages.
Locked

Return to “Cinnamon”