Bug 2346855

Summary: Enable Anaconda keyboard layout control on X11 based environments
Product: [Fedora] Fedora Reporter: Jiri Konecny <jkonecny>
Component: anacondaAssignee: Jiri Konecny <jkonecny>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 42CC: anaconda-maint, awilliam, kkoukiou, w
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: AcceptedFreezeException
Fixed In Version: anaconda-42.27.3-1.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-03-10 16:14:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2291264    

Description Jiri Konecny 2025-02-20 17:02:19 UTC
As part of this change
https://fedoraproject.org/wiki/Changes/Anaconda_As_Native_Wayland_Application#Consistent_keyboard_control

the keyboard layout control from Anaconda on X11 based Live installation environments is broken. It is expected to be broken and spin owners were notified about this change. However, we are trying to improve the situation so we started a project to resolve this issue

https://github.com/rhinstaller/localed-x11-sync

This project will run as a service on X11 based spins Live environment and will make a connection between localed configuration and the running X11 based system. The localed project works as a middle layer to give Anaconda control over the keyboard layouts in the environment.

Unfortunately, our team is quite occupied with all the other work so for simplification we decided to put this script as part of anaconda-live existing package to avoid packaging process and get this to Fedora 42 sooner. In the future we want to change this and make a separate package because this script is not directly dependent on Anaconda.

So we are proposing this change:
https://github.com/rhinstaller/anaconda/pull/6149

as a solution until we are ready to propose this as separate package.

Reproducible: Always

Steps to Reproduce:
1. Boot X11 based spin installation ISO (for example Xfce spin)
2. Start Anaconda
3. Try to change keyboard layouts from Anaconda
Actual Results:  
Keyboard layouts are not really changing even that Anaconda thinks so. This happens because Anaconda communicates only with systemd-localed which is correctly configured but system doesn't listen to this.

Expected Results:  
Keyboard layouts should be set to system correctly.

This doesn't impact installed keyboard layouts, that is still working as expected.

Discussed also here:
https://lists.fedorahosted.org/archives/list/devel@lists.fedoraproject.org/message/THT7Y6SVS7ILV4T5CWFS6VPVES2F5YD2/

Comment 1 Jiri Konecny 2025-02-20 17:03:33 UTC
As part of this change we also need to do modifications to X11 based Live spins and their livesys-scripts.

Comment 2 Fedora Blocker Bugs Application 2025-02-20 17:18:20 UTC
Proposed as a Freeze Exception for 42-beta by Fedora user zlopez using the blocker tracking app because:

 It will be impossible to change keyboard layout on X11 in Anaconda

Comment 3 Jiri Konecny 2025-02-24 12:22:12 UTC
(In reply to Jiri Konecny from comment #1)
> As part of this change we also need to do modifications to X11 based Live
> spins and their livesys-scripts.


After discussion with maintainer of the livesys-scripts because we are not introducing a new package only change in livesys-scripts is needed. I will create that when Anaconda is ready.

Comment 4 Jiri Konecny 2025-02-24 12:23:31 UTC
We have a PR to Rawhide created which needs to be backported to F42:
https://github.com/rhinstaller/anaconda/pull/6149


This PR has a known issue of not having signals implemented. I'll try to get to that when I have a bit of time.

Comment 5 Jiri Konecny 2025-02-24 12:24:52 UTC
For clarification - the outcome of not having implemented signals:

- change in the compositor (change of keyboard layouts by keyboard shortcut or user interaction) is not reflected back to localed so Anaconda is not aware of that and still showing a wrong layout to the user

Comment 6 Adam Williamson 2025-02-24 16:35:08 UTC
+3 in https://pagure.io/fedora-qa/blocker-review/issue/1762 , marking accepted.

Comment 7 Jiri Konecny 2025-02-26 09:33:15 UTC
PR: https://github.com/rhinstaller/anaconda/pull/6202

Comment 8 Fedora Update System 2025-03-06 10:22:42 UTC
FEDORA-2025-73a6f8a23c (anaconda-42.27.3-1.fc42 and anaconda-webui-26-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-73a6f8a23c

Comment 9 Fedora Update System 2025-03-07 08:35:08 UTC
FEDORA-2025-73a6f8a23c has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-73a6f8a23c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-73a6f8a23c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2025-03-10 16:14:04 UTC
FEDORA-2025-73a6f8a23c (anaconda-42.27.3-1.fc42 and anaconda-webui-26-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.