From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wDfEERfGzmMn8gAAbAwnHQ (envelope-from ) for ; Mon, 23 Jan 2023 18:38:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SDf3EBfGzmNNaQEAG6o9tA (envelope-from ) for ; Mon, 23 Jan 2023 18:38:31 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0DB1F18CB4 for ; Mon, 23 Jan 2023 18:38:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pK0lm-0007ct-71; Mon, 23 Jan 2023 12:38:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pK0lk-0007cf-Rt for help-guix@gnu.org; Mon, 23 Jan 2023 12:38:08 -0500 Received: from mx2.mythic-beasts.com ([2a00:1098:0:82:1000:0:2:1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pK0li-0007Qn-Le for help-guix@gnu.org; Mon, 23 Jan 2023 12:38:08 -0500 Received: from [2a01:e0a:acc:b9b0:13f:c961:cb0d:71c3] (port=49430 helo=lap.twilken.net) by mailhub-hex-d.mythic-beasts.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pK0lg-00CJk7-MM for help-guix@gnu.org; Mon, 23 Jan 2023 17:38:04 +0000 Date: Mon, 23 Jan 2023 18:37:58 +0100 From: Timo Wilken To: help-guix@gnu.org Subject: Rule from `udev-rules-service' not applied -- how to debug? Message-ID: <20230123173758.oe6eaxzrlbdzdhco@lap.twilken.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-BlackCat-Spam-Score: 9 Received-SPF: pass client-ip=2a00:1098:0:82:1000:0:2:1; envelope-from=timo@twilken.net; helo=mx2.mythic-beasts.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674495511; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=/ohB7qoWvEeFE1T5hgfyYzvKymKdCqhm9Wwn03fUsuE=; b=KFKsr0JXen760urTc8OJZ6G2Wt64RZGVfpd9ApjTZFXyU6HgjMVOXtV6rutlDUSllY6j4k b7XKaKsrWae8/3f+htoDxhFVXivGTYTPu4SIvgG50qxFqtNdMC9UkQWj+uwSe3rzh25fa5 F4AHV73C2+uH24Qfo79pgGS7DzoHdzMiC944MIDqfY/RWn1k/Bp9FJBxkzA7WwIZWcS88d 4h2hGnV0bXek4Dvx0m4R6mSQTiI+eDwiB2lt5eQJCpM20nWNgBtHkMH9Fb9Kg/kmR1bJQ7 vZl4J5lNR+1d6PK5UCd9dzQ5ewLmZDfzUkeQysykFzbVV/7LP6lWLaR9rd7upw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674495511; a=rsa-sha256; cv=none; b=aALNCq6xVEd2UpN7FVXC4nUT6DJLNEPngpANj0Ij7GMQRjbb1VVuzGDokvCHUJzXv9QjQd iefaRZ2nRizzh03AKiyNcNVuA4yPvJ/2PDpLuuhRoGFfjRmvrQQFu/+1NaQBp0XW+Ha8x6 A9bBsWoTo8SU2WXj2YoZ4ozTJFLGzjf8r8q3LD3CLahz5zD3DgHdfMQWvCgaTuyP8M70+E xaxZlORk9mU/pc+ndTZ0AF1hUvx9+Wu2Oo7VZjdWKoT9iyw8qmCSJcAZ/eYF4mRB5T2AjQ NirTGRnN6h2lq9vr1vccmx1J/VGDwRD/5fDRvYNkz4pEFAGuQ6CdB+MQc4KdlQ== Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.08 X-Spam-Score: -2.08 X-Migadu-Queue-Id: 0DB1F18CB4 X-Migadu-Scanner: scn1.migadu.com X-TUID: 0dQCES9yxFrj Hi Guix, I'd like to configure udev on my GuixSD system such that I can adjust my laptop display's backlight without having to use "sudo". This doesn't seem to work, as I can't figure out how to make udev pick up my custom *.rules file -- see below. I would appreciate any hints on how to debug this. I've declared my laptop's system using "guix system", added my user to the "video" group and added the following to my `operating-system''s `services' field: (define backlight-udev-rules (udev-rule "90-backlight.rules" "\ ACTION!=\"remove\", SUBSYSTEM==\"backlight\", GROUP=\"video\", MODE=\"0664\" ACTION!=\"remove\", SUBSYSTEM==\"leds\", GROUP=\"video\", MODE=\"0664\" ")) (operating-system ... (services (cons* ... (udev-rules-service 'backlight backlight-udev-rules #:groups '("video")) %desktop-services))) This produces "/etc/udev/rules.d/90-backlight.rules" on my system, which looks perfectly valid. However, when I reboot my machine, every file in /sys/class/backlight/intel_backlight is owned by root:root with 0644 or 0444 permissions, not by root:video as I'd like. I've also tried the following "90-backlight.rules" content, which also had no effect: ACTION=="add", SUBSYSTEM=="backlight", RUN+="/usr/bin/env chgrp video /sys/class/backlight/%k/brightness" ACTION=="add", SUBSYSTEM=="backlight", RUN+="/usr/bin/env chmod g+w /sys/class/backlight/%k/brightness" ACTION=="add", SUBSYSTEM=="leds", RUN+="/usr/bin/env chgrp video /sys/class/leds/%k/brightness" ACTION=="add", SUBSYSTEM=="leds", RUN+="/usr/bin/env chmod g+w /sys/class/leds/%k/brightness" The above is slightly adapted from what ships with programs like "light" and "brightnessctl" -- see: https://github.com/haikarainen/light/blob/master/90-backlight.rules https://github.com/Hummer12007/brightnessctl/blob/master/90-brightnessctl.rules Running "udevadm test -a add /sys/class/backlight/intel_backlight" gives the following output -- it does not seem to load any *.rules files from /etc/udev/rules.d. Is that expected? # udevadm test -a add /sys/class/backlight/intel_backlight calling: test version 3.2.11 This program is for debugging only, it does not run any program specified by a RUN key. It may show incorrect results, because some values may be different, or not available at a simulation run. === trie on-disk === tool version: 3 file size: 9463331 bytes header size 80 bytes strings 2374563 bytes nodes 7088688 bytes Load module index timestamp of '/gnu/store/g29xglzwnnlf5ghha9084wr0iy365zfg-eudev-3.2.11/etc/udev/rules.d' changed Reading rules file: /gnu/store/g29xglzwnnlf5ghha9084wr0iy365zfg-eudev-3.2.11/lib/udev/rules.d/50-udev-default.rules [lots of "reading rules file" lines omitted, all mentioning /gnu/store/g29xglzwnnlf5ghha9084wr0iy365zfg-eudev-3.2.11/lib/udev/rules.d/*.rules] Reading rules file: /gnu/store/g29xglzwnnlf5ghha9084wr0iy365zfg-eudev-3.2.11/lib/udev/rules.d/80-net-name-slot.rules rules contain 24576 bytes tokens (2048 * 12 bytes), 9516 bytes strings 1082 strings (16595 bytes), 679 de-duplicated (7483 bytes), 404 trie nodes used ACTION=add DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight SUBSYSTEM=backlight USEC_INITIALIZED=5264579 Unload module index The "udev" system service is running: # herd status udev Status of udev: It is started. Running value is 205. It is enabled. Provides (udev). Requires (root-file-system). Conflicts with (). Will not be respawned. Sorry about this long email. I'd be very grateful for any hints on how I could debug this problem further! Cheers, Timo