You are not logged in.
Hey All,
I am not sure where else to ask this question so I hope that here is okay.
I am wanting to learn more about interfacing with hardware. I guess that this might mean some kind of kernel based API or something but I am not sure what search terms I can use to find this information.
Some of the hardware I would like to learn to interface with are things like Laptop LID switches, USB Interface detection (knowing what device is connected and then changing settings based in that etc. (i.e. if a USB-C dock with display connected turn off inbuilt display and lid switch))
I am open to looking at any and all resources, I just don't know where to start or what it actually is that I am attempting to do. Like is it hardware interfacing or kernel interaction or something else entirely. So I hope you might be able to help me find my feet and my next steps.
Thank's in advanced and sorry if I have posted in the wrong place
Offline
If this is just about, how linux reacts to a device and what or whether you can do something based on a given device appearing then the place to look at is udev and udev rules.
Start in the wiki: https://wiki.archlinux.org/title/Udev and then look at the further links at the bottom at the page should give you some good pointers. If you need more specific pointers then you'll need to ask more specific questions. FWIW regarding lid switch and power buttons https://wiki.archlinux.org/title/Power_ … th_systemd contains some information (in fact that whole page will have some pointers in that direction)
Offline