After reboot need to change resolution on 2nd screen

After Garuda Linux installation I have used the envycontrol script to set graphics mode to nvidia. So far all good :slight_smile:

After any reboot the second screen resolution changes to 1024768 which force me to change the resolution (after xrandr --newmode and xrandr --addmode) to 16501050 (the desired resolution would be 1920*1080 which works fine on windows but for now I’m not being able to change it. Will seek for assistance in another thread).

I’m using KDE Plasma with X11 by default.

garuda-inxi
System:
Kernel: 6.7.4-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
clocksource: tsc avail: hpet,acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=04478c3c-0fa9-4a92-b503-abfe5f4ee946 rw rootflags=subvol=@
quiet loglevel=3 ibt=off
Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.12 info: frameworks
v: 5.115.0 wm: kwin_x11 vt: 2 dm: SDDM Distro: Garuda base: Arch Linux
Machine:
Type: Laptop System: ASUSTeK product: X550JX v: 1.0
serial: <superuser required>
Mobo: ASUSTeK model: X550JX v: 1.0 serial: <superuser required>
part-nu: ASUS-NotebookSKU uuid: <superuser required>
UEFI: American Megatrends v: X550JX.204 date: 05/07/2015
CPU:
Info: model: Intel Core i7-4720HQ bits: 64 type: MT MCP arch: Haswell
gen: core 4 level: v3 note: check built: 2013-15 process: Intel 22nm
family: 6 model-id: 0x3C (60) stepping: 3 microcode: 0x28
Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
L3: 6 MiB desc: 1x6 MiB
Speed (MHz): avg: 3348 high: 3600 min/max: 800/3600 scaling:
driver: intel_cpufreq governor: performance cores: 1: 2594 2: 3600 3: 3600
4: 2594 5: 3600 6: 3600 7: 3600 8: 3600 bogomips: 41504
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Graphics:
Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: ASUSTeK
driver: i915 v: kernel arch: Gen-7.5 process: Intel 22nm built: 2013 ports:
active: VGA-1 off: eDP-1 empty: HDMI-A-1 bus-ID: 00:02.0
chip-ID: 8086:0416 class-ID: 0300
Device-2: NVIDIA GM107M [GeForce GTX 950M] vendor: ASUSTeK driver: nvidia
v: 545.29.06 alternate: nouveau,nvidia_drm non-free: 545.xx+ status: current
(as of 2024-02; EOL~2026-12-xx) arch: Maxwell code: GMxxx
process: TSMC 28nm built: 2014-2019 pcie: gen: 3 speed: 8 GT/s lanes: 8
link-max: lanes: 16 bus-ID: 01:00.0 chip-ID: 10de:139a class-ID: 0302
Device-3: Realtek USB Camera driver: uvcvideo type: USB rev: 2.0
speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-7:5 chip-ID: 0bda:57b4
class-ID: 0e02 serial: <filter>
Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.4
compositor: kwin_x11 driver: X: loaded: modesetting,nvidia dri: crocus
gpu: i915 display-ID: :0 screens: 1
Screen-1: 0 s-res: 1680x1050 s-dpi: 75 s-size: 569x355mm (22.40x13.98")
s-diag: 671mm (26.4")
Monitor-1: VGA-1 mapped: VGA-1-1 pos: primary res: 1680x1050 hz: 60
size: N/A modes: max: 1024x768 min: 640x480
Monitor-2: eDP-1 mapped: eDP-1-1 note: disabled model: AU Optronics 0x36ed
built: 2013 res: 1680x1050 dpi: 142 gamma: 1.2 size: 344x193mm (13.54x7.6")
diag: 394mm (15.5") ratio: 16:9 modes: 1920x1080
API: EGL v: 1.5 hw: drv: intel crocus drv: nvidia platforms: device: 0
drv: nvidia device: 2 drv: crocus device: 3 drv: swrast gbm: drv: nvidia
surfaceless: drv: nvidia x11: drv: nvidia inactive: wayland,device-1
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 545.29.06
glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce GTX 950M/PCIe/SSE2
memory: 1.95 GiB
API: Vulkan v: 1.3.276 layers: 14 device: 0 type: integrated-gpu
name: Intel HD Graphics 4600 (HSW GT2) driver: mesa intel v: 23.3.5-arch1.1
device-ID: 8086:0416 surfaces: xcb,xlib device: 1 type: discrete-gpu
name: NVIDIA GeForce GTX 950M driver: nvidia v: 545.29.06
device-ID: 10de:139a surfaces: xcb,xlib device: 2 type: cpu name: llvmpipe
(LLVM 16.0.6 256 bits) driver: mesa llvmpipe v: 23.3.5-arch1.1 (LLVM
16.0.6) device-ID: 10005:0000 surfaces: xcb,xlib
Audio:
Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio
driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:0c0c
class-ID: 0403
Device-2: Intel 8 Series/C220 Series High Definition Audio
vendor: ASUSTeK 8 driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
chip-ID: 8086:8c20 class-ID: 0403
API: ALSA v: k6.7.4-zen1-1-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: PipeWire v: 1.0.3 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter
vendor: AzureWave driver: ath9k v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 bus-ID: 03:00.0 chip-ID: 168c:0036 class-ID: 0280
IF: wlp3s0 state: down mac: <filter>
Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
vendor: ASUSTeK RTL8111/8168/8411 driver: r8169 v: kernel pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 04:00.1 chip-ID: 10ec:8168
class-ID: 0200
IF: enp4s0f1 state: down mac: <filter>
Device-3: ASIX AX88179 Gigabit Ethernet driver: ax88179_178a type: USB
rev: 3.0 speed: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 bus-ID: 2-2:3
chip-ID: 0b95:1790 class-ID: ff00 serial: <filter>
IF: enp0s20u2 state: up speed: 1000 Mbps duplex: full mac: <filter>
Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Bluetooth:
Device-1: IMC Networks driver: btusb v: 0.8 type: USB rev: 1.1
speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-5:7 chip-ID: 13d3:3408
class-ID: e001
Report: btmgmt ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 4.1
lmp-v: 7 status: discoverable: no pairing: no class-ID: 6c010c
Drives:
Local Storage: total: 335.36 GiB used: 28.99 GiB (8.6%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 model: SATAFIRM S11 size: 111.79 GiB
block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s tech: SSD
serial: <filter> fw-rev: 21W0
ID-2: /dev/sdb maj-min: 8:16 vendor: Kingston model: SA400S37240G
size: 223.57 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
tech: SSD serial: <filter> fw-rev: 0000 scheme: GPT
Partition:
ID-1: / raw-size: 223.27 GiB size: 223.27 GiB (100.00%)
used: 28.99 GiB (13.0%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 584 KiB (0.2%) fs: vfat dev: /dev/sdb1 maj-min: 8:17
ID-3: /home raw-size: 223.27 GiB size: 223.27 GiB (100.00%)
used: 28.99 GiB (13.0%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
ID-4: /var/log raw-size: 223.27 GiB size: 223.27 GiB (100.00%)
used: 28.99 GiB (13.0%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
ID-5: /var/tmp raw-size: 223.27 GiB size: 223.27 GiB (100.00%)
used: 28.99 GiB (13.0%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 11.57 GiB used: 4 MiB (0.0%) priority: 100
comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 8 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 62.0 C mobo: N/A gpu: nvidia temp: 58 C
Fan Speeds (rpm): cpu: 2900
Info:
Memory: total: 12 GiB available: 11.57 GiB used: 3.87 GiB (33.4%)
Processes: 290 Power: uptime: 6m states: freeze,mem,disk suspend: deep
avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
suspend, test_resume image: 4.58 GiB services: org_kde_powerdevil,
power-profiles-daemon, upowerd Init: systemd v: 255 default: graphical
tool: systemctl
Packages: pm: pacman pkgs: 1827 libs: 541 tools: octopi,paru Compilers:
gcc: 13.2.1 Shell: garuda-inxi default: fish v: 3.7.0 running-in: konsole
inxi: 3.3.33
Garuda (2.6.23-1):
System install date:     2024-02-13
Last full system update: 2024-02-13
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut nvidia-dkms
Windows dual boot:       No/Undetected
Failed units:

Any idea on how to solve this permanently ? Ty in advanced :slight_smile:

Use arandr, save the config/.sh file and make autostart for this script.

3 Likes

Hello @SGS and Thank You so much for the fast reply :grin:

That’s a great workaround but for some reason isn’t working.
If I run the script I get the following error: xrandr: cannot find mode 1680x1050_60.00

Like I previous said, I need to manually add xrandr --newmode and xrandr --addmode each time I reboot computer**. If i don’t I just have 4 resolutions available (1024x768 / 800x600 / 848x480 / 640x480).

After I add new resolution (1680x1050) and run systemctl status my-startup.service I get the error Can’t open display.

I have try to insert the xrandr --newmode and xrandr --addmode into the script but I get the same error: Can’t open display

At least, now I have a script which I can run and change resolution (Ty @SGS besides the help I had to learn how to run scripts on startup which I didn’t knew :wink:

Any clue how to set resolution automatically ? Once again Thank you :slight_smile:

xrandr
Screen 0: minimum 320 x 200, current 2880 x 1800, maximum 16384 x 16384
eDP connected primary 2880x1800+0+0 (normal left inverted right x axis y axis) 302mm x 188mm
   2880x1800     90.00*+
   1920x1200     90.00  
   1920x1080     90.00  
   1600x1200     90.00  
   1680x1050     90.00  
   1280x1024     90.00  
   1440x900      90.00  
   1280x800      90.00  
   1280x720      90.00  
   1024x768      90.00  
   800x600       90.00  
   640x480       90.00  
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 disconnected (normal left inverted right x axis y axis)

I dont use second monitor.
Check min and max size, maybe you must add to the xrandr script the --addmode too.

.screenlayout/your.sh

#!/bin/sh
xrandr --addmode your settings
xrandr --output eDP --primary --mode 2880x1800_90.00 --pos 0x0 --rotate normal --output DisplayPort-0 --off --output DisplayPort-1 --off

Maybe --newmode too? :slight_smile: IDK :wink:

Hello @SGS once again Thank you for reply.

I have try to insert the xrandr --newmode and xrandr --addmode into the script but I get the same error: Can’t open display

#!/bin/sh
xrandr --newmode "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync

xrandr --addmode VGA-1-1 "1680x1050_60.00"

xrandr --output eDP-1-1 --off --output VGA-1-1 --primary --mode 1680x1050_60.00 --pos 0x0 --rotate normal --output HDMI-1-1 --off

Ty so much :slight_smile: I will keep searching for an answer for this issue.

Please post the log from

And please do not ping me or mod’s with @ unless it’s a matter of life or death.
Anyone who has written something in a topic automatically gets a message, and I read everything that is posted here anyway. Thanks :slight_smile:

xrandr --newmode VGA-1-1 "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync

Maybe you must set newmode to the screen VGA-1-1

xrandr after boot:
Screen 0: minimum 8 x 8, current 1024 x 768, maximum 16384 x 16384
eDP-1-1 connected (normal left inverted right x axis y axis)
1920x1080     60.05 +  60.01    59.97    59.96    59.93
1680x1050     59.95    59.88
1400x1050     59.98
1600x900      59.99    59.94    59.95    59.82
1280x1024     60.02
1400x900      59.96    59.88
1280x960      60.00
1440x810      60.00    59.97
1368x768      59.88    59.85
1280x800      59.99    59.97    59.81    59.91
1280x720      60.00    59.99    59.86    59.74
1024x768      60.04    60.00
960x720       60.00
928x696       60.05
896x672       60.01
1024x576      59.95    59.96    59.90    59.82
960x600       59.93    60.00
960x540       59.96    59.99    59.63    59.82
800x600       60.00    60.32    56.25
840x525       60.01    59.88
864x486       59.92    59.57
700x525       59.98
800x450       59.95    59.82
640x512       60.02
700x450       59.96    59.88
640x480       60.00    59.94
720x405       59.51    58.99
684x384       59.88    59.85
640x400       59.88    59.98
640x360       59.86    59.83    59.84    59.32
512x384       60.00
512x288       60.00    59.92
480x270       59.63    59.82
400x300       60.32    56.34
432x243       59.92    59.57
320x240       60.05
360x202       59.51    59.13
320x180       59.84    59.32
VGA-1-1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768      60.00*
800x600       60.32    56.25
848x480       60.00
640x480       59.94
HDMI-1-1 disconnected (normal left inverted right x axis y axis)```
xrandr after adding randr --newmode and xrandr --addmode:
Screen 0: minimum 8 x 8, current 1680 x 1050, maximum 16384 x 16384
eDP-1-1 connected (normal left inverted right x axis y axis)
1920x1080     60.05 +  60.01    59.97    59.96    59.93
1680x1050     59.95    59.88
1400x1050     59.98
1600x900      59.99    59.94    59.95    59.82
1280x1024     60.02
1400x900      59.96    59.88
1280x960      60.00
1440x810      60.00    59.97
1368x768      59.88    59.85
1280x800      59.99    59.97    59.81    59.91
1280x720      60.00    59.99    59.86    59.74
1024x768      60.04    60.00
960x720       60.00
928x696       60.05
896x672       60.01
1024x576      59.95    59.96    59.90    59.82
960x600       59.93    60.00
960x540       59.96    59.99    59.63    59.82
800x600       60.00    60.32    56.25
840x525       60.01    59.88
864x486       59.92    59.57
700x525       59.98
800x450       59.95    59.82
640x512       60.02
700x450       59.96    59.88
640x480       60.00    59.94
720x405       59.51    58.99
684x384       59.88    59.85
640x400       59.88    59.98
640x360       59.86    59.83    59.84    59.32
512x384       60.00
512x288       60.00    59.92
480x270       59.63    59.82
400x300       60.32    56.34
432x243       59.92    59.57
320x240       60.05
360x202       59.51    59.13
320x180       59.84    59.32
VGA-1-1 connected primary 1680x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768      60.00
800x600       60.32    56.25
848x480       60.00
640x480       59.94
1680x1050_60.00  59.95*
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
1680x1050_60.00 (0x278) 146.250MHz -HSync +VSync
h: width  1680 start 1784 end 1960 total 2240 skew    0 clock  65.29KHz
v: height 1050 start 1053 end 1059 total 1089           clock  59.95Hz

Sorry for the ping’s I was just trying to … insert your name lol

Maybe you must set newmode to the screen VGA-1-1 >

I’am.

xrandr --newmode "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync

xrandr --addmode VGA-1-1 "1680x1050_60.00"

If it manually works it must work in a script too, but IDK the syntax and I am not a programmer.
So, just wait for help from other users. :slight_smile:
Until that, search for xrandr/randr/arandr manuals and read, if you haven’t done so already.

1 Like

Solved.
Added script to Kde Startup. All good :slight_smile: Once again TY for all support :slight_smile:

1 Like

Thats what i said :slight_smile:

So, we always mark the solution and not the implementation.

2 Likes

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