Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reconfigure_screens config and functionality are buggy #4673

Open
2 tasks done
ervinpopescu opened this issue Jan 28, 2024 · 5 comments
Open
2 tasks done

reconfigure_screens config and functionality are buggy #4673

ervinpopescu opened this issue Jan 28, 2024 · 5 comments

Comments

@ervinpopescu
Copy link
Contributor

ervinpopescu commented Jan 28, 2024

Issue description

After a change was done to the screens configuration (monitor added and autorandr run), the following was the state:

screens_issue

This is probably related to the scale applied to the external monitors, as my laptop is HiDPI and the monitors are not.

After reloading the config, everything is configured correctly.

autorandr profile: https://termbin.com/167h

The number of No screen at target errors is 3 times less the number of times the actual screen_change hook is fired by the way, since I could see the config reloading 12 times, hook which for some reason also triggers the screens_reconfigured hook just twice, since I can see only 2 notifications.

Scratch that, the behavior is random, except for the No screen at target errors which seem to be 4 all the time.

Version

0.24.1.dev11+g00dcf122

Backend

X11 (default)

Config

reconfigure_screens = True

@hook.subscribe.screen_change
def reload(event):
    qtile.reload_config()

@hook.subscribe.screens_reconfigured
def change_wallpaper():
    send_notification("qtile", "screen change detected.")
    with open(os.path.expanduser("~/.local/share/wallpaper/log")) as f:
        path = f.readlines()[0].split(" ")[-1]
    subprocess.call(f"run_wall.sh {path} all".split())

Logs

2024-01-29 00:47:29,410 ERROR libqtile window.py:update_strut():L1637 No screen at target
2024-01-29 00:47:31,603 ERROR libqtile window.py:update_strut():L1637 No screen at target
2024-01-29 00:47:31,604 ERROR libqtile window.py:update_strut():L1637 No screen at target
2024-01-29 00:47:31,606 ERROR libqtile window.py:update_strut():L1637 No screen at target
2024-01-29 00:47:44,518 ERROR libqtile loop.py:_handle_exception():L62 Exception in event loop:
Traceback (most recent call last):
  File "/usr/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib/python3.11/site-packages/libqtile/core/manager.py", line 945, in f
    func(*args)
  File "/usr/lib/python3.11/site-packages/libqtile/widget/base.py", line 627, in draw
    self.drawer.clear(self.background or self.bar.background)
  File "/usr/lib/python3.11/site-packages/qtile_extras/widget/decorations.py", line 832, in new_clear
    self._pre_clear(colour)
  File "/usr/lib/python3.11/site-packages/libqtile/backend/base/drawer.py", line 307, in clear
    self.ctx.save()
    ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'save'
x144

Required

  • I have searched past issues to see if this bug has already been reported, and it hasn't been.
  • I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.
@elParaguayo
Copy link
Member

I agree it's buggy and will try to take a look.

I know there have been issues with autorandr before.

@ervinpopescu
Copy link
Contributor Author

Thanks! Let me know if and how I can help.

@elParaguayo
Copy link
Member

What's the actual issue shown in the screenshot? Is it the positioning of the screens?

I doubt the qtile-extras decoration issue is relevant here (I've seen it at other times too) but the lines above may be more interesting.

@ervinpopescu
Copy link
Contributor Author

ervinpopescu commented Jan 29, 2024

What's the actual issue shown in the screenshot? Is it the positioning of the screens?

Yes, Qtile does not seem to understand the different scale and positions the external monitors at half of their physical width. You can see the background behind which is correctly set using nitrogen in a custom script.

I doubt the qtile-extras decoration issue is relevant here (I've seen it at other times too) but the lines above may be more interesting.

Indeed, I am going to turn debug logging on and test again, in hopes of some more useful logs.

Copy link

This issue is stale because it has been open 90 days with no activity. Remove the status: stale label or comment, or this will be closed in 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants