Make resolution permanent

I can change my resolution using xrandr but where and what do I configure it to use the resolution at bootup?

I used xrandr --output HDMI2 --mode 1920x1080 to set the resolution.

Thank you. My settings are below:

inxi -FAZ --no-host
System:    Kernel: 5.8.6-1-MANJARO x86_64 bits: 64 Desktop: i3 4.18.2 Distro: Manjaro Linux 
Machine:   Type: Laptop Mobo: INTEL model: CRESCENTBAY serial: <superuser/root required> UEFI: American Megatrends v: 5.6.5 
           date: 08/29/2015 
CPU:       Topology: Dual Core model: Intel Core i7-4650U bits: 64 type: MT MCP L2 cache: 4096 KiB 
           Speed: 1696 MHz min/max: 800/3300 MHz Core speeds (MHz): 1: 1696 2: 1696 3: 1696 4: 1696 
Graphics:  Device-1: Intel Haswell-ULT Integrated Graphics driver: i915 v: kernel 
           Display: server: X.Org 1.20.8 driver: intel unloaded: modesetting s-res: 1920x1080 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 5000 (HSW GT3) v: 4.5 Mesa 20.1.7 
Audio:     Device-1: Intel Haswell-ULT HD Audio driver: snd_hda_intel 
           Device-2: Intel 8 Series HD Audio driver: snd_hda_intel 
           Sound Server: ALSA v: k5.8.6-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 
           IF: enp2s0 state: down mac: 00:e0:4c:68:86:74 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 
           IF: enp3s0 state: down mac: 00:e0:4c:68:86:75 
           Device-3: Intel Centrino Advanced-N 6235 driver: iwlwifi 
           IF: wlp4s0 state: up mac: b4:b6:76:8c:99:66 
Drives:    Local Storage: total: 1.05 TiB used: 9.53 GiB (0.9%) 
           ID-1: /dev/sda vendor: Kingfast model: N/A size: 119.24 GiB 
           ID-2: /dev/sdb vendor: Toshiba model: MQ04ABF100 size: 931.51 GiB 
           ID-3: /dev/sdc type: USB model: Mass Storage Device size: 7.40 GiB 
           ID-4: /dev/sdd type: USB vendor: Generic model: STORAGE size: 14.43 GiB 
Partition: ID-1: / size: 1.04 GiB used: 14.5 MiB (1.4%) fs: btrfs dev: /dev/sda3 
           ID-2: /boot size: 487.9 MiB used: 59.1 MiB (12.1%) fs: ext4 dev: /dev/sda2 
           ID-3: /home size: 70.00 GiB used: 1.11 GiB (1.6%) fs: btrfs dev: /dev/sda8 
           ID-4: /opt size: 2.05 GiB used: 163.8 MiB (7.8%) fs: btrfs dev: /dev/sda6 
           ID-5: /usr size: 22.00 GiB used: 6.03 GiB (27.4%) fs: btrfs dev: /dev/sda4 
           ID-6: /var size: 12.65 GiB used: 647.8 MiB (5.0%) fs: btrfs dev: /dev/sda9 
Swap:      Alert: No Swap data was found. 
Sensors:   System Temperatures: cpu: 44.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 345 Uptime: 1d 14h 38m Memory: 15.55 GiB used: 3.21 GiB (20.6%) Shell: Bash inxi: 3.1.05
1 Like

Most desktop environments can restore the previously set display configuration when you log in. Otherwise your option is to put that into a startup script or into the Xorg configuration.

1 Like

To make the screen resolution permanant I did the following :-

Query the screen details

xrandr --query

My output was

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
HDMI1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
   1920x1080     60.00*+  50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1280x800      59.91  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x576i      50.00  
   720x480       60.00    59.94  
   720x480i      60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Here there are three screen outputs HDMI1, HDMI2 and VIRTUAL1.

I want the connected screen which is HDMI1.

The resolution (mode) of HDMI1 is 1920x1080.

Modify the i3 configuration file:

~/.i3/config

exec xrandr --output HDMI1 --mode 1920x1080

Then I did a reboot (but you could probably just restart i3).
:tada:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.