Hyprland.conf changing on it's own?

I’m a long time arch/hyprland user and I decided to give the Garuda hyprland spin a try to see if might resolve some issues I’ve been having with gamescope. Things have been going smoothly except for the fact that each time I reboot the monitor section of my hyprland.conf gets reset from:

monitor= DP-2, 2560x1440, 0x0, 1
monitor= HDMI-A-1, 2560x1440@144, 2560x0, 1
monitor= DP-1, 2560x1440, 5120x0, 1

To:

monitor= HDMI-A-1, [email protected], 2560x0, 1.00
monitor= HDMI-A-1, [email protected], 2560x0, 1.00
monitor= HDMI-A-1, [email protected], 2560x0, 1.00

The fact that this setting is being changed but my other changes are preserved adds further confusion to why this is happening. I’ve never experienced something like this on Arch. Does anyone know why this is happening/how to prevent it?

System:
  Kernel: 6.5.9-zen2-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=929f184a-eeb9-4865-a7fc-c2a63ab33cfd rw rootflags=subvol=@
    quiet resume=UUID=d3328d0e-696b-4452-9367-b728161f8552 loglevel=3 ibt=off
    nvidia_drm.modeset=1
  Desktop: Hyprland info: waybar vt: 1 dm: SDDM Distro: Garuda Linux
    base: Arch Linux
Machine:
  Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required>
  Mobo: ASUSTeK model: TUF GAMING Z690-PLUS WIFI D4 v: Rev 1.xx
    serial: <superuser required> UEFI: American Megatrends v: 1720
    date: 08/12/2022
Battery:
  Device-1: wacom_battery_0 model: Wacom Intuos BT M serial: N/A charge: 100%
    status: discharging
CPU:
  Info: model: 12th Gen Intel Core i7-12700K bits: 64 type: MST AMCP
    arch: Alder Lake gen: core 12 level: v3 note: check built: 2021+
    process: Intel 7 (10nm ESF) family: 6 model-id: 0x97 (151) stepping: 2
    microcode: 0x2E
  Topology: cpus: 1x cores: 12 mt: 8 tpc: 2 st: 4 threads: 20 smt: enabled
    cache: L1: 1024 KiB desc: d-4x32 KiB, 8x48 KiB; i-8x32 KiB, 4x64 KiB
    L2: 12 MiB desc: 8x1.2 MiB, 1x2 MiB L3: 25 MiB desc: 1x25 MiB
  Speed (MHz): avg: 864 high: 2096 min/max: 800/4900:5000:3800 scaling:
    driver: intel_pstate governor: performance cores: 1: 800 2: 801 3: 800
    4: 800 5: 801 6: 800 7: 798 8: 800 9: 800 10: 800 11: 797 12: 2096 13: 801
    14: 800 15: 800 16: 800 17: 801 18: 800 19: 800 20: 800 bogomips: 144383
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: NVIDIA AD102 [GeForce RTX 4090] vendor: Micro-Star MSI
    driver: nvidia v: 535.113.01 alternate: nouveau,nvidia_drm non-free: 535.xx+
    status: current (as of 2023-09) arch: Lovelace code: AD1xx
    process: TSMC n4 (5nm) built: 2022-23+ pcie: gen: 4 speed: 16 GT/s
    lanes: 16 ports: active: none off: DP-1,DP-2,HDMI-A-1 empty: DP-3
    bus-ID: 01:00.0 chip-ID: 10de:2684 class-ID: 0300
  Device-2: ASUSTek [] driver: uvcvideo type: USB rev: 2.0 speed: 480 Mb/s
    lanes: 1 mode: 2.0 bus-ID: 1-3.1:5 chip-ID: 0b05:9d08 class-ID: 0e02
    serial: <filter>
  Display: wayland server: X.org v: 1.21.1.9 with: Xwayland v: 23.2.2
    compositor: Hyprland driver: X: loaded: nvidia unloaded: modesetting
    alternate: fbdev,nouveau,nv,vesa gpu: nvidia,nvidia-nvswitch
    d-rect: 7680x1440 display-ID: 1
  Monitor-1: DP-1 pos: center model: 27E6QC serial: <filter> built: 2022
    res: 2560x1440 hz: 60 dpi: 108 gamma: 1.2 scale: 1
    size: 597x336mm (23.5x13.23") diag: 685mm (27") ratio: 16:9 modes:
    max: 2560x1440 min: 640x480
  Monitor-2: DP-2 pos: right model: 27E6QC serial: <filter> built: 2022
    res: 2560x1440 hz: 60 dpi: 108 gamma: 1.2 scale: 1
    size: 597x336mm (23.5x13.23") diag: 685mm (27") ratio: 16:9 modes:
    max: 2560x1440 min: 640x480
  Monitor-3: HDMI-A-1 pos: left model: AOC Q27G3G3R3 serial: <filter>
    built: 2022 res: 2560x1440 hz: 144 dpi: 109 gamma: 1.2 scale: 1
    size: 597x336mm (23.5x13.23") diag: 685mm (27") ratio: 16:9 modes:
    max: 2560x1440 min: 640x480
  API: EGL v: 1.5 hw: drv: nvidia platforms: gbm: drv: nvidia
  API: OpenGL v: 4.6.0 vendor: nvidia v: 535.113.01 glx-v: 1.4
    direct-render: yes renderer: NVIDIA GeForce RTX 4090/PCIe/SSE2
    memory: 23.43 GiB
  API: Vulkan v: 1.3.269 layers: 5 device: 0 type: discrete-gpu
    name: NVIDIA GeForce RTX 4090 driver: nvidia v: 535.113.01
    device-ID: 10de:2684 surfaces: xcb,xlib,wayland
