Cannot open display

i am having issues related to wayland .
i getting

Authorization required, but no authorization protocol specified


(gpartedbin:22892): Gtk-WARNING **: 18:41:44.344: cannot open display: :1

i had looked many solution
tried

xhost +localhost
export DISPLAY=:1

still not working …no idea how can i solve it

System:
  Kernel: 6.6.8-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: hpet available: acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=ce8cb111-0aaa-4c0b-b7c1-37e33145c99f rw rootflags=subvol=@
    quiet resume=UUID=c588b309-0574-4273-8a49-2eed23613fe5 loglevel=3 ibt=off
  Desktop: Hyprland vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82RN v: IdeaPad 3 15ABA7
    serial: <superuser required> Chassis: type: 10 v: IdeaPad 3 15ABA7
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0T76463WIN
    serial: <superuser required> UEFI: LENOVO v: JTCN42WW date: 01/10/2023
Battery:
  ID-1: BAT0 charge: 24.4 Wh (72.8%) condition: 33.5/38.0 Wh (88.2%)
    power: 8.0 W volts: 7.9 min: 7.7 model: BYD L20B2PF0 type: Li-poly
    serial: <filter> status: discharging cycles: 476
CPU:
  Info: model: AMD Ryzen 5 5625U with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 3 gen: 4 level: v3 note: check built: 2021-22
    process: TSMC n7 (7nm) family: 0x19 (25) model-id: 0x50 (80) stepping: 0
    microcode: 0xA50000C
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 1014 high: 1894 min/max: 400/4388 scaling:
    driver: amd-pstate-epp governor: powersave cores: 1: 400 2: 1397 3: 1894
    4: 1730 5: 400 6: 1871 7: 1428 8: 400 9: 1449 10: 400 11: 400 12: 400
    bogomips: 55097
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities: <filter>
Graphics:
  Device-1: AMD Barcelo vendor: Lenovo driver: amdgpu v: kernel arch: GCN-5
    code: Vega process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s ports: active: eDP-1
    empty: DP-1,HDMI-A-1 bus-ID: 04:00.0 chip-ID: 1002:15e7 class-ID: 0300
    temp: 37.0 C
  Device-2: Syntek Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-3:2 chip-ID: 174f:2465
    class-ID: fe01 serial: <filter>
  Display: wayland server: X.org v: 1.21.1.10 with: Xwayland v: 23.2.3
    compositor: Hyprland driver: X: loaded: amdgpu unloaded: modesetting
    alternate: fbdev,vesa dri: radeonsi gpu: amdgpu display-ID: 1
  Monitor-1: eDP-1 model: ChiMei InnoLux 0x151e built: 2019 res: 1920x1080
    hz: 60 dpi: 142 gamma: 1.2 scale: 1 size: 344x193mm (13.54x7.6")
    diag: 394mm (15.5") ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: Vulkan v: 1.3.274 layers: 3 device: 0 type: integrated-gpu name: AMD
    Radeon Graphics (RADV RENOIR) driver: mesa radv v: 23.3.1-arch1.1
    device-ID: 1002:15e7 surfaces: xcb,xlib,wayland device: 1 type: cpu
    name: llvmpipe (LLVM 16.0.6 256 bits) driver: mesa llvmpipe
    v: 23.3.1-arch1.1 (LLVM 16.0.6) device-ID: 10005:0000
    surfaces: xcb,xlib,wayland
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.1 chip-ID: 1002:1637
    class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo driver: N/A
    alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x,
    snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps, snd_sof_amd_renoir,
    snd_sof_amd_rembrandt, snd_sof_amd_vangogh pcie: gen: 3 speed: 8 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.5
    chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s bus-ID: 04:00.6 chip-ID: 1022:15e3 class-ID: 0403
  API: ALSA v: k6.6.8-zen1-1-zen status: kernel-api tools: N/A
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse
    status: off 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8852BE PCIe 802.11ax Wireless Network vendor: Lenovo
    driver: rtw89_8852be v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: 2000 bus-ID: 02:00.0 chip-ID: 10ec:b852 class-ID: 0280
  IF: wlp2s0 state: up mac: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio driver: btusb v: 0.8 type: USB rev: 1.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-4:3 chip-ID: 0bda:4853
    class-ID: e001 serial: <filter>
  Report: btmgmt ID: hci0 rfk-id: 2 state: down bt-service: disabled
    rfk-block: hardware: no software: no address: N/A
Drives:
  Local Storage: total: 476.94 GiB used: 152.09 GiB (31.9%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Intel model: SSDPEKNW512GZL
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: C01C temp: 22.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 266.48 GiB size: 266.48 GiB (100.00%)
    used: 152.09 GiB (57.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 584 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 266.48 GiB size: 266.48 GiB (100.00%)
    used: 152.09 GiB (57.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 266.48 GiB size: 266.48 GiB (100.00%)
    used: 152.09 GiB (57.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 266.48 GiB size: 266.48 GiB (100.00%)
    used: 152.09 GiB (57.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 13.5 GiB used: 0 KiB (0.0%) priority: 100
    comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 12 dev: /dev/zram0
  ID-2: swap-2 type: partition size: 14.85 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
  System Temperatures: cpu: 38.9 C mobo: N/A gpu: amdgpu temp: 38.0 C
  Fan Speeds (rpm): N/A
Info:
  Processes: 311 Uptime: 18m wakeups: 0 Memory: total: 16 GiB note: est.
  available: 13.5 GiB used: 2.86 GiB (21.2%) Init: systemd v: 255
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 clang: 16.0.6
  Packages: pm: pacman pkgs: 1777 libs: 453 tools: paru,yay pm: flatpak
  pkgs: 0 Shell: fish v: 3.6.4 running-in: tmux: inxi: 3.3.31
Garuda (2.6.22-1):
  System install date:     2023-11-28
  Last full system update: 2023-12-28
  Is partially upgraded:   No

The error message tells you that gparted is looking for an X display but Garuda Hyprland uses wayland.
Does gparted have an API to Xwayland? I do not know. The Garuda-Hyprland-Gang should know this better than me.
If gparted not support wayland, use parted (w/o the “g”) in the terminal or try a partition manager that works natively under Wayland, for example gnome-disk-utility or kde partitionmanager.

Here, it seems that installing xorg-xhost solved it

But from this, I assume it was already installed (maybe reinstall it).

Did you retry gparted after that?

2 Likes

not working


~
❯ xhost +localhost
localhost being added to access control list

~
❯ sudo gparted
Authorization required, but no authorization protocol specified


(gpartedbin:179719): Gtk-WARNING **: 21:10:21.811: cannot open display: :1

and done re-installing also

just now tried kde partitionmanager working perfectly . i don’t see any way to solve issues for gparted

ohh i got it . we should not use sudo … i remove sudo and polkit ask for password when i enter its work

It seems your environment is not set up right. Are you logging in with the “Garuda Hyprland” session?

Does this run?

sudo -E gparted
2 Likes

yeah its work …
does i need to put -E option if i got same issues on other application ??

No, it’s best to not run applications that way. It does suggest something needed in your user environment is not being carried over when you run something with root.

yeah logging with the garuda hyprland

Can you test if this runs?

/usr/lib/garuda/pkexec-gui gparted

i got this

==== AUTHENTICATING FOR org.garuda.libs.pkexec-gui.pkexec.policy.run ====
Authentication is required to run a GUI program as root.
Authenticating as: sanbi
Password:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ====
Error executing command as another user: Not authorized

This incident has been reported.

one question might be stupid what difference between normal hyprland(session) and garuda-hyprland(session) ?? kind a confuse which one to use ?

Hmm, something is messed up with your setup. Do you have this line in your config somewhere?

exec-once =/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1

One launches Hyprland with a wrapper script which sets some needed environment variables. If I recall correctly, it was necessary to make a separate desktop file that launches the session with the wrapper script because the “normal” one is overwritten every time Hyprland gets updated.

2 Likes

yeah i had on my hyprland config should i remove it ??

ohh by default garuda had polkit setup ?

by removing it is working that

    /usr/lib/garuda/pkexec-gui gparted

opened gparted app

Make sure you have done the following before you post:

Issue still unresolved? Then:

  • ONE issue per topic.

It should be in there by default. The latest version has it here: etc/skel/.config/hypr/settings/manual_settings.conf · main · Garuda Linux 🦅 / Themes and Settings / Settings / Garuda Hyprland Settings · GitLab

Did you have it in there twice? Maybe one of them was typo’d?

2 Likes

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