-
-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QT6 programs fail when using a custom keyboard layout #226484
Comments
I ran into this issue a few days ago as well, and worked around it by remapping my keyboard with kanata instead of xkb. It seems to affect all Qt 6 apps, not just Anki, and only at startup. (So if you change the layout with |
I can't reproduce this on my machine, but the code causing this appears to be https://invent.kde.org/qt/qt/qtwebengine-chromium/-/blob/22fec96c83014753f8d4d709dad25902cafa1a75/chromium/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc#L641 (we of course patch the path), which is (only?) called from https://invent.kde.org/qt/qt/qtwebengine-chromium/-/blob/22fec96c83014753f8d4d709dad25902cafa1a75/chromium/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc#L700 (the I imagine the correct thing to do is replace the path with I'm not sure I want to know why chromium/qtwebengine reads keyboard layouts from disk. Edit: I think also using |
This is definitely not limited to Anki, I see a similar thing with Calibre when trying to open a book:
|
Also observing it with Calibre’s |
"on 22.11" is probably pretty key, I just built 855fb68 (as "a random commit on master from a month or so ago") and ebook-viewer still crashes on launch. I'll try to go further back in history if I have time... |
For ebook-viewer, I figured it was worth seeing if it starting to fail corresponds with it switching to qt6. It fails to launch in the commit that switches to qt6 for another reason, but a commit soon after 3303cf2 exhibits the bug described in this issue (that's the first commit after the qt6 upgrade with qtwebengine cached, and I don't feel like compiling webengine right now). I think it's safe to say calibre's ebook-viewer has been failing in this way ever since it was upgraded to qt6. My guess would be that qt6 in nixpkgs has had this problem the entire time. For anyone else who wants to poke at this, the repro I used for this is here; I just plugged the above nixpkgs commits into the nixpkgs input to test em. |
@apfelkuchen6 thank you for linking the relevant code, and for the suggestion for a patch here! I applied something pretty close to what you suggested, and it seems to fix the crash, so I put up a PR over here: #227077 If anyone else on this issue wants to try that patch, it'd be welcome... just be warned that building qtwebengine will take a while, so you know, be prepared for that. |
This should be fixed on nixpkgs-unstable now! I'm happy to backport it to 22.11 as well if anyone wants to advocate for that (I'd just do it without asking, but I feel like I'd end up compiling qt6 to verify the backport works, which is a lot of cpu cycles to burn). |
Thank you, @euank! |
I didn't backport the patch, but we waited long enough that 23.05 is now the stable release :D Closing as fixed! |
Describe the bug
For example:
anki
doesn't respectXKB_CONFIG_ROOT
Steps To Reproduce
xserver.extraLayouts
xserver.layout
anki
$XKB_CONFIG_ROOT
for your layout:Expected behavior
Anki starts (and uses the correct layout)
Notify maintainers
@oxij @Profpatsch @euank
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: