Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package steamos-powerbuttond for 
openSUSE:Factory checked in at 2026-10-24 22:04:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/steamos-powerbuttond (Old)
 and      /work/SRC/openSUSE:Factory/.steamos-powerbuttond.new.2252680 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "steamos-powerbuttond"

Sat Oct 24 22:04:44 2026 rev:3 rq:1392160 version:4.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/steamos-powerbuttond/steamos-powerbuttond.changes    
    2026-01-22 15:20:06.621057660 +0100
+++ 
/work/SRC/openSUSE:Factory/.steamos-powerbuttond.new.2252680/steamos-powerbuttond.changes
   2026-10-24 22:06:13.660635604 +0200
@@ -1,0 +2,19 @@
+Fri Oct 23 17:39:49 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to version 4.2:
+  * Move udev rules/hwdb from 80- to 70- prefix so the power button
+    keeps working with systemd v258 in gamescope-session
+  * Support ASUS ROG Xbox Ally and Xbox Ally X, ZOTAC Gaming Zone Pro;
+    fix Legion Go 2 long-press mapping and cover its BIOS variants
+  * Detect devices by key presence instead of an explicit list, track
+    META+F16, support lid switch, SIGHUP reload, node blacklisting,
+    raise max devices from 2 to 10
+  * Fix short-press key-repeat handling and long-press detection
+    after suspend/resume by re-enumerating stale device FDs
+  * Switch _service to official upstream
+    (gitlab.steamos.cloud/holo/powerbuttond); the previous mirror
+    carries no tags past 3.3
+- Drop fix-cmdline-overflow.patch: upstream bounded the device loop
+  by MAX_DEVS, so the downstream argument guard is redundant
+
+-------------------------------------------------------------------

Old:
----
  fix-cmdline-overflow.patch
  steamos-powerbuttond-3.3.tar.xz

New:
----
  _servicedata
  steamos-powerbuttond-4.2.tar.xz

----------(Old B)----------
  Old:    carries no tags past 3.3
- Drop fix-cmdline-overflow.patch: upstream bounded the device loop
  by MAX_DEVS, so the downstream argument guard is redundant
----------(Old E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ steamos-powerbuttond.spec ++++++
--- /var/tmp/diff_new_pack.LZ6LYH/_old  2026-10-24 22:06:14.461669084 +0200
+++ /var/tmp/diff_new_pack.LZ6LYH/_new  2026-10-24 22:06:14.467669335 +0200
@@ -15,19 +15,18 @@
 #
 
 Name:           steamos-powerbuttond
-Version:        3.3
+Version:        4.2
 Release:        0%{?dist}
 Summary:        Steam Deck power button daemon
-
 License:        BSD-2-Clause
-URL:            https://gitlab.com/evlaV/powerbuttond
+URL:            https://gitlab.steamos.cloud/holo/powerbuttond
 Source:         %{name}-%{version}.tar.xz
 Patch0:         steamos-powerbuttond-service.patch
-Patch1:         fix-cmdline-overflow.patch
-
 BuildRequires:  gcc
 BuildRequires:  make
 BuildRequires:  systemd-rpm-macros
+# pkgconf-pkg-config provides the pkg-config tool the Makefile calls;
+# keep it instead of the redundant bare pkgconfig dependency.
 BuildRequires:  pkgconf-pkg-config
 BuildRequires:  pkgconfig(libevdev)
 BuildRequires:  pkgconfig(libudev)
@@ -50,6 +49,7 @@
 %make_install DESTDIR=%{buildroot}
 rm -r %{buildroot}/%{_userunitdir}/gamescope-session.service.wants
 
+# Keep the user scriptlet macros unbraced: they take the service name argument.
 %pre
 %systemd_user_pre %{name}.service
 
@@ -67,7 +67,7 @@
 %dir %{_prefix}/lib/hwsupport
 %{_prefix}/lib/hwsupport/%{name}
 %{_userunitdir}/%{name}.service
-%{_prefix}/lib/udev/rules.d/80-steamos-power-button.rules
+%{_prefix}/lib/udev/rules.d/70-steamos-power-button.rules
 %dir %{_prefix}/lib/udev/hwdb.d
-%{_prefix}/lib/udev/hwdb.d/80-steamos-power-button.hwdb
+%{_prefix}/lib/udev/hwdb.d/70-steamos-power-button.hwdb
 

++++++ _service ++++++
--- /var/tmp/diff_new_pack.LZ6LYH/_old  2026-10-24 22:06:14.541672428 +0200
+++ /var/tmp/diff_new_pack.LZ6LYH/_new  2026-10-24 22:06:14.547672679 +0200
@@ -1,6 +1,6 @@
 <services>
        <service name="tar_scm" mode="manual">
-               <param 
name="url">https://gitlab.com/evlaV/powerbuttond.git</param>
+               <param 
name="url">https://gitlab.steamos.cloud/holo/powerbuttond.git</param>
                <param name="scm">git</param>
                <param name="versionformat">@PARENT_TAG@</param>
                <param name="filename">steamos-powerbuttond</param>

++++++ _servicedata ++++++
<servicedata>
<service name="tar_scm">
                <param 
name="url">https://gitlab.steamos.cloud/holo/powerbuttond.git</param>
              <param 
name="changesrevision">9392e68883fdb0c40bc01ab39ae75c83a541e413</param></service></servicedata>
(No newline at EOF)

++++++ steamos-powerbuttond-3.3.tar.xz -> steamos-powerbuttond-4.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/steamos-powerbuttond-3.3/Makefile 
new/steamos-powerbuttond-4.2/Makefile
--- old/steamos-powerbuttond-3.3/Makefile       2025-07-24 00:06:02.000000000 
+0200
+++ new/steamos-powerbuttond-4.2/Makefile       2026-02-27 07:06:01.000000000 
+0100
@@ -30,7 +30,7 @@
        install -Ds -m 755 steamos-powerbuttond 
$(DESTDIR)/usr/lib/hwsupport/steamos-powerbuttond
        install -D -m 644 LICENSE 
$(DESTDIR)/usr/share/licenses/steamos-powerbuttond/LICENSE
        install -D -m 644 steamos-powerbuttond.service 
$(DESTDIR)/usr/lib/systemd/user/steamos-powerbuttond.service
-       install -D -m 644 steamos-power-button.rules 
$(DESTDIR)/usr/lib/udev/rules.d/80-steamos-power-button.rules
-       install -D -m 644 steamos-power-button.hwdb 
$(DESTDIR)/usr/lib/udev/hwdb.d/80-steamos-power-button.hwdb
+       install -D -m 644 steamos-power-button.rules 
$(DESTDIR)/usr/lib/udev/rules.d/70-steamos-power-button.rules
+       install -D -m 644 steamos-power-button.hwdb 
$(DESTDIR)/usr/lib/udev/hwdb.d/70-steamos-power-button.hwdb
        install -d -m 755 
$(DESTDIR)/usr/lib/systemd/user/gamescope-session.service.wants
        ln -s ../steamos-powerbuttond.service 
$(DESTDIR)/usr/lib/systemd/user/gamescope-session.service.wants/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/steamos-powerbuttond-3.3/powerbuttond.c 
new/steamos-powerbuttond-4.2/powerbuttond.c
--- old/steamos-powerbuttond-3.3/powerbuttond.c 2025-07-24 00:06:02.000000000 
+0200
+++ new/steamos-powerbuttond-4.2/powerbuttond.c 2026-02-27 07:06:01.000000000 
+0100
@@ -17,31 +17,60 @@
 #include <sys/wait.h>
 #include <unistd.h>
 
-#define MAX_DEVS 2
+#define MAX_DEVS 10
+
+#define MOD_LSHIFT 0x01
+#define MOD_RSHIFT 0x02
+#define MOD_SHIFT 0x03
+#define MOD_LCTRL 0x04
+#define MOD_RCTRL 0x08
+#define MOD_CTRL 0x0C
+#define MOD_LALT 0x10
+#define MOD_RALT 0x20
+#define MOD_ALT 0x30
+#define MOD_LMETA 0x40
+#define MOD_RMETA 0x80
+#define MOD_META 0xC0
 
 extern char** environ;
+static bool got_alarm = false;
+static bool got_hup = false;
+
+struct evdev_context {
+       struct libevdev* dev;
+       int modifiers;
+};
+
+void alarm_handler(int) {
+       got_alarm = true;
+}
 
-void signal_handler(int) {
+void hup_handler(int) {
+       got_hup = true;
 }
 
-struct libevdev* open_dev(const char* path) {
+bool open_dev(const char* path, struct evdev_context* ctx) {
        int fd = open(path, O_RDONLY | O_NONBLOCK);
        if (fd < 0) {
-               return NULL;
+               return false;
        }
        struct libevdev* dev;
        if (libevdev_new_from_fd(fd, &dev) < 0) {
                close(fd);
-               return NULL;
+               return false;
        }
-       if (!libevdev_has_event_code(dev, EV_KEY, KEY_POWER)) {
+       bool has_meta = libevdev_has_event_code(dev, EV_KEY, KEY_LEFTMETA) && 
libevdev_has_event_code(dev, EV_KEY, KEY_F16);
+       bool has_power = libevdev_has_event_code(dev, EV_KEY, KEY_POWER);
+       bool has_lid = libevdev_has_event_code(dev, EV_SW, SW_LID);
+       if (!has_meta && !has_power && !has_lid) {
                libevdev_free(dev);
-               return NULL;
+               return false;
        }
-       return dev;
+       ctx->dev = dev;
+       return true;
 }
 
-size_t find_devs(struct libevdev* devs[]) {
+size_t find_devs(struct evdev_context* devs) {
        struct udev* udev = udev_new();
        size_t num_devs = 0;
        if (!udev) {
@@ -76,12 +105,13 @@
                if (!dev) {
                        continue;
                }
+               if (udev_device_get_property_value(dev, 
"STEAMOS_POWER_BUTTON_IGNORE")) {
+                       continue;
+               }
                const char* devpath = udev_device_get_devnode(dev);
                if (devpath) {
-                       struct libevdev* evdev = open_dev(devpath);
-                       if (evdev) {
+                       if (open_dev(devpath, &devs[num_devs])) {
                                printf("Found power button device at %s\n", 
devpath);
-                               devs[num_devs] = evdev;
                                ++num_devs;
                        }
                }
@@ -97,16 +127,17 @@
        return num_devs;
 }
 
-void do_press(const char* type) {
+void steam_message(const char* type) {
        char steam[PATH_MAX];
-       char press[32];
+       char message[32];
        char* home = getenv("HOME");
-       char* const args[] = {steam, "-ifrunning", press, NULL};
+       char* const args[] = {steam, "-ifrunning", message, NULL};
 
        alarm(0);
+       got_alarm = false;
 
        snprintf(steam, sizeof(steam), "%s/.steam/root/ubuntu12_32/steam", 
home);
-       snprintf(press, sizeof(press), "steam://%spowerpress", type);
+       snprintf(message, sizeof(message), "steam://%s", type);
 
        pid_t pid;
        if (posix_spawn(&pid, steam, NULL, NULL, args, environ) < 0) {
@@ -122,23 +153,37 @@
        }
 }
 
+void close_devs(struct evdev_context* devs, size_t num_devs) {
+       size_t i;
+       for (i = 0; i < num_devs; ++i) {
+               int fd = libevdev_get_fd(devs[i].dev);
+               libevdev_free(devs[i].dev);
+               if (fd >= 0) {
+                       close(fd);
+               }
+               memset(&devs[i], 0, sizeof(*devs));
+       }
+}
+
 int main(int argc, char* argv[]) {
-       struct sigaction sa = {
-               .sa_handler = signal_handler,
-               .sa_flags = SA_NOCLDSTOP,
-       };
+       struct sigaction sa = {0};
+
+       sa.sa_handler = alarm_handler;
        sigemptyset(&sa.sa_mask);
        sigaction(SIGALRM, &sa, NULL);
 
-       struct libevdev* devs[MAX_DEVS] = {0};
+       sa.sa_handler = hup_handler;
+       sigemptyset(&sa.sa_mask);
+       sigaction(SIGHUP, &sa, NULL);
+
+       struct evdev_context devs[MAX_DEVS] = {0};
        struct pollfd pfds[MAX_DEVS] = {0};
        size_t num_devs = 0;
 
        if (argc >= 2) {
                int i;
-               for (i = 0; i < argc - 1; ++i) {
-                       devs[num_devs] = open_dev(argv[i + 1]);
-                       if (devs[num_devs]) {
+               for (i = 0; i < argc - 1 && num_devs < MAX_DEVS; ++i) {
+                       if (open_dev(argv[i + 1], &devs[num_devs])) {
                                ++num_devs;
                        }
                }
@@ -149,57 +194,136 @@
                return 0;
        }
        size_t i;
-       for (i = 0; i < num_devs; ++i) {
-               pfds[i].fd = libevdev_get_fd(devs[i]);
+       for (i = 0; i < MAX_DEVS; ++i) {
                pfds[i].events = POLLIN;
        }
 
        bool press_active = false;
        while (true) {
+               if (got_hup) {
+                       got_hup = false;
+                       close_devs(devs, num_devs);
+                       num_devs = find_devs(devs);
+                       if (!num_devs) {
+                               break;
+                       }
+               }
+
                for (i = 0; i < num_devs; ++i) {
-                       pfds[i].fd = libevdev_get_fd(devs[i]);
+                       pfds[i].fd = libevdev_get_fd(devs[i].dev);
                        pfds[i].revents = 0;
                }
 
                int res = poll(pfds, num_devs, -1);
-               if (res < 0 && errno == EINTR && press_active) {
+               if (res < 0 && errno == EINTR && press_active && got_alarm) {
                        press_active = false;
-                       do_press("long");
+                       steam_message("longpowerpress");
                } else if (res <= 0) {
                        continue;
                }
 
                for (i = 0; i < num_devs; ++i) {
+                       struct evdev_context* ctx = &devs[i];
+                       if ((pfds[i].revents & (POLLERR | POLLHUP)) == (POLLERR 
| POLLHUP)) {
+                               got_hup = true;
+                               break;
+                       }
                        if (!(pfds[i].revents & POLLIN)) {
                                continue;
                        }
                        struct input_event ev;
                        do {
-                               res = libevdev_next_event(devs[i], 
LIBEVDEV_READ_FLAG_NORMAL, &ev);
+                               res = libevdev_next_event(ctx->dev, 
LIBEVDEV_READ_FLAG_NORMAL, &ev);
                                while (res == LIBEVDEV_READ_STATUS_SYNC) {
-                                       res = libevdev_next_event(devs[i], 
LIBEVDEV_READ_FLAG_SYNC, &ev);
+                                       res = libevdev_next_event(ctx->dev, 
LIBEVDEV_READ_FLAG_SYNC, &ev);
                                }
                                if (res != LIBEVDEV_READ_STATUS_SUCCESS) {
                                        break;
                                }
                                if (ev.type == EV_KEY) {
-                                       if (ev.code == KEY_POWER) {
+                                       switch (ev.code) {
+                                       case KEY_POWER:
                                                if (ev.value == 1) {
                                                        press_active = true;
                                                        alarm(1);
-                                               } else if (press_active) {
-                                                       do_press("short");
+                                               } else if (ev.value == 0 && 
press_active) {
+                                                       press_active = false;
+                                                       
steam_message("shortpowerpress");
+                                               }
+                                               break;
+                                       case KEY_LEFTSHIFT:
+                                               ctx->modifiers &= ~MOD_LSHIFT;
+                                               if (ev.value > 0) {
+                                                       ctx->modifiers |= 
MOD_LSHIFT;
+                                               }
+                                               break;
+                                       case KEY_RIGHTSHIFT:
+                                               ctx->modifiers &= ~MOD_RSHIFT;
+                                               if (ev.value > 0) {
+                                                       ctx->modifiers |= 
MOD_RSHIFT;
+                                               }
+                                               break;
+                                       case KEY_LEFTCTRL:
+                                               ctx->modifiers &= ~MOD_LCTRL;
+                                               if (ev.value > 0) {
+                                                       ctx->modifiers |= 
MOD_LCTRL;
+                                               }
+                                               break;
+                                       case KEY_RIGHTCTRL:
+                                               ctx->modifiers &= ~MOD_RCTRL;
+                                               if (ev.value > 0) {
+                                                       ctx->modifiers |= 
MOD_RCTRL;
+                                               }
+                                               break;
+                                       case KEY_LEFTALT:
+                                               ctx->modifiers &= ~MOD_LALT;
+                                               if (ev.value > 0) {
+                                                       ctx->modifiers |= 
MOD_LALT;
                                                }
-                                       } else if (ev.code == KEY_LEFTMETA && 
ev.value == 1) {
+                                               break;
+                                       case KEY_RIGHTALT:
+                                               ctx->modifiers &= ~MOD_RALT;
+                                               if (ev.value > 0) {
+                                                       ctx->modifiers |= 
MOD_RALT;
+                                               }
+                                               break;
+                                       case KEY_LEFTMETA:
+                                               ctx->modifiers &= ~MOD_LMETA;
+                                               if (ev.value > 0) {
+                                                       ctx->modifiers |= 
MOD_LMETA;
+                                               }
+                                               break;
+                                       case KEY_RIGHTMETA:
+                                               ctx->modifiers &= ~MOD_RMETA;
+                                               if (ev.value > 0) {
+                                                       ctx->modifiers |= 
MOD_RMETA;
+                                               }
+                                               break;
+                                       case KEY_F16:
+                                               if (ev.value == 1 && 
(ctx->modifiers & MOD_META) && !(ctx->modifiers & ~MOD_META)) {
+                                                       press_active = false;
+                                                       
steam_message("longpowerpress");
+                                               }
+                                               break;
+                                       }
+                               } else if (ev.type == EV_SW) {
+                                       if (ev.code == SW_LID && ev.value == 1) 
{
                                                press_active = false;
-                                               do_press("long");
+                                               steam_message("lidswitch");
                                        }
                                }
-                       } while (libevdev_has_event_pending(devs[i]) > 0);
-                       if (res == -EINTR && press_active) {
-                               press_active = false;
-                               do_press("long");
+                       } while (libevdev_has_event_pending(ctx->dev) > 0);
+                       if (res == -EINTR) {
+                               if (press_active && got_alarm) {
+                                       press_active = false;
+                                       steam_message("longpowerpress");
+                               } else if (got_hup) {
+                                       break;
+                               }
                        }
                }
        }
+
+       close_devs(devs, num_devs);
+       return 0;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/steamos-powerbuttond-3.3/steamos-power-button.hwdb 
new/steamos-powerbuttond-4.2/steamos-power-button.hwdb
--- old/steamos-powerbuttond-3.3/steamos-power-button.hwdb      2025-07-24 
00:06:02.000000000 +0200
+++ new/steamos-powerbuttond-4.2/steamos-power-button.hwdb      2026-02-27 
07:06:01.000000000 +0100
@@ -1,48 +1,32 @@
-# ASUS ROG Ally
-evdev:name:Power Button:dmi:*svnASUSTeKCOMPUTERINC.:*rnRC71L:*
-# ASUS ROG Ally X
-evdev:name:Power Button:dmi:*svnASUSTeKCOMPUTERINC.:*rnRC72LA:*
-# ASUS ROG Flow Z13 (2025)
-evdev:name:gpio-keys:dmi:*svnASUSTeKCOMPUTERINC.:*rnGZ302EA:*
-# AYANEO
-evdev:name:AT Translated Set 2 keyboard:dmi:*svnAYANEO:*
-evdev:name:Power Button:dmi:*svnAYANEO:*
-# AYN
-evdev:name:AT Translated Set 2 keyboard:dmi:*svnayn:*
-evdev:name:Power Button:dmi:*svnayn:*
-# GPD
-evdev:name:AT Translated Set 2 keyboard:dmi:*svnGPD:*
-evdev:name:Power Button:dmi:*svnGPD:*
+# SW_LID
+id-input:modalias:input:*,5,*w0*
+# KEY_POWER
+id-input:modalias:input:*,1,*k*74*
+# KEY_F16
+id-input:modalias:input:*,1,*k*BA*
+ STEAMOS_POWER_BUTTON=1
+
+evdev:name:Power Button:dmi:*svnValve:pnJupiter:*
+evdev:name:Power Button:dmi:*svnValve:pnGalileo:*
+ STEAMOS_POWER_BUTTON_IGNORE=1
+
+# Temporary scancode overrides -- remove these once they get upstreamed into 
systemd
+# AYA NEO
+evdev:name:AT Translated Set 2 keyboard:dmi:*svnAYA NEO:*
+evdev:name:AT Translated Set 2 keyboard:dmi:*svnAYADEVICE:*
 # Lenovo Legion Go
 evdev:name:AT Translated Set 2 keyboard:dmi:*svnLENOVO:pn83E1:*
-evdev:name:Power Button:dmi:*svnLENOVO:pn83E1:*
 # Lenovo Legion Go S
 evdev:name:AT Translated Set 2 keyboard:dmi:*svnLENOVO:pn83L3:*
-evdev:name:Power Button:dmi:*svnLENOVO:pn83L3:*
 evdev:name:AT Translated Set 2 keyboard:dmi:*svnLENOVO:pn83N6:*
-evdev:name:Power Button:dmi:*svnLENOVO:pn83N6:*
 evdev:name:AT Translated Set 2 keyboard:dmi:*svnLENOVO:pn83Q2:*
-evdev:name:Power Button:dmi:*svnLENOVO:pn83Q2:*
 evdev:name:AT Translated Set 2 keyboard:dmi:*svnLENOVO:pn83Q3:*
-evdev:name:Power Button:dmi:*svnLENOVO:pn83Q3:*
 # Lenovo Legion Go 2
 evdev:name:AT Translated Set 2 keyboard:dmi:*svnLENOVO:pn83N0:*
-evdev:name:Power Button:dmi:*svnLENOVO:pn83N0:*
 evdev:name:AT Translated Set 2 keyboard:dmi:*svnLENOVO:pn83N1:*
-evdev:name:Power Button:dmi:*svnLENOVO:pn83N1:*
-# MSI
-evdev:name:Power Button:dmi:*svnMicro-StarInternationalCo.,Ltd.:pnClawA1M:*
-evdev:name:Power 
Button:dmi:*svnMicro-StarInternationalCo.,Ltd.:pnClaw7AI+A2VM:*
-evdev:name:Power 
Button:dmi:*svnMicro-StarInternationalCo.,Ltd.:pnClaw8AI+A2VM:*
-evdev:name:Power Button:dmi:*svnMicro-StarInternationalCo.,Ltd.:pnClawA8BZ2EM:*
-# ONEXPLAYER
-evdev:name:AT Translated Set 2 keyboard:dmi:*svnONE-NETBOOK:*
-evdev:name:Power Button:dmi:*svnONE-NETBOOK:*
-# OrangePi
-evdev:name:AT Translated Set 2 keyboard:dmi:*svnOrangePi:*
-evdev:name:Power Button:dmi:*svnOrangePi:*
-# Steam Deck
-evdev:name:AT Translated Set 2 keyboard:dmi:*svnValve:*
-# ZOTAC Gaming Zone
-evdev:name:Power Button:dmi:*svnZOTAC:*rnG0A1W:*
- STEAMOS_POWER_BUTTON=1
+ KEYBOARD_KEY_67=f16
+
+# Lenovo Legion Go 2
+evdev:name:AT Raw Set 2 keyboard:dmi:*svnLENOVO:pn83N0:*
+evdev:name:AT Raw Set 2 keyboard:dmi:*svnLENOVO:pn83N1:*
+ KEYBOARD_KEY_20=f16

Reply via email to