You could download the PKGBUILD and source it, which would put the dependencies in the depends variable in your script. Still slightly hacky, but at least you'd avoid grep and awk.
Regarding power management, TLP was all I needed on my C720 to get that insane battery life.
I also tried doing power saving for the wifi driver, but I found it to be unstable at the time, so I disabled it. It's been probably over a year since I last tried it, so the situation may be different now in newer kernels.
Ah, that's weird. All of my keyboards have a product attribute for that device that has the word "keyboard" in it somewhere.
In any case, you can actually more reliably match keyboards if you look at the bInterface* attributes of one of the children of the smallest path. lsusb -v should also have some useful output regarding the bInterface* values.
Ah, I missed the --attribute-walk flag in your original post, but it looks like the -q flag negates it, so just get rid of it and try again with the smallest path.
You didn't use the smallest path in your original post. The smallest path would be /devices/pci0000:00/0000:00:14.0/usb3/3-2.
Also, using the -a flag with udevadm info as I suggested will give you attributes of the device that you won't get with your original call to udevadm info.
Use udevadm monitor to get the base path (i.e. the smallest path) of the device when you plug in the keyboard. Then get all attributes of that device path with this command:
udevadm info -a -p <device-path>
It shouldn't be too hard to find attributes that you can use to uniquely identify USB keyboards. Note that the above command will also give you attributes of the parent devices, but you can ignore those.
I wrote a little system monitor to run inside the xfce4 genmon plugin, since I couldn't really find a simple one that fit my needs. The system monitor is multithreaded and runs in the terminal, so it should be usable with anything that is able to display output from the terminal, including, well, the terminal!
If there's any interest in the system monitor, then just let me know, and I'll throw it up on github.
I've been using Arch for about 6 months now, and I can tell you that it's (almost) the best distro I've ever used. I use Arch on a daily basis for all the reasons that have already been given (latest packages, ease of configuration, amazing community, etc.). Arch on my laptop has been pretty stable for me, minus a few problems that I've had here and there involving my wireless and function keys, all of which were caused by updates. Mind you, these problems were relatively easy to fix, thanks to Arch's KISS philosophy, but they got me wondering whether it was really worth it to have all the latest software if that meant having to fix breakages every so often. What I'm starting to realize is that I don't really need the latest and greatest software; all I need is a secure and stable system that I can configure once and then leave alone.
That's why I've started to play around with Slackware. The philosophy behind Slackware is that after you do the initial installation and configuration of your system, it should theoretically run forever without any breakages at all. Other than getting security updates, you should be wary of getting new versions of packages unless they have some new feature that you require, because newer is not necessarily better. Of course, a distribution upgrade in Slackware would be a little more involved than a 'pacman -Syu', but at least Slackware doesn't try to mess with your config files, unlike other distros I could name (cough UBUNTU).
The bottom line here is whether you value having the latest software over rock solid stability and reliability. Even if you're not sure, Arch is still a safe bet, as I and most other people in this thread can attest to.
You could download the PKGBUILD and source it, which would put the dependencies in the
dependsvariable in your script. Still slightly hacky, but at least you'd avoid grep and awk.Makepkg can't manage AUR deps. We'd need to see your script and know the exact error you're getting in order to help you.
Regarding power management, TLP was all I needed on my C720 to get that insane battery life.
I also tried doing power saving for the wifi driver, but I found it to be unstable at the time, so I disabled it. It's been probably over a year since I last tried it, so the situation may be different now in newer kernels.
Ah, that's weird. All of my keyboards have a
productattribute for that device that has the word "keyboard" in it somewhere.In any case, you can actually more reliably match keyboards if you look at the bInterface* attributes of one of the children of the smallest path.
lsusb -vshould also have some useful output regarding the bInterface* values.Ah, I missed the
--attribute-walkflag in your original post, but it looks like the-qflag negates it, so just get rid of it and try again with the smallest path.You didn't use the smallest path in your original post. The smallest path would be
/devices/pci0000:00/0000:00:14.0/usb3/3-2.Also, using the
-aflag withudevadm infoas I suggested will give you attributes of the device that you won't get with your original call toudevadm info.Use
udevadm monitorto get the base path (i.e. the smallest path) of the device when you plug in the keyboard. Then get all attributes of that device path with this command:It shouldn't be too hard to find attributes that you can use to uniquely identify USB keyboards. Note that the above command will also give you attributes of the parent devices, but you can ignore those.
It would help if you outlined exactly what you tried and the exact error messages you got.
Thanks :)
I wrote a little system monitor to run inside the xfce4 genmon plugin, since I couldn't really find a simple one that fit my needs. The system monitor is multithreaded and runs in the terminal, so it should be usable with anything that is able to display output from the terminal, including, well, the terminal!
If there's any interest in the system monitor, then just let me know, and I'll throw it up on github.
I've been using Arch for about 6 months now, and I can tell you that it's (almost) the best distro I've ever used. I use Arch on a daily basis for all the reasons that have already been given (latest packages, ease of configuration, amazing community, etc.). Arch on my laptop has been pretty stable for me, minus a few problems that I've had here and there involving my wireless and function keys, all of which were caused by updates. Mind you, these problems were relatively easy to fix, thanks to Arch's KISS philosophy, but they got me wondering whether it was really worth it to have all the latest software if that meant having to fix breakages every so often. What I'm starting to realize is that I don't really need the latest and greatest software; all I need is a secure and stable system that I can configure once and then leave alone.
That's why I've started to play around with Slackware. The philosophy behind Slackware is that after you do the initial installation and configuration of your system, it should theoretically run forever without any breakages at all. Other than getting security updates, you should be wary of getting new versions of packages unless they have some new feature that you require, because newer is not necessarily better. Of course, a distribution upgrade in Slackware would be a little more involved than a 'pacman -Syu', but at least Slackware doesn't try to mess with your config files, unlike other distros I could name (cough UBUNTU).
The bottom line here is whether you value having the latest software over rock solid stability and reliability. Even if you're not sure, Arch is still a safe bet, as I and most other people in this thread can attest to.
End of this list.
Back to top