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

Dunst does not update screen size when resolution changes #434

Open
josswright opened this issue Nov 7, 2017 · 24 comments
Open

Dunst does not update screen size when resolution changes #434

josswright opened this issue Nov 7, 2017 · 24 comments

Comments

@josswright
Copy link

I use dunst on a laptop where I often present on an external screen. When I do so, I tend to reduce my internal monitor resolution to match the external. (My internal monitor goes from 1920x1080 to, for example, 1024x768).

On reducing the screen resolution, dunst seems to display notifications correctly. When, however, I retun to the larger screen size, dunst notifications now appear in the correct location for the smaller screen. (So 1024x768 pixels into my 1920x1080 screen.)

For reference, I'm running this under i3, and changing resolution using xrandr directly.

Installation info

  • Version: Dunst - A customizable and lightweight notification-daemon 1.2.0 (2017-07-12)
  • Install type: Package
  • Distro and version: Arch Linux
@tsipinakis
Copy link
Member

tsipinakis commented Nov 8, 2017

Can you run xev -event randr, reproduce it and post the output? We might be looking for the wrong screen update event.

@tsipinakis
Copy link
Member

Ping @josswright

@josswright
Copy link
Author

Oh, sorry. I didn't see the reply. I'll upload the data later today when I'm connected to an external projector.

@josswright
Copy link
Author

Here's a dump, as requested. The steps were:

  1. Connect to external projector and enable. (xrandr --output DP1 --auto)
  2. Manually set internal monitor resolution to match external. (xrandr --output eDP1 --mode 1024x768)
  3. Disconnect external and disable. (xrandr --output DP1 --off)
  4. Reset internal resolution. (xrandr --output eDP1 --auto).

Tested, and the dunst notification appears 1024x768 pixels into my 1920x1080 internal monitor.

randr.log

@wavexx
Copy link
Contributor

wavexx commented Dec 21, 2017