Audio:
  Device-1: Intel Alder Lake-S HD Audio vendor: ASUSTeK driver: snd_hda_intel
    v: kernel alternate: snd_sof_pci_intel_tgl bus-ID: 00:1f.3
    chip-ID: 8086:7ad0 class-ID: 0403
  Device-2: NVIDIA AD102 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:22ba class-ID: 0403
  Device-3: ASUSTek [] driver: snd-usb-audio type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-3.2:7 chip-ID: 0b05:9d09
    class-ID: 0102
  Device-4: Razer USA RZ19-0229 Gaming Microphone
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 mode: 1.1 bus-ID: 1-6.3:15 chip-ID: 1532:0511 class-ID: 0300
    serial: <filter>
  Device-5: Corsair [] driver: hid-generic,snd-usb-audio,usbhid type: USB
    rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-6.4:17
    chip-ID: 1b1c:0a4d class-ID: 0300 serial: <filter>
  API: ALSA v: k6.5.9-zen2-1-zen status: kernel-api with: aoss
    type: oss-emulator tools: N/A
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 0.3.83 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: Intel Alder Lake-S PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:7af0 class-ID: 0280
  IF: wlo1 state: down mac: <filter>
  Device-2: Intel Ethernet I225-V vendor: ASUSTeK driver: igc v: kernel
    pcie: gen: 2 speed: 5 GT/s lanes: 1 port: N/A bus-ID: 05:00.0
    chip-ID: 8086:15f3 class-ID: 0200
  IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-14:18 chip-ID: 8087:0026
    class-ID: e001
  Report: btmgmt ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 5.2
    lmp-v: 11 status: discoverable: no pairing: no class-ID: 6c0104
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
    v: 0.6 port: N/A bus-ID: 00:0e.0 chip-ID: 8086:467f rev: class-ID: 0104
Drives:
  Local Storage: total: 3.67 TiB used: 40.49 GiB (1.1%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 870 QVO 2TB
    size: 1.82 TiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 1B6Q scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD 850 EVO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 1B6Q scheme: GPT
  ID-3: /dev/sdc maj-min: 8:32 vendor: Western Digital
    model: WD10EARS-00Y5B1 size: 931.51 GiB block-size: physical: 4096 B
    logical: 512 B speed: 3.0 Gb/s tech: N/A serial: <filter> fw-rev: 0A80
    scheme: MBR
  ID-4: /dev/sdd maj-min: 8:48 vendor: SanDisk model: Cruzer Glide
    size: 28.67 GiB block-size: physical: 512 B logical: 512 B type: USB
    rev: 2.0 spd: 480 Mb/s lanes: 1 mode: 2.0 tech: N/A serial: <filter>
    fw-rev: 1.00 scheme: MBR
Partition:
  ID-1: / raw-size: 914.24 GiB size: 914.24 GiB (100.00%)
    used: 40.49 GiB (4.4%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 576 KiB (0.2%) fs: vfat dev: /dev/sdb1 maj-min: 8:17
  ID-3: /home raw-size: 914.24 GiB size: 914.24 GiB (100.00%)
    used: 40.49 GiB (4.4%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
  ID-4: /var/log raw-size: 914.24 GiB size: 914.24 GiB (100.00%)
    used: 40.49 GiB (4.4%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
  ID-5: /var/tmp raw-size: 914.24 GiB size: 914.24 GiB (100.00%)
    used: 40.49 GiB (4.4%) 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: 15.43 GiB used: 0 KiB (0.0%) priority: 100
    comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 20 dev: /dev/zram0
  ID-2: swap-2 type: partition size: 16.97 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/sdb3 maj-min: 8:19
Sensors:
  System Temperatures: cpu: 24.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Processes: 365 Uptime: 1h 12m wakeups: 1 Memory: total: 16 GiB
  available: 15.43 GiB used: 4.92 GiB (31.9%) Init: systemd v: 254
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 Packages:
  pm: pacman pkgs: 1335 libs: 386 tools: paru Shell: fish v: 3.6.1
  running-in: alacritty inxi: 3.3.30
Garuda (2.6.17-1):
  System install date:     2023-11-24
  Last full system update: 2023-11-24
  Is partially upgraded:   Yes
  Relevant software:       snapper NetworkManager dracut nvidia-dkms
  Windows dual boot:       No/Undetected
  Failed units:

In your hyprland.conf search for mon.sh and comment out or delete that line. Save it and then make your changes.

4 Likes

Sure enough, that seemed to be the issue. Thanks!

Nope, no issue it’s a service :smiley:

# Set monitor values. For own values, please comment with #
exec-once = .local/bin/mon.sh

Maybe I must add an out? :eyes: :thinking:

If you want it to run once and then never again, you can move the exec-once line out of the main config to a drop-in config, then change the script so it will run, then delete the config and delete itself.

Here is an example of what this looks like:

This script launches a notification after the first boot, then deletes itself and deletes the drop-in config.

There are probably other ways to accomplish something like this, and maybe even more practical ones, but self-destructing like a Mission Impossible message is probably the coolest way. :sunglasses:

3 Likes

Yeah, or the Advanced User(s Only) just read. :sunglasses: :dark_sunglasses:

Automatically comment out after first run? :eyes:

:roll_eyes: I guess so–obviously it will not be as dramatic. :stuck_out_tongue_winking_eye:

Maybe add something like this to the end of the script:

sed -i "s|exec-once = .local/bin/mon.sh|#exec-once = .local/bin/mon.sh|" $HOME/.config/hypr/hyprland.conf

I have not tested, but seems like it should work. :crossed_fingers:

1 Like

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