-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
keyboard backspace bug for x230-hotp-maximized (x230t) #958
Comments
@Kawaiisu what is your backspace bug? I had the following bug on x230t but in OS (QubesOS) not under Heads, if your bug is that the backspace is not linked to the right keymap for some reason: QubesOS/qubes-issues#3306 Please describe actual behavior and expected behavior, which OS, and if behavior is under Heads or not. |
Hi, I went to powershell from Heads and they backspace and backspace keys seem to be fine. Then I tested debian 10 live and found that the backslash and pipe key "\ |" seems not to function. As well as Backspace. Again in Qubes OS, same as debian 10, the backspace or backslash doesn't seem to function. On Tails backslash does nothing but backspace in this instance locks the screen. I visited this: QubesOS/qubes-issues#3306 Am I supposed to overwrite xmodmap_x230t.txt from Dom 0? But what about every other operating system? Doesn't it mean there's something I need to do in heads to make sure its permanent across all operating systems? We use many live operating systems. Thank you. |
@Kawaiisu The problem was never resolved. Last time I checked with QubesOS, fix was temporary, and was not able to map it correctly over reboot and was randomly showing back. Looked for help, found none, gave up. AFAIK, the issue is relevant to x230t alone, not x230 (I have not that problem at all). If you find the solution elsewhere, please link to the fix. It seems that no one cared, including myself, since I do not use my x230t but to test Heads builds. AFAIK that QubesOS issue included all the pertinent information that I had found from that time. If you find something new, please ressucitate that issue, since as you discovered, is still present. Also, as you saw, the issue is not having any relevance to Heads, since the behavior is not present. So the issue here is irrelevant. |
@tlaurion Could you use the x230t coreboot config for x230t? Skulls is building separate images for x230 and x230t because the devices are not exactly same. https://github.com/merge/skulls It would also make more sense for people who switch from skulls to heads to flash a x230t image when they had before also a x230t skulls-coreboot image. |
@ fhvyhjriur Heads is a community project. Consequently, I will not do the port for x230t but will invite x230t, t400 and other not supported board owners to propose pull requests. And will hold my stance on maintaining and trying to continue to do quality work on my community time, for which i'm not paid for. Hope the message reached its audience. Free software doesn't mean free as in free beer. Everyone has 24h in a day. If it's important for you, you will take the required time to make it happen, asking questions, proposing code; not requiring others to do the work at your place. This is how it works. I recognize, though, that if x230t is detected as a x230 because of coreboot, x230t board definition might be the answer to upstream bug. Letting people take their fish lines instead of providing unlimited fish supply: |
@tlaurion You asked for a link for a possible solution. Thats why i linked the x230t coreboot commit. That would fix the problem that the x230t is been detected as a x230 when a x230 coreboot images is been used. I thought you maybe do not know that it was merged in 03.2020 to coreboot and it would be some help to mention this. EDIT: When i wrote the text, your last edit of your text did not had this line: 'I recognize, though, that if x230t is detected as a x230 because of coreboot, x230t board definition might be the answer to upstream bug.' |
I did'nt know. That would then be linked to x230-maximized images, being pushed to coreboot newer version, which are still not merged upstream under Heads. My comment is still relevant. Code should be borrowed, modified, tested functional, and then proposed for merged, tested and then upstreamed by the people who need the changes. |
@tlaurion I watched https://fosdem.org/2020/schedule/event/selfish_contributor/ At some parts of this world the 11.01.2021 have begun. This is the 8th year since the death of https://en.wikipedia.org/wiki/Aaron_Swartz . My "selfish motivation" is to help the world to be a better place for people with such a free mind like Aaron had. |
Yes. My Heads test device is a 230T. As far as I can tell is the only difference between the x230 and x230T coreboot configurations is gpio33 changed from output to input. This probably has to do with using the touchscreen as an input during boot up. |
@Thrilleratplay did you figured out why backspace was not functionning properly on Qubesos and other OSes? |
@Kawaiisu first question first. Is the bad behavior present with stock Lenovo BIOS on live cds? @fhvyhjriur lookin at coreboot changes, I doubt sincerely that the changes would resolve the keyboard issue. With that first question here answered, avenues of solutions can then be nrrowed down. Vivid memories for Swartz. Sympathetic to the cause. Thanks for reminding me why we do this. Just remember time is a limited resource, I don't intend to be rude. |
@tlaurion I haven't had an issue with the backspace. I'll try the latest build tomorrow |
@tlaurion Open source projects are rife with burnout and you put in a considerable amount of work to Heads. It is important to be reminded why you it. The personal reasons that drive you to contribute so much to Heads are your own. I understand the importance and do what I can with my time, resources and energy but pales in comparison to you do to keep this project going. Thank you. |
@Kawaiisu I am going to assume you did not do any keyboard swap or Thinkpad-EC style EC modifications to allow third party batteries. What country are all of these laptops from? If they are not all North American Models, I wonder if something like the default grub keymap does not work on certain regional keyboards. I still have to test this myself. |
@tlaurion @Kawaiisu I may have reproduced this. I am confused on whether it is just the backspace key or all keys that do not work? I flashed the latest x230 maximized build artifact from CircleCI and everything seems to work fine but occasionally after a reboot, the keyboard does not seem to be initialized. It also only seems to happen when rebooting from the emergency shell either with the command EDIT: Oops, I used a test build. Let me try one from master.....and osresearch does not allow/have any projects in circleCI because there is only a 404 when I click on projects. EDIT 2: Updated master on my fork and used the CircleCI build heads-x230-maximized-v0.2.0-1006-g6bc40d7.rom. If I boot into a USB image of Debian 9, I can go into a prompt and still use the backspace and pipe characters on the keyboard. |
i remember this bug with backspace key I would never give more than $ 50 for these laptops, |
RIP Aaron :( Thank you all so much for your generosity. Sorry for my delay. I hope you're all finding ways to prepare and maintain your safety during these trying times. @tlaurion : you asked "Is the bad behavior present with stock Lenovo BIOS on live cds?" I will double check this on a stock device and post my results today. Also I think you're correct that there isn't this problem on the notebook non-tablet version of the x230. I'll double check this as well. @Thrilleratplay you said "I am going to assume you did not do any keyboard swap or Thinkpad-EC style EC modifications to allow third party batteries." No mods. I did do a backlit keyboard on one, but went back to stock keyboard. @Thrilleratplay: "What country are all of these laptops from? If they are not all North American Models, I wonder if something like the default grub keymap does not work on certain regional keyboards." Laptops were purchased from a recycler. But there was spanish post-it notes from the previous owners. Its possible they came from South America, would this matter? What could I do to figure this out? I think the recycler would not tell me for competitive reasons. I will go through in detail everything else mentioned above in case I missed anything. |
@Kawaiisu I ask about where they are from because there are regions variants of keyboards (Japanese, Russian etc). Normally these are obvious, other times it could be subtle like the currency character not being |
Okay I've tried both tails and debian 10 live on both stock x230 notebook non-tablet version and x230 tablet versions. Backspace and and backslash work normally. I also swapped out the tablet with a backlit keyboard and backspace and backslash still work as expected. Also not sure if it will become relevant but want to note it so I don't forget: Another X230 notebook I flashed using make BOARD=x230 and x230-flash rom creation process. On that system backspace and backslash work just fine. The system that's giving me the problem is an x230 tablet and I used make BOARD=x230-hotp-mazimized. Not sure if the rom difference is relevant. I am going to now flash the stock x230 tablet and notepad with the x230-hotp-mazimized rom and will report if the backspace-backslash problem comes back. @tlaurion about whether I have country specific keyboards, they seem to be all US, except 1 backlit keyboard on the problem computer does have a random extra euro symbol on the 5 and % key. So three symbols on this one key. Which is strange. The other backlits don't have this and seem to be US-only. Could be something here. Okay I'll get to flashing and report back my findings. But first I have a question about preparing the x230-hotp-maximized roms. In the x230-hotp-maximized.config there's a part that says "call - blobs/xx30/download_clean_me.sh." which is commented out. So I removed the comment # and running make Board=x230-hotp-maximized gives us: "Wrong gawk detected: 4.2.1 /home/user/heads/boards/x230-hotp-maximized/x230-hotp-maximized.config:65: *** missing separator. Stop." I know I'm doing something really noob here. A hyphen or space or something is missing or needs to deleted, please have mercy on me ^_^. To produce the roms while getting around the error we skipped this part and manually ran wget https://download.lenovo.com/pccbbs/mobiles/g1rg24ww.exe && innoextract g1rg24ww.exe && python ~/me_cleaner/me_cleaner.py -r -t -O ~/heads/blobs/xx30/me.bin app/ME8_5M_Production.bin But if I know why the error was happening this will speed up our process. Thank you. I'll get to flashing now. |
@0rb677 @tlaurion @Thrilleratplay @fhvyhjriur Greetings everyone. I'm reporting back my findings. I newly flashed two laptops, a stock x230 Tablet and a stock x230 Notebook non-tablet. The notebook's backspace and backslash work fine. However on the Tablet backspace and backslash don't work as intended. Locking the screen in Tails for instance. I did test both stock laptops prior, they were both working as intended on multiple OS before the flash. So at this point I'm stumped, is this a heads problem or something else? Not really sure how to proceed here. Any advice would be greatly appreciated. Thank you all for your time and insight. Be safe. |
@Kawaiisu Just to clarify, all of your x230 work as expected but the x230T still has an issue with the backspace key? What OSes have you tried after flashing Heads? Lets try to figure out what the OS sees (link to helpful answer). At the moment I am on a x230 that is running coreboot and Arch Linux. If I execute
If the same OS and version of Heads is installed on both your x230 and x230T, it would be more beneficial if you compare the the results between those machines. Hopefully this will narrow down the issue. |
Yes you're correct on the x230 backspace and backslash works fine with Qubes. But x230T with Qubes backspace and backslash doesn't work. On x230, running
Then running
Then running
Then running
On x230T, running
Then running
Then running
Then running
Does that help? |
@Thrilleratplay @tlaurion Want to give update. The bad behaviour is exactly the same for the X230T on Tails and Debian 10 Live OSs. It gives the same key codes and scancodes as Qubes on SSD as cited above. Also on the 230T, in heads powershell backspace works correctly. So I'm confused, why do all OSs work on a stock X230T, but when I flash heads, suddenly no OSs work? Are we sure this is a Qubes specific problem? Isn't Qubes natively Xen? Should I test more OSs? |
@Kawaiisu i'm confused on your conclusions. @Kawaiisu : can you send me a rom backup of lenovo x230t? I cannot guarantee when I will invest time in this, but my first debfugging steps, as said prior, would be to test behavior on stock BIOS. My hypothesis is that OSes are detecting keyboard and set mappings based on detected x230. Which doesn't match x230t. Another note: QubesOS is based on Xen, yes, but the underlying dom0 OS for QubesOS 4.0 is fedora-25. So issues disovered here are fedora-25 related for QubesOS. Or related to Xorg keyboard, or underlying mapping to keyboard config. @Thrilleratplay I left the ticket as unfixed under QubesOS with all steps I took in the past trying to fix the issue. As of now, i'm still into uncertainty on what is the problem to replicate. On my past experience on X230t with QubesOS, the behavior was random. It was functional at first install (I could change LUKS key passphrase doing backstpace) and then after OS install, I couldn't. The issue I opened (QubesOS 3.2) was closed because noone else was confirming the issue. So the user base of X230t seems quite small. Noone else replicated the issue; noone +1. I investigated as far as I could. And left the x230t alone. The heads related ticket is : #827 (comment) I think the problem is generalizing to all OSes. So I will ask again:
If the behavior is limited to Heads, which is a duplicate of the X230 coreboot config, then maybe coreboot exposing the board as a x230 in dmi tables might be the culprit. Maybe the remapping of keys in OSes are basing themselves on exposed X230 mappings instead of X230t. Please give feedback on 1 or 2 above. Instead of trying to resolve the issue and waste time. Troubleshooting steps from simple to complex is key, else you will loose yourselves. If we know the behavior is different between installed OSes from stock BIOS vs Heads, then we might be able to get the differences in assumptions and blame the x230 config inside of the x230t board. And start from there. If I missed your conclusions, please re clarify and sorry to have missed them; I have not see clear statement of differentiation between 1 or 2 being the cultprit. |
@Kawaiisu I asked what OSes you had tried, as the respond was only pertained to Qubes, I assumed the issue was isolated to Qubes. I booted Debian 9 on my x230T with maximized Heads and do not have this issue. The shell I entered from the Debian Graphical install does not have Steps to take:
@tlaurion I saw the solution you posted in Qubes issues #3306 using xmodmap but, unless I am mistaken, this would only work in X11, not in a terminal if x11 failed to start or the user enters another TTY session by pressing Ctrl-alt-F2 (this may not be an issue in Qubes). |
@tlaurion apologies, let me correct my poor grammar: The bad behaviour is exactly the same for the X230T on Tails and Debian 10 Live OSs. It gives the same key codes and scancodes as Qubes on SSD as cited above. You asked:
The bad behaviour isn't present on a stock lenovo bios for the x230t. I test qubes, debian live and tails.
Yes the bad behaviour of incorrectly mapped backspace and backslash only appears only after flashing. I tried to upload .zip directly to github, either its not supported or my browser doesn't allow. I was able to upload here: Inside is both heads that I flashed to the x230t and the factory bios before should you need. |
So works on stock bios but not heads. Now we talk. |
@Kawaiisu |
Upon your suggestions I ran on debian 10:
It showed on the x230t:
I googled around and nothing came up relevant to this issue. I swapped out the keyboard from a x230 notebook where the backspace is working on to the x230t, and the backspace still doesn't work. I ran You said heads maximised is working correctly with your x230t, do you think it's possible I built heads incorrectly? Beforehand when I built heads, I was using make But there was a key difference when doing In the x230-hotp-maximized.config there's a part that says "call - blobs/xx30/download_clean_me.sh." which is commented out. So I removed the comment # and running
I couldn't figure out what the custom invoke or call command was here so I tried to get around this step by manually running
then made the roms after. Is it possible I missed a key step involving a difference in the way to make the roms for the x230 versus the x230t? |
Short report: |
I've just seen it on my x230 (without the t) for the first time, same behaviour as described above for my x230t. Heads is 6300dd1 (from the 4.19 pull request) |
Using 3a38ac0 on daily driver (x230-hotp-maximized). Cannot replicate under QubesOS that was already installed. @bwachter what is your OS, was it already installed, anything special (different locales, different language) and can you replicate this across reboots? |
I can reliably reproduce this bug on ab1faf5 Backspace and backslash/vertical slash keys seem to work fine during initramfs stage when the system's |
While searching for information on The keyboard is still detected as |
Considering its a detection bug at runtime to init i8042, I think a good testing g avenue would be to look into proper parameters to pass to the module from coreboot kernel boot arguments. That's one path I never checked before. |
I tried recompiling Heads with P.S. I'm doing all of my testing in Heads instead of Arch Linux since it's way faster and seems to produce the same results. If the keyboard was identified as Raw in Heads, it'll still be Raw in Arch, and the same goes for Translated. |
Both coreboot and Linux can interact with i8042 and serio which setups the keyboard. Coreboot coreboot/coreboot@a69d682 Will check history of linux since we are close to be able to propose 5.10.178 where 4.x might still have bogus code and once set per heads kernel, it is reused under final kexec'ed OS unless KERNEL_ADD board parameter is forcing behavior. Edit nothing changed there for a while. I'm not aware of a way to force i8042 into translated, where coreboot last changes chanfed the behavior to init in translated 2 first maybe this would be the way: renable that coreboot config option for all and force Linux kernel boot option to leave it that way? Otherwise someone will have to dig https://wiki.osdev.org/%228042%22_PS/2_Controller |
From my memory recollection, this behavior was touching tablet variants only before and now with coreboot 4.19 x230 owners start reporting issues where I can't replicate. Fixating the behavior for all boards seem to be the way |
Revisiting this issue from #958 (comment)
I will do a quick branch with my codechanges laying around for 5.10.178, testing only for x230. Will test with coreboot ps2 init off and see how latest kernel behaves |
Ok.
I understand that people here are testing against x230-maximized board configurations. So I will modify the coreboot configurations in next commit to deactivate ps2 init from coreboot. It is said under ps2 Kconfig option:
x230 roms without Ps2 init from coreboot are happening here: |
Testing x230-maximized on x230 (not x230t) (fastest to test just with tpm without hotp. Neglect build errors since related to librems which I forgot to remove from CircleCI in above post). Will edit post here with results Flat 5.10.178 kernel config without coreboot ps2 init removal https://output.circle-artifacts.com/output/job/f5aa0a4c-dc69-4e3e-a9e0-71f746df14c7/artifacts/0/build/x86/x230-maximized/heads-x230-maximized-v0.2.0-1545-g41ca685.rom Same kernel config without ps2 init from coreboot https://output.circle-artifacts.com/output/job/26ccdfb5-c49f-4c1c-955e-88a584a4ba51/artifacts/0/build/x86/x230-maximized/heads-x230-maximized-v0.2.0-1546-g08140b0.rom Both has proper translated type 2 under tinycore x86_64 dd'ed iso boot No regression can be confirmed on either master or those commits on x230. Will now test on my x230t |
Testing x230-maximized on x230t (fastest to test just with tpm without hotp. Neglect build errors since related to librems which I forgot to remove from CircleCI in above post). No synaptics/trackpad detected under Tinycore 14. Switched to console (alt-f1 to get screenshots) Flat 5.10.178 kernel config without coreboot ps2 init removal https://output.circle-artifacts.com/output/job/f5aa0a4c-dc69-4e3e-a9e0-71f746df14c7/artifacts/0/build/x86/x230-maximized/heads-x230-maximized-v0.2.0-1545-g41ca685.rom Same kernel config without ps2 init from coreboot https://output.circle-artifacts.com/output/job/26ccdfb5-c49f-4c1c-955e-88a584a4ba51/artifacts/0/build/x86/x230-maximized/heads-x230-maximized-v0.2.0-1546-g08140b0.rom Sorry guys, but I cannot replicate with 5.10.178 kernel config (master is 4.14 which might be faulty). Note that next kernel/coreboot config won't have libgfxinit either, based on #1378 work conclusion and the need of going away of gnat6 on the host (to transition to Nix based buildsystem to ehlp in reproducible builds (with reproducible toolchain which is needed). |
Sadly, 5.10.178 did not fix the issue in my case.
It works fine after downgrading to 4.14-based kernel, but that's besides the point. Anyway, here's the short summary: With PS2 init enabled, it behaves just as 4.14 kernel. The only thing that seems different is the fact that
With PS2 init disabled, it always detects the keyboard as
Full logs are here, file names should be pretty self-explanatory. By the way, I'm using stock X230 keyboard, the only EC patch I applied was battery check removal. |
Damnit. Missed important point between cold/warm boot. Will have to redo tests later on since x230t cold booted shows no cbmem log and raw (x230t). Will redo and repost but the point here with this old ticket is : we do not know how to fix this on x230t. Will redo on x230 first because if I can replicate, its a new bug. Will also review crypto requirements on kernel from cryptsetup and reply back here when done. |
I recompiled the kernel with the following options set, cryptsetup is working fine now:
Can confirm that other than that, there has been no regressions for me on 5.10.178. There's one thing about this that's been bugging me for a while: are we sure that Translated Set is the correct one? |
Nevermind all of that. I dug a little deeper into systemd. I am very sorry for wasting your time on this. By the way, doesn't this mean that key mapping issue with X230T in Raw Mode is well-known and should be handled by udev? |
For OSes that are udev based, yes. :/ Up to the task? For the x230, this seem sa local regression on arch that was unfortunate. But this bug still affects x220t and x230t afaik for OSes that do not apply quirks, outside of the kernel module itself. Ideally, this should be detected correctly. Second best would be to permit to fixate this directly through i8042 driver, specifying mode needed (per platform, which we could easily put on coreboot passed to kernel boot options and on KERNEL_ADD board config option, applied on kexec call to boot into final OS. Without that, we need OSes to do the right thing, which obviously is not universal and as we just saw, can regress in time) |
Sounds like a good idea if there's nothing to be done on the Coreboot side. I'm not really familiar with raw device access in Linux, but it seems that the easiest (and probably the hackiest) way to do this is a script and SERIO_RAW kernel option that exposes raw access to all serio ports, including i8042. |
@pcm720 please try to follow the rabbit https://review.coreboot.org/c/coreboot/+/52737 Which then leads to https://review.coreboot.org/c/coreboot/+/47594 Otherwise seems related to reset. Will check the full oldconfig of 4.19 x230 to see what is there tomorrow. |
Nah, I figured that I'll need to look at Coreboot code. Right now I see two main options:
As for testing existing i8042 options, I already did that. The only thing that changes keyboard behaviour is a combination of reset and kbdreset parameters, and it does the opposite. After resets, keyboard always initializes into Raw mode. There's also |
Next steps QubesOS/qubes-issues#3306 (comment) |
Resolved with latest kernel bum + coreboot bump #1744 |
So I was excited to get heads installed and my nitrokey setup. But then realised I have some sort of bug on all three laptops. No matter the OS, if its linux it locks the screen or just doesn't do anything. Same issue on 1 x230 tablet and 2 x230 notebooks.
How can I go about fixing this? I'm not a seasoned developer so please have mercy on me.
Thank you
The text was updated successfully, but these errors were encountered: