Hi, On 02-09-19 07:17, Mantas Mikulėnas wrote:
On Mon, Sep 2, 2019 at 7:34 AM Chris Murphy <lists@xxxxxxxxxxxxxxxxx <mailto:lists@xxxxxxxxxxxxxxxxx>> wrote: systemd-243~rc2-2.fc31.x86_64 kernel-5.3.0-0.rc6.git1.1.fc32.x86_64 This might be a regression, at least I don't remember this happening before. I can use the expected keys for built-in display brightness, and built-in keyboard brightness. But the service unit fails with an out of the box installation. [chris@fmac ~]$ sudo systemctl status systemd-backlight@backlight:acpi_video0.service ● systemd-backlight@backlight:acpi_video0.service - Load/Save Screen Backlight Brightness of backlight:acpi_video0 Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static; vendor preset: disabled) Active: failed (Result: exit-code) since Sun 2019-09-01 19:57:37 MDT; 8min ago Docs: man:systemd-backlight@.service(8) Process: 667 ExecStart=/usr/lib/systemd/systemd-backlight load backlight:acpi_video0 (code=exited, status=1/FAILURE) Main PID: 667 (code=exited, status=1/FAILURE) Sep 01 19:57:37 fmac.local systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:acpi_video0... Sep 01 19:57:37 fmac.local systemd-backlight[667]: Failed to get backlight or LED device 'backlight:acpi_video0': No such device Sep 01 19:57:37 fmac.local systemd[1]: systemd-backlight@backlight:acpi_video0.service: Main process exited, code=exited, status=1/FAILURE Sep 01 19:57:37 fmac.local systemd[1]: systemd-backlight@backlight:acpi_video0.service: Failed with result 'exit-code'. Sep 01 19:57:37 fmac.local systemd[1]: Failed to start Load/Save Screen Backlight Brightness of backlight:acpi_video0. [chris@fmac ~]$ # find /sys -name "*video0*" /sys/class/video4linux/video0 /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-2/1-2:1.0/video4linux/video0 # ls -l /sys/class/backlight/ total 0 lrwxrwxrwx. 1 root root 0 Sep 1 19:57 gmux_backlight -> ../../devices/pnp0/00:03/backlight/gmux_backlight lrwxrwxrwx. 1 root root 0 Sep 1 19:57 intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight Could it be that acpi_backlight is loaded at first, but gets replaced by intel_backlight before systemd could react?
Maybe, the gmux_backlight suggests that this is a macbook. On normal machines, what you say will not happen because linux/drivers/acpi/acpi_video.c has: static int __init acpi_video_init(void) { ... if (intel_opregion_present()) return 0; And then later the i915 kms driver tells acpi_video it is ok to actual register by calling acpi_video_register() But on mac Books there also is the gmux, and I see that the gmux code also calls acpi_video_register(), possibly before the i915 driver is setup, which would trigger the race you suggest where acpi_video.c registers it backlight interface, which is only done if there are no "native" preferred backlight interfaces and then i915 comes along, registers its "native" backlight interface and the acpi backlight code removes its acpi_video0 in response to that. So yes this seems like a race, which only gets seen on macbooks. Regards, Hans _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel