Bug 1966653 - sddm tells udev to execute "rm -f /etc/sddm/hide-wayland-sessions" on *every* udev event
Summary: sddm tells udev to execute "rm -f /etc/sddm/hide-wayland-sessions" on *every*...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sddm
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Bříza
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-01 15:30 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2021-10-28 18:27 UTC (History)
7 users (show)

Fixed In Version: sddm-0.19.0-18.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-28 18:27:52 UTC
Type: Bug


Attachments (Terms of Use)

Description Zbigniew Jędrzejewski-Szmek 2021-06-01 15:30:01 UTC
Description of problem:
Holy moly, why involve udev in this at all? Please just check the kernel command
line when starting sddm. And if sddm cannot check itself, do it in ExecStartPre=.
There is really no need to touch the file system on every udev add, remove, change, bind, and unbind event.

Version-Release number of selected component (if applicable):
sddm-0.19.0-13.fc34.x86_64

Comment 1 Zbigniew Jędrzejewski-Szmek 2021-06-01 15:32:53 UTC
$ cat /usr/lib/udev/rules.d/61-sddm-plasmawayland.rules
# disable Wayland if modesetting is disabled
RUN+="/usr/bin/rm -f /etc/sddm/hide-wayland-sessions"
IMPORT{cmdline}="nomodeset", RUN+="/usr/bin/touch /etc/sddm/hide-wayland-sessions"

Comment 2 Ben Cotton 2021-08-10 13:05:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 3 Adam Williamson 2021-10-26 20:47:54 UTC
"Holy moly, why involve udev in this at all?"

because we were in a hurry and it was the best idea we had at the time...this was to fix https://bugzilla.redhat.com/show_bug.cgi?id=1952431 . Neal came up with the initial plan which involved a udev rule running a script that did a bunch of stuff then touched `/etc/sddm/hide-wayland-sessions`, we noted that would mean it was hidden forever and added the step of wiping the file at the start of the udev rule, then I suggested just getting rid of the script and having the udev rule create the file then remove it if nomodeset was in cmdline. I was focusing on the messiness of the script, so didn't really think about how much activity the udev rule would cause.

As Jeremy points out, the change he recently made to fix https://bugzilla.redhat.com/show_bug.cgi?id=2016788 should also address this concern:

https://src.fedoraproject.org/rpms/sddm/c/52dc921f03abf4524bb2ca249ef28cf78b8c0e4a?branch=rawhide

so I'll mark the update as fixing this bug too.

Comment 4 Fedora Update System 2021-10-26 20:50:09 UTC
FEDORA-2021-631306a178 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-631306a178

Comment 5 Zbigniew Jędrzejewski-Szmek 2021-10-27 10:10:08 UTC
Thanks! That update removes the file altogether, so "should also address" → "addresses" :)

Comment 6 Fedora Update System 2021-10-28 18:27:52 UTC
FEDORA-2021-631306a178 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.