Closed mbssrc closed 1 month ago
the nix fmt
problem is from modules/hardware/laptop.nix
. also because there is no file extension on hardware-scan
there is a new WARN emitted:
❯ nix fmt
WARN format: no formatter for path: packages/hardware-scan/hardware-scan
That's a great script. It should be a lot easier to add new targets now.
I just wanted to mention that in #686, I added a service for hot-plugging that can also dynamically enumerate input devices, find those that are not defined statically and attach them to the GUIVM. Initially, I needed it so that hot-plugged devices survive a system reboot but it turns out that it can also work for non-USB devices. I'm currently testing it but it looks like everything continues to work on my X1 even when guivmVirtioInputHostEvdevModule
is commented out.
That's a great script. It should be a lot easier to add new targets now.
I just wanted to mention that in #686, I added a service for hot-plugging that can also dynamically enumerate input devices, find those that are not defined statically and attach them to the GUIVM. Initially, I needed it so that hot-plugged devices survive a system reboot but it turns out that it can also work for non-USB devices. I'm currently testing it but it looks like everything continues to work on my X1 even when
guivmVirtioInputHostEvdevModule
is commented out.
Yes #686 is a good solution - I was actually just testing it now, may comment on it later. Getting rid of the static input device enumeration completely would simplify things a lot. My guess is that we have to keep the evdev module for some of the extra hardware dependencies though...
Tested on Lenovo-X1
nix build github:mbssrc/ghaf/hw-tooling#lenovo-x1-carbon-gen11-debug
and
nix build github:mbssrc/ghaf/hw-tooling#lenovo-x1-carbon-gen11-debug-installer
Issues found:
I think there is something wrong with camera. With this PR it seems like the camera is not working in any of the vm:s (chromium, element and trusted browser). Restarting chromium did not claim it either.
Some background for camera: There is a known problem on Lenovo-X1 that only one vm can have access to the camera at a time. The vm seems to be chosen randomly at startup between chromium, element and trusted browser. If you restart a vm from host, restarted vm should claim the camera for itself (working at least for the browsers).
Working:
udevadm verify
showed no failsAlso tried running hardware scan on X1, no problems found.
Tested on Lenovo-X1
nix build github:mbssrc/ghaf/hw-tooling#lenovo-x1-carbon-gen11-debug
andnix build github:mbssrc/ghaf/hw-tooling#lenovo-x1-carbon-gen11-debug-installer
Issues found:
I think there is something wrong with camera. With this PR it seems like the camera is not working in any of the vm:s (chromium, element and trusted browser). Restarting chromium did not claim it either.
Some background for camera: There is a known problem on Lenovo-X1 that only one vm can have access to the camera at a time. The vm seems to be chosen randomly at startup between chromium, element and trusted browser. If you restart a vm from host, restarted vm should claim the camera for itself (working at least for the browsers).
Working:
* `udevadm verify` showed no fails * installer works * test-automation passes * integrated microphone and speaker work * 3,5 mm headset works * all of the keyboard buttons that were working previously are still working (including F1, F2, F3, F5, F6 and PrtSc) * touchpad, trackpoint and mouse buttons work
Also tried running hardware scan on X1, no problems found.
Thanks - some part of the USB naming update got lost. Fixed now
Camera is working now on Lenovo-X1!
Description of changes
Adding a (temporary) hardware detection script to generate hardware definition files for different laptop hardware. The script can generate a Ghaf laptop target compatible hardware definition file (details below).
Main changes:
hardware-scan
shell script to generate a hardware definition fileChecklist for things done
x86_64
aarch64
riscv64
nix flake check --accept-flake-config
and it passesInstructions
Generate the hardware-scan package
or run directly with
nix run github:tiiuae/ghaf/<commit>#hardware-scan
Generate and run hardware-scan on a laptop
nix build .#laptop-hw-scan
dd if=/result/iso/ghaf-... of=/dev/sdX bs=32M status=progress; sync
hardware-scan
scp -r nixos@<your-ip>:~/* local-dir/
)hwinfo/
folder with dumps from udevadm, lspci, etc..nix
as basis for your hardware definitionFew words of caution:
misc
input devices, e.g., foracpi
Testing
udevadm verify
(Optional) Feel free to run the
hardware-scan
on various targets and report any findings (Optional) Report any SKU identifiers to be added to the x1 definitions