I have the same issue. When disconnecting the external screen, thus reducing the overall geometry, the notification is still shown outside of the current screen boundaries [I'm on the current master branch].

I'm using notification-screen-follows-mouse, so it might be that the notification of pointer changing screen is never emitted? I manually invoke xrandr --auto when plugging/unplugging extra monitors.

@bebehei
Copy link
Member

bebehei commented Dec 21, 2017

@wavexx What does xrandr --version report? I can't reproduce it with my own system.

@josswright
Copy link
Author

josswright commented Dec 21, 2017

For me:

xrandr program version       1.5.0
Server reports RandR version 1.5

@bebehei
Copy link
Member

bebehei commented Dec 21, 2017

@josswright Thanks for the answer. Could you also please paste the systemctl status --user dunst.service output after reproducing this?

@wavexx
Copy link
Contributor

wavexx commented Dec 21, 2017 via email

@josswright
Copy link
Author

josswright commented Dec 21, 2017

I also don't run dunst through a systemd service -- I just spawn it manually. (Arch Linux.)

(Or, I should clarify, through my .xinitrc.)

@bebehei
Copy link
Member

bebehei commented Dec 21, 2017

@josswright Interesting that you don't spawn dunst via dbus. But anyways, what's your setting of i3's focus_follows_mouse?

@wavexx do you run also i3? If so, could you also tell me the value of focus_follows_mouse?

@josswright
Copy link
Author

@bebehei Just default: focus_follows_mouse yes

@wavexx
Copy link
Contributor

wavexx commented Dec 21, 2017 via email

@josswright
Copy link
Author

Oh, sorry, for dunst configuration I've got follow = keyboard

@bebehei
Copy link
Member

bebehei commented Dec 22, 2017

This issue is getting weirder to debug by every comment 😂 I've tested all four combinations already yesterday and nothing made me able to reproduce this.

Well, I can only shoot into the dark and I'm guessing around. I'm not getting illuminated by the randr.log. I've created now a branch with Debug output of the events. Could you please build the 434-debug branch from my repository and paste the output while reproducing? If you annotate the output with the specific "I've done this/that here" that would be great.

I've also created a PKGBUILD.gz, which builds this as a package directly from there. (You have to gunzip it first, github does not allow me to push it raw.)

Thanks in advance.

@wavexx
Copy link
Contributor

wavexx commented Mar 16, 2019

Still affected by this. When the screen configuration changes, dunst still uses the old screen.

I'm pretty sure this happens due to:

  • follow=mouse
  • window is moved to another region due to xrandr configuration change
  • mouse is never actually moved (hotkey)
  • the focused window never changed

I can easily "fix" dunst by moving the mouse to another window, thus triggering a focus change event. This does update the position of the notification instantly to the current screen.

@tsipinakis
Copy link
Member

tsipinakis commented Mar 23, 2019

@wavexx Can you build tsipinakis@e97f226 and tell me if that fixes it?

From a few tests I've tried I can't reproduce this locally.

@wavexx
Copy link
Contributor

wavexx commented Mar 30, 2019 via email

@fwsmit fwsmit added the Xorg label Mar 13, 2021
@FatBoyXPC
Copy link

I am experiencing the same behavior when switching resolutions. Currently I kill and restart dunst but that doesn't seem favorable? What other steps can I take for this?

@fwsmit
Copy link
Member

fwsmit commented Jun 16, 2021

@FatBoyXPC could you give a bit more info? Eg: your setup, desktop environment, distribution, Dunst version, your dunstrc. Does the issue go away when you move your mouse?

Please provide as much info as possible to narrow down the problem. A reliable way to reproduce it would help a lot.

@FatBoyXPC
Copy link

FatBoyXPC commented Jun 17, 2021

I'm running arch with xmonad. Dunst 1.6.1.

dunstrc:

[global]
    font = "Droid Sans 8"
    markup = yes
    format = "<b>%s</b>\n%b"
    sort = yes
    indicate_hidden = yes
    alignment = center
    bounce_freq = 0
    show_age_threshold = 60
    word_wrap = yes
    ignore_newline = no
    geometry = "400x5-30+20"
    transparency = 0
    idle_threshold = 120
    monitor = 0
    follow = mouse
    sticky_history = yes
    line_height = 0
    separator_height = 2
    padding = 8
    horizontal_padding = 8
    separator_color = frame
    startup_notification = false
    frame_width = 1
    frame_color = "#464B50"
    icon_position = left
    max_icon_size = 200

[shortcuts]
    close = ctrl+space
    close_all = ctrl+shift+space
    history = ctrl+grave
    context = ctrl+shift+period

[urgency_low]
    background = "#323537"
    foreground = "#8F9D6A"
    timeout = 1

[urgency_normal]
    background = "#323537"
    foreground = "#AFC4DB"
    timeout = 5

[urgency_critical]
    background = "#323537"
    foreground = "#CF6A4C"
    timeout = 0

The issue does not go away when I move the mouse.

I have a usb c docking station with an external monitor that I use. When I am docked, I've got the laptop monitor turned off and the external monitor at 1920x1080. When I undock, the laptop resolution is 2560x1440. If I start dunst while docked, and I undock, dunst appears in the middle of my screen. When I re-dock, dunst goes back to the appropriate corner. If I start dunst while undocked, then dock, I never see the notification at all. If I re-dock, then the notification goes back to the appropriate corner.

@bynect
Copy link
Member

bynect commented Apr 29, 2024

does this still happen in the latest versions of dunst?

@FatBoyXPC
Copy link

FatBoyXPC commented May 15, 2024

This isn't an issue for me since I've changed hardware and don't normally use different resolutions anymore. That said, this seems easy enough to test by forcing the resolution to change?

@bynect
Copy link
Member

bynect commented May 16, 2024

This isn't an issue for me since I've changed hardware and don't normally use different resolutions anymore. That said, this seems easy enough to test by forcing the resolution to change?

Is changing resolution with xrandr enough to trigger it? You mentioned attaching an external monitor

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

7 participants