Alacritty doesn't work with multi-monitor at different refresh rate

Alacritty doesn't open when you have multi-monitors that uses different refresh rates
I have 1 monitor which is 4k 60hz and another monitor which is 1440p 170hz

This is on a fresh install of Garuda (Gaming edition)

if I set my 1440p monitor to 60hz, it works fine, but then you defeat the purpose of using a high refresh rate monitor

other things I've tried was changing the kernal to linux and the driver to nvidia (I downloaded the package, but didn't see option to select in settings -> hardware config), was able to change kernal on startup, since it didn't let me in settings -> kernal

this had no effect.

This isn't really a huge issue, since I can just use another terminal emulator, or change refresh rate when I want to play games, but would be nice if I don't have to do that

when you run alacritty -vvv

[2021-10-09 13:44:51.788745833] [INFO ] [alacritty] Welcome to Alacritty
[2021-10-09 13:44:51.788781293] [INFO ] [alacritty] Configuration files loaded from:
"/home/ricky/.config/alacritty/alacritty.yml"
[2021-10-09 13:44:51.798472378] [TRACE] [crossfont] Number of fonts is 172
[2021-10-09 13:44:51.798493489] [TRACE] [crossfont] Got font path="/usr/share/fonts/TTF/Fantasque Sans Mono Regular Nerd Font Complete Mono.ttf", index=0
[2021-10-09 13:44:51.798532449] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Regular, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 }
[2021-10-09 13:44:51.864410433] [DEBUG] [alacritty] Estimated DPR: 508
[2021-10-09 13:44:51.864444774] [DEBUG] [alacritty] Estimated window size: Some(PhysicalSize { width: 420700, height: 243870 })
[2021-10-09 13:44:51.864451554] [DEBUG] [alacritty] Estimated cell size: 4207 x 8129
[2021-10-09 13:44:51.972933514] [ERROR] [alacritty] Alacritty encountered an unrecoverable error:

Error creating GL context; Received multiple errors. Errors: `[OsError("eglCreateWindowSurface failed"), OsError("Couldn't setup vsync: expected interval `1` but got `0`")]`
System:    Kernel: 5.14.9-arch2-1 x86_64 bits: 64 compiler: gcc v: 11.1.0 
           parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux root=UUID=fe6de904-bcf1-4ad1-bee4-b5bb4dbbac1b rw [email protected] 
           quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1 loglevel=3 
           Desktop: KDE Plasma 5.22.5 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux 
           base: Arch Linux 
Machine:   Type: Desktop Mobo: ASUSTeK model: TUF GAMING X570-PLUS (WI-FI) v: Rev X.0x serial: <filter> 
           UEFI: American Megatrends v: 3603 date: 03/20/2021 
CPU:       Info: 8-Core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP arch: Zen 2 family: 17 (23) model-id: 71 (113) 
           stepping: 0 microcode: 8701021 cache: L2: 4 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 115232 
           Speed: 4019 MHz min/max: 2200/3600 MHz boost: enabled Core speeds (MHz): 1: 4019 2: 3551 3: 3596 4: 3598 5: 3599 
           6: 3747 7: 3600 8: 3592 9: 3597 10: 3605 11: 3600 12: 3593 13: 3594 14: 3599 15: 3581 16: 3600 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: conditional, RSB filling 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: NVIDIA GP102 [GeForce GTX 1080 Ti] vendor: eVga.com. driver: nvidia v: 470.74 
           alternate: nouveau,nvidia_drm bus-ID: 09:00.0 chip-ID: 10de:1b06 class-ID: 0300 
           Device-2: Logitech HD Pro Webcam C920 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-3.4:9 chip-ID: 046d:082d 
           class-ID: 0102 serial: <filter> 
           Device-3: Oculus VR Rift CV1 Sensor type: USB driver: uvcvideo bus-ID: 5-3.3:5 chip-ID: 2833:0211 class-ID: ef00 
           serial: <filter> 
           Device-4: Oculus VR Rift CV1 Sensor type: USB driver: uvcvideo bus-ID: 6-1:2 chip-ID: 2833:0211 class-ID: ef00 
           serial: <filter> 
           Device-5: Oculus VR Rift CV1 Sensor type: USB driver: uvcvideo bus-ID: 6-4:4 chip-ID: 2833:0211 class-ID: ef00 
           serial: <filter> 
           Display: x11 server: X.Org 1.20.13 compositor: kwin_x11 driver: loaded: nvidia display-ID: :0 screens: 1 
           Screen-1: 0 s-res: 5120x1440 s-dpi: 104 s-size: 1250x342mm (49.2x13.5") s-diag: 1296mm (51") 
           Monitor-1: HDMI-0 res: 2560x1440 hz: 60 dpi: 105 size: 621x341mm (24.4x13.4") diag: 708mm (27.9") 
           Monitor-2: DP-4 res: 2560x1440 dpi: 65024 size: 1x1mm (0.0x0.0") diag: 1mm (0.1") 
           OpenGL: renderer: NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 470.74 direct render: Yes 
