1 1
matteobp

Apcupsd doesn't work on Odroid XU4

Recommended Posts

Hi.
I have a Odroid XU4 with Ubuntu Bionic latest release (5.60), powered with this UPS: APC SmartUPS 750 VA.
Apcupsd doesn't work. The problem seems related to the missing /dev/usb/hiddev0.

 

After searching on Google, I found that apcupsd requires this feature enabled in the kernel.
CONFIG_USB_HIDDEV=Y

 

I build my own kernel enabling it, but no change.
Here the output of the command

# dmesg | grep Smart

[    4.125553] usb 1-1.2: Product: Smart-UPS 750 FW:651.13.I USB FW:7.3
[    4.205622] hid-generic 0003:051D:0002.0001: hidraw0: USB HID v1.10 Device [American Power Conversion Smart-UPS 750 FW:651

On the Rock64 board it works without problem.

Here the output of the command

# dmesg | grep Smart

[    2.175796] usb 3-1: Product: Smart-UPS 750 FW:651.13.I USB FW:7.3
[    3.719981] hid-generic 0003:051D:0002.0001: hiddev0,hidraw0: USB HID v1.10 Device [American Power Conversion Smart-UPS 750 FW:651.13.I USB FW:7.3] on usb-ff5d0000.usb-1/input0

As you can see, on the Rock64 board there is hiddev0

hid-generic 0003:051D:0002.0001: hiddev0,hidraw0

and /dev/usb/hiddev0 exists.

 

In the Odroid forum, I found only this post about CONFIG_USB_HIDDEV
https://forum.odroid.com/viewtopic.php?f=93&t=28978

 

Thanks in advance.

 

Share this post


Link to post
Share on other sites

Bionic and Stretch share kernel. Try to compare working (rock64) with nonworking configuration ... perhaps some other config option is needed or there is a bug in Odroid USB stack. You can also switch between different kernels for XU4 if that helps ...

Wrote on mobile

Share this post


Link to post
Share on other sites
46 minutes ago, Igor said:

You can also switch between different kernels for XU4 if that helps

 

Can you help me? How can I do it?

 

On the Rock64 I have the ayufan Stretch image 0.6.44, kernel 4.4.132. I have to search in that kernel configuration.

And I can try the Rock64 Armbian image to check if apcuspd works with it.

 

Thanks

 

Share this post


Link to post
Share on other sites
41 minutes ago, matteobp said:

And I can try the Rock64 Armbian image to check if apcuspd works with it. 

 

Yes, it works. So I can use the kernel configuration of the Rock64 board, I think this one

linux-rockchip-next.config

 

But it not simple, too many differences ... :-(

 

Share this post


Link to post
Share on other sites
1 minute ago, matteobp said:

But it not simple, too many differences ... :-(


It can be time-consuming, yes. Now you know how my days look like :) 

 

2 minutes ago, matteobp said:

linux-rockchip-next.config


Negative. linux-rockchip64-default.config

Share this post


Link to post
Share on other sites

I tried this image, and it works.

https://forum.odroid.com/viewtopic.php?f=95&t=30888

 

[    7.201747] usb 3-1.2.2: Product: Smart-UPS 750 FW:651.13.I USB FW:7.3
[    7.321793] hid-generic 0003:051D:0002.0004: hiddev97,hidraw3: USB HID v1.10 Device [American Power Conversion Smart-UPS 750 FW:651.13.I USB FW:7.3] on usb-xhci-hcd.3.auto-1.2.2/input0

 

All posts I found about hiddev feature are based on old kernel, and refers to CONFIG_USB_DEVICEFS that is deprecated.

 

Can I add a new post under Development section about enabling hiddev node in the kernel, or would it be considered a duplicate post?

 

Thanks.

 

Share this post


Link to post
Share on other sites

Sure, I won't miss it.

 

The problem is that enabling option CONFIG_USB_HIDDEV is not enough, something is still missing.

I wanted to create a specific post in a general section because maybe someone else knows how to do it, but no problem.

 

I'll try to compare the configuration kernel file of the other Ubuntu distribution, which I think is more similar to the Odroid XU4 Armbian configuration file than the Rock64 configuration file.

 

Thanks

 

Share this post


Link to post
Share on other sites

After several unsuccessful attempts, I decided to use the kernel configuration file of the "Ubuntu MATE 18.04 LTS" as it is, without any change, because in that distribution apcupsd works and the node /dev/usb/hiddev0 exists.

 

Regretfully, it doesn't work on Armbian :(:(:(

 

So my conclusion is that the problem is not just about the kernel, but there must be something else, and I have no idea what it might be.


So I had to change and move on to the "Ubuntu Minimal 18.04 LTS" with XFCE Desktop Environment, and it works.

https://wiki.odroid.com/odroid-xu4/os_images/linux/ubuntu_4.14/20180531

 

Share this post


Link to post
Share on other sites

I can also confirm that I've had this issue for some time.

 

For me, the issue started around the time of the introduction of the 4.x series of kernels, on all distros for the XU4.  When that change occurred, APCUPSD stopped working. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1