Hi,
I tried to connect my APC SmartUPS to Alpine Linux 3.14.1 with kernel
5.10.56-0-virt (x86_64) via USB. While the UPS device was recognized
by the kernel and shows up in /var/log/messages, the apcupsd cannot
find the device. The reason is /dev/usb/hiddev[0-9] is not created.
According to the manual at
http://www.apcupsd.com/manual/manual.html#verifying-device-detection-and-driver
apcupsd requires the following kernel modules to be installed:
CONFIG_USB
CONFIG_USB_HID
CONFIG_USB_HIDDEV
The first two are present, though usbhiddev is missing:
alpine:~# cat /boot/config-virt | grep CONFIG_USB_HID*
CONFIG_USB_HID=m
# CONFIG_USB_HIDDEV is not set
I would kindly ask in the upcoming build the configuration to
be changed to
CONFIG_USB_HIDDEV=y
Kind Regards, Oleksiy
On Wed, 2021-09-08 at 15:56, Oleksiy Vilny wrote:
> Hi,> > I tried to connect my APC SmartUPS to Alpine Linux 3.14.1 with kernel> 5.10.56-0-virt (x86_64) via USB. While the UPS device was recognized> by the kernel and shows up in /var/log/messages, the apcupsd cannot> find the device. The reason is /dev/usb/hiddev[0-9] is not created.> According to the manual at > http://www.apcupsd.com/manual/manual.html#verifying-device-detection-and-driver> apcupsd requires the following kernel modules to be installed:> > CONFIG_USB> CONFIG_USB_HID> CONFIG_USB_HIDDEV> > The first two are present, though usbhiddev is missing:> > alpine:~# cat /boot/config-virt | grep CONFIG_USB_HID*> CONFIG_USB_HID=m> # CONFIG_USB_HIDDEV is not set> > I would kindly ask in the upcoming build the configuration to> be changed to> > CONFIG_USB_HIDDEV=y
-virt kernels are for virtual machines (qemu and similar) and they don't
have much drivers for hardware devices enabled.
Use 'normal' kernel, those without '-virt' in package name.
> Kind Regards, Oleksiy
Hi,
8 September 2021, 16:38:50, by "Milan P. Stanić" <mps@arvanta.net>:
> On Wed, 2021-09-08 at 15:56, Oleksiy Vilny wrote:>>>> I tried to connect my APC SmartUPS to Alpine Linux 3.14.1 with kernel>> 5.10.56-0-virt (x86_64) via USB. While the UPS device was recognized>> by the kernel and shows up in /var/log/messages, the apcupsd cannot>> find the device. The reason is /dev/usb/hiddev[0-9] is not created.>> According to the manual at >> http://www.apcupsd.com/manual/manual.html#verifying-device-detection-and-driver>> apcupsd requires the following kernel modules to be installed:>> >> CONFIG_USB>> CONFIG_USB_HID>> CONFIG_USB_HIDDEV>> >> The first two are present, though usbhiddev is missing:>> >> alpine:~# cat /boot/config-virt | grep CONFIG_USB_HID*>> CONFIG_USB_HID=m>> # CONFIG_USB_HIDDEV is not set>> >> I would kindly ask in the upcoming build the configuration to>> be changed to>> >> CONFIG_USB_HIDDEV=y>> -virt kernels are for virtual machines (qemu and similar) and they don't> have much drivers for hardware devices enabled.> Use 'normal' kernel, those without '-virt' in package name.>
We have a need to control APC UPS from within virtual environment
and would really like to avoid solution with non -virt Alpine flavour
because of hard memory limits we have. Trying to keep virtual machine
memory footprint as low as possible we have to use -virt flavour.
Maybe Natanael Copa could help with it?
Thank you.
Hi,
On 2021-09-09 10:01:21 +0300, Oleksiy Vilny wrote:
> We have a need to control APC UPS from within virtual environment> and would really like to avoid solution with non -virt Alpine flavour> because of hard memory limits we have. Trying to keep virtual machine> memory footprint as low as possible we have to use -virt flavour.
I wonder if this is not a use case so specific that it warrants you just
building your own kernel package that would suit your needs. It is
likely you would be able to strip it down even more that -virt is.
W.
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
Hi,
I support this; if you need a minimal memory footprint, then Alpine’s stock kernels are really not a good choice – it’s better to build your own with just the modules you need. You can copy linux-lts aport, modify it for your needs and use it to build your own kernel package.
Jakub
On 9/12/21 12:07 PM, Wolf wrote:
> Hi,> > On 2021-09-09 10:01:21 +0300, Oleksiy Vilny wrote:>> We have a need to control APC UPS from within virtual environment>> and would really like to avoid solution with non -virt Alpine flavour>> because of hard memory limits we have. Trying to keep virtual machine>> memory footprint as low as possible we have to use -virt flavour.> > I wonder if this is not a use case so specific that it warrants you just> building your own kernel package that would suit your needs. It is> likely you would be able to strip it down even more that -virt is.> > W.>
> ... modify it for your needs and use it to build your own kernel package.
I have done this in the past. It is very easy:
# on the target machine, capture loaded modules:
$ lsmod > my-lsmod
# copy my-lsmod to the build machine, then
# run this in a kernel source tree:
$ make LSMOD=my-lsmod localyesconfig
That will produce a config with just the modules you have loaded (and set to =y instead of =m).
Then copy into your copy of the aports tree and add a new build flavor and you are basically done.
08.09.2021 16:14, Milan P. Stanić пишет:
> On Wed, 2021-09-08 at 15:56, Oleksiy Vilny wrote:>> Hi,>>>> I tried to connect my APC SmartUPS to Alpine Linux 3.14.1 with kernel>> 5.10.56-0-virt (x86_64) via USB. While the UPS device was recognized>> by the kernel and shows up in /var/log/messages, the apcupsd cannot>> find the device. The reason is /dev/usb/hiddev[0-9] is not created.>> According to the manual at>> http://www.apcupsd.com/manual/manual.html#verifying-device-detection-and-driver>> apcupsd requires the following kernel modules to be installed:>>>> CONFIG_USB>> CONFIG_USB_HID>> CONFIG_USB_HIDDEV>>>> The first two are present, though usbhiddev is missing:>>>> alpine:~# cat /boot/config-virt | grep CONFIG_USB_HID*>> CONFIG_USB_HID=m>> # CONFIG_USB_HIDDEV is not set>>>> I would kindly ask in the upcoming build the configuration to>> be changed to>>>> CONFIG_USB_HIDDEV=y> > -virt kernels are for virtual machines (qemu and similar) and they don't> have much drivers for hardware devices enabled.
Well, its not only kernel modules issue, but i run into trouble with
cirrus xorg driver on recent alpine. There is no cirrus xorg driver at
all in 3.14.x
But no-one cares. I just avoid using alpine in my vm. :)
> Use 'normal' kernel, those without '-virt' in package name.> >> Kind Regards, Oleksiy>
--
WBR, Eleksir