Audio:     Device-1: NVIDIA GP102 HDMI Audio vendor: eVga.com. driver: snd_hda_intel v: kernel bus-ID: 09:00.1 
           chip-ID: 10de:10ef class-ID: 0403 
           Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel 
           bus-ID: 0b:00.4 chip-ID: 1022:1487 class-ID: 0403 
           Device-3: Blue Microphones Yeti Stereo Microphone type: USB driver: hid-generic,snd-usb-audio,usbhid 
           bus-ID: 1-3.3:7 chip-ID: b58e:9e84 class-ID: 0300 serial: <filter> 
           Device-4: Logitech HD Pro Webcam C920 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-3.4:9 chip-ID: 046d:082d 
           class-ID: 0102 serial: <filter> 
           Device-5: Oculus VR Rift CV1 Audio type: USB driver: hid-generic,snd-usb-audio,usbhid bus-ID: 5-2.2:6 
           chip-ID: 2833:0330 class-ID: 0300 serial: <filter> 
           Sound Server-1: ALSA v: k5.14.9-arch2-1 running: yes 
           Sound Server-2: JACK v: 1.9.19 running: no 
           Sound Server-3: PulseAudio v: 15.0 running: no 
           Sound Server-4: PipeWire v: 0.3.38 running: yes 
Network:   Device-1: Intel Wireless-AC 9260 driver: iwlwifi v: kernel bus-ID: 04:00.0 chip-ID: 8086:2526 class-ID: 0280 
           IF: wlp4s0 state: down mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK driver: r8169 v: kernel port: f000 
           bus-ID: 05:00.0 chip-ID: 10ec:8168 class-ID: 0200 
           IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Bluetooth: Device-1: Intel Wireless-AC 9260 Bluetooth Adapter type: USB driver: btusb v: 0.8 bus-ID: 3-5:2 chip-ID: 8087:0025 
           class-ID: e001 
           Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter> 
Drives:    Local Storage: total: 7.79 TiB used: 18.63 GiB (0.2%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Sabrent model: Rocket 4.0 Plus size: 931.51 GiB block-size: 
           physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 type: SSD serial: <filter> rev: RKT4P1.2 temp: 35.9 C 
           scheme: GPT 
           ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST6000VN001-2BB186 size: 5.46 TiB block-size: physical: 4096 B 
           logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5425 serial: <filter> rev: SC60 scheme: GPT 
           ID-3: /dev/sdb maj-min: 8:16 vendor: Western Digital model: WDBNCE5000PNC-WRSN size: 465.76 GiB block-size: 
           physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 10WD scheme: GPT 
           ID-4: /dev/sdc maj-min: 8:32 vendor: Samsung model: SSD 860 EVO 1TB size: 931.51 GiB block-size: physical: 512 B 
           logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 3B6Q scheme: GPT 
           ID-5: /dev/sdd maj-min: 8:48 type: USB vendor: SanDisk model: Cruzer Glide size: 57.33 GiB block-size: 
           physical: 512 B logical: 512 B type: N/A serial: <filter> rev: 1.00 scheme: MBR 
           SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
Partition: ID-1: / raw-size: 256.49 GiB size: 256.49 GiB (100.00%) used: 18.63 GiB (7.3%) fs: btrfs dev: /dev/sdb1 
           maj-min: 8:17 
           ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%) used: 856 KiB (0.2%) fs: vfat dev: /dev/sdb2 maj-min: 8:18 
           ID-3: /home raw-size: 256.49 GiB size: 256.49 GiB (100.00%) used: 18.63 GiB (7.3%) fs: btrfs dev: /dev/sdb1 
           maj-min: 8:17 
           ID-4: /var/log raw-size: 256.49 GiB size: 256.49 GiB (100.00%) used: 18.63 GiB (7.3%) fs: btrfs dev: /dev/sdb1 
           maj-min: 8:17 
           ID-5: /var/tmp raw-size: 256.49 GiB size: 256.49 GiB (100.00%) used: 18.63 GiB (7.3%) fs: btrfs dev: /dev/sdb1 
           maj-min: 8:17 
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: zram size: 31.26 GiB used: 0 KiB (0.0%) priority: 100 dev: /dev/zram0 
Sensors:   System Temperatures: cpu: 38.2 C mobo: N/A gpu: nvidia temp: 59 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 23% 
Info:      Processes: 360 Uptime: 14m wakeups: 0 Memory: 31.26 GiB used: 3.39 GiB (10.9%) Init: systemd v: 249 tool: systemctl 
           Compilers: gcc: 11.1.0 clang: 12.0.1 Packages: pacman: 1698 lib: 503 Shell: fish v: 3.3.1 default: Bash v: 5.1.8 
           running-in: konsole inxi: 3.3.06 

Welcome :slight_smile:

Did you check

?

Maybe KDE bug? :wink:

I also tried in different DE/WM like AwesomeWM, same problem, this seems more of a xorg/driver issue (or glutin, which is what alacritty uses)

1 Like

You say it is multi monitor problem have you tried with a single monitor?

1 Like

yes, but it's nice having another monitor, it works fine if there's only 1 monitor, or if they're at the same refresh rate, the issue is when they're at different refresh rates

I know xorg/X11 does have issues with monitors being at different refresh rates for vsync, but it shouldn't be crashing applications, it should just be using whatever the lowest is, so in this case 60

I run 2 monitors at different refresh rates with no issue ?
Can you start it in terminal! what error do you get?

1 Like

This is from the original post.

1 Like

Sorry i saw that just trying to replicate :smiley:

I can't seem to replicate it either. Main monitor @ 165hz, secondary @ 60hz. No issues with alacritty when I change the main monitor's Hz to 144, 120 or 100. Or when I change the secondary monitor to 50.

1 Like

Just tested with single monitor, same error if at 170hz

Interestingly 120 and 165hz works, but not 144hz or 170hz https://streamable.com/h7nus9

EDIT:
also just tested to see what happens if I have my other monitor is plugged in, same thing as above.

the weird thing is the 165hz working.
120hz working would make some sense it's 60 * 2

1 Like