guake icon indicating copy to clipboard operation
guake copied to clipboard

Window blurry under Wayland and with fractional scaling

Open rmeissn opened this issue 2 years ago • 3 comments

Describe the bug

The guake window is blurry on a hiDPI Display with fractional scaling under Gnome/Wayland, scaled to 150%.

When starting guake in wayland mode - wanted to test whether it behaves better - it won't start and errors with:

Guake not running, starting it
Loading Gnome schema from: /home/.../.local/lib/python3.12/site-packages/guake/data
Language previously loaded from: /home/.../.local/lib/python3.12/site-packages/guake/po
Guake Terminal 3.10
VTE 0.74.2
Gtk 3.24.39

(guake:236630): Gtk-CRITICAL **: 11:17:19.627: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
created fresh notebook for workspace 0
Spawning new terminal at /home/...
current workspace is 0
can't bind show-focus key
Traceback (most recent call last):
  File "/usr/lib64/python3.12/site-packages/dbus/bus.py", line 173, in activate_name_owner
    return self.get_name_owner(bus_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/dbus/bus.py", line 348, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/dbus/connection.py", line 634, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: The name does not have an owner

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/.../.local/lib/python3.12/site-packages/guake/main.py", line 479, in main
    remote_object = bus.get_object(DBUS_NAME, DBUS_PATH)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/dbus/bus.py", line 237, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/dbus/bus.py", line 178, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib64/python3.12/site-packages/dbus/bus.py", line 273, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/dbus/connection.py", line 634, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/.../.local/bin/guake", line 8, in <module>
    sys.exit(exec_main())
             ^^^^^^^^^^^
  File "/home/.../.local/lib/python3.12/site-packages/guake/main.py", line 664, in exec_main
    if not main():
           ^^^^^^
  File "/home/.../.local/lib/python3.12/site-packages/guake/main.py", line 495, in main
    instance = Guake()
               ^^^^^^^
  File "/home/.../.local/lib/python3.12/site-packages/guake/guake_app.py", line 262, in __init__
    self.load_config()
  File "/home/.../.local/lib/python3.12/site-packages/guake/guake_app.py", line 817, in load_config
    self.settings.general.triggerOnChangedValue(
  File "/home/.../.local/lib/python3.12/site-packages/guake/settings.py", line 119, in triggerOnChangedValue
    func(settings, key, user_data)
  File "/home/.../.local/lib/python3.12/site-packages/guake/gsettings.py", line 157, in size_changed
    RectCalculator.set_final_window_rect(self.settings, self.guake.window)
  File "/home/.../.local/lib/python3.12/site-packages/guake/utils.py", line 275, in set_final_window_rect
    window_rect = monitor.get_workarea()
                  ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_workarea'

Expected behavior

The guake windows is crisp and sharp, just like most other applications on a hiDPI Display with fractional scaling under Gnome/Wayland, scaled to 150%.

To Reproduce

  1. start gnome/wayland
  2. enable fractional scaling and scale to 150%
  3. install latest guake from pypi
  4. open guake and print some directories (to have some text visible)

X11:

$ guake --support

Guake Version: 3.10

Vte Version: 0.74.2

Vte Runtime Version: 0.74.2


GTK+ Version: 3.24.39

GDK Backend: <GdkX11.X11Display


Desktop Session: gnome


Display: :0

RGBA visual: True

Composited: True

  • Monitor: 0 - eDP-1
    • Geometry: 1503 x 1002 at 0, 0
    • Size: 280 x 190 mm²
    • Primary: True
    • Refresh rate: 59.854 Hz
    • Subpixel layout: unknown

Wayland:

$ guake --support

Guake Version: 3.10

Vte Version: 0.74.2

Vte Runtime Version: 0.74.2


GTK+ Version: 3.24.39

GDK Backend: <gi.GdkWaylandDisplay


Desktop Session: gnome


Display: wayland-0

RGBA visual: True

Composited: True

  • Monitor: 0 - BOE 0x095f
    • Geometry: 1503 x 1002 % 2 at 0, 0
    • Size: 280 x 190 mm²
    • Primary: False
    • Refresh rate: 59.998000000000005 Hz
    • Subpixel layout: unknown

rmeissn avatar Jan 04 '24 10:01 rmeissn

+1

elektronik2k5 avatar Oct 03 '24 08:10 elektronik2k5

The core problem, here, is that the codepath to detect the primary monitor is broken under Wayland, and under XWayland you don't get fractional scaling.

As a workaround, if you open guake under Xwayland (i.e. GUAKE_ENABLE_WAYLAND unset or set to 0), then in the Main Window settings set it to open on a specific monitor (i.e. not the primary), then terminate guake and restart with GUAKE_ENABLE_WAYLAND set, then it should work.

fancypantalons avatar Oct 30 '24 19:10 fancypantalons

+1

jodusan avatar Jun 16 '25 19:06 jodusan