Skip to content
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

Swap fn and Ctrl key (t430s) #711

Closed
Siproqu opened this issue May 2, 2020 · 8 comments
Closed

Swap fn and Ctrl key (t430s) #711

Siproqu opened this issue May 2, 2020 · 8 comments

Comments

@Siproqu
Copy link

Siproqu commented May 2, 2020

I successfully built heads for my T430s (pull requests are coming soon). As the fn and ctrl key are swapped on this model (the ctrl key is not under to the shift key) it is extremely annoying to use Qubes with its ctrl+shift+c/v shortcuts.

Usually people using the nvramcui to swap them. But how should I do it in Heads?
Do I have to rebuilt Heads with nvramcui enabled in the coreboot settings? Or is there another way?

@Siproqu
Copy link
Author

Siproqu commented May 19, 2020

It is possible to patch the cmos layout in the coreboot source. Unfortunately I get lost in the Heads source code and couldn't find out how to add an additional option for the patch.
Pull request

@Siproqu
Copy link
Author

Siproqu commented May 30, 2020

Solution:
Build Heads with the CONFIG_USE_OPTION_TABLE=y option in the coreboot-t430s.config and copy this patch file into heads/patches/coreboot-4.8.1/

@copyvar
Copy link

copyvar commented Jan 9, 2022

I have the same issue, but I am on x230 with a classic keyboard (https://www.thinkwiki.org/wiki/Install_Classic_Keyboard_on_xx30_Series_ThinkPads). I was suggested to apply the fn and ctrl swap via nvramtool (see
#1087 (comment)). I need some help in applying, as I am not skilled enough to do it on my own. Should I run nvramtool from dom0? What commands to I need to run?

@Siproqu
Copy link
Author

Siproqu commented Jan 9, 2022

I was suggested to apply the fn and ctrl swap via nvramtool.

Have you followed the instructions on this page?

If not, do this first:

  • Run a disposableVM and install the build tools in it:
    • sudo dnf groupinstall "Development Tools" "Development Libraries"
    • sudo dnf install git
  • Build nvramtool as described in the link under "Manual Installation".
  • Copy the nvramtool executable to dom0.
  • Execute it in dom0 and change your settings (./nvramtool -h will explain how to change a setting).

Please keep in mind: Executing nvramtool in dom0 might be a threat to your system security.
If you run Qubes simply for the fun and curiosity its fine I guess. But only you know that.

If this did not work, you can still rebuild Heads with the changed cmos settings (swapped fn&ctrl key and the like) and flash it again.
I've wrote a description how to do it here:
https://github.com/Siproqu/heads-wiki/blob/T430s-guides/Installing-and-Configuring/Building-Heads/t430s.md#bios-options

Hope this helps. A more simple step by step explanation takes to much time for me as well unfortunately. The best I can do at the moment is already covered in my wiki linked above.

@tlaurion
Copy link
Collaborator

tlaurion commented Jan 9, 2022

@Siproqu is there a PR to merge upstream?

@Siproqu
Copy link
Author

Siproqu commented Jan 9, 2022

@tlaurion

@Siproqu is there a PR to merge upstream?

Yes there is: linuxboot/heads-wiki#77
Haven't you seen it? I was under the impression you wait with merging until I tested #1019 with the T430 blobs as requested (which I'll hopefully be able to do in the next weeks).

@tlaurion
Copy link
Collaborator

@Siproqu yes sorry, just totally forgot about it!

Interesting that you could just hexedit Mac address in both sections. Will test this on x230 soon

@copyvar
Copy link

copyvar commented Jan 12, 2022

I did

git clone https://github.com/osresearch/heads
git clone https://github.com/coreboot/coreboot.git
nano coreboot/src/mainboard/lenovo/x230/cmos.default 
git diff cmos.default > ~/heads/patches/coreboot-4.14/0061-cmos-settings.patch
cd ~/heads/
./blobs/xx30/download_clean_me.sh -m $(readlink -f ./blobs/xx30/me_cleaner.py)
make BOARD=x230-hotp-maximized

what results in

build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1134-gfba79ab-dirty.rom
build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1134-gfba79ab-dirty-bottom.rom
build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1134-gfba79ab-dirty-top.rom

Is that correct? I am confused about "dirty".

@tlaurion tlaurion changed the title Swap fn and Ctrl key Swap fn and Ctrl key (t430s) Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants