You are not logged in.
This is about the AUR package https://aur.archlinux.org/packages/activdriver/
It worked (at least on i686) until some time ago, but now, it doesn't work anymore. That driver is for using "activboards" made by promethean as input devices.
What I found out yet:
The package installs - apart from others - the file /usr/bin/promethean.sh (*)
That script includes:
if [ "`id -u`" == "0" ]; then
#make sure evdev is loaded first
(/sbin/lsmod|grep -iq evdev) || modprobe evdev
#add the promethean drivers if not there
(/sbin/lsmod|grep -iq promethean) || modprobe promethean
fi
so I suppose it should be possible to modprobe promethean.
But:
$ modprobe promethean
modprobe: FATAL: Module promethean not found.
So I searched where the promethean driver is, and found it here:
/usr/lib/modules/extramodules-3.10-lts/promethean.ko.gz
(I'm using the lts kernel because of the 32bit suspend issues with 3.11)
I'm not exatly sure, whether this is the right place for that file, as there is no other .ko.gz file in /usr/lib/modules/extramodules-3.10-lts.
Could I be right? Or what other reasons can cause the driver not to work?
Sorry, I got very few knowledge about drivers / kernel modules yet and don't know even where to start.
Thanks.
(*) Full version of promethean.sh: here: http://pastebin.com/ntf3S5xh
Last edited by Carl Karl (2013-11-06 08:31:50)
Offline
I suggest you compare the activdriver package with an official package that installs a kernel module, like nvidia-lts .
some hints to get you started :
- look at the nvidia-lts.install file
- kernel modules need to be build against a specific kernel, the convention is to add a suffix that indicates which kernel a package is intended for.
if no suffix is present, the package is intended for the arch stock kernel.
- check where nvidia-lts places the module
also look at /usr/lib/modules/3.11.6-1-ARCH/kernel folder structure (or usr/lib/modules/3.10.18-1-lts/kernel/ for the lts kernel)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
"it doesn't work anymore" is no use. HOW does it not work?
Offline
short version:
using
/usr/lib/modules/extramodules-3.10-lts/kernel/drivers/input/tablet/promethean.ko.gz
(inspired by nvidia-lts package + activdriver PKGBUILD) instead of
/usr/lib/modules/extramodules-3.10-lts/promethean.ko.gz
didn't work (still not listed in lsmod),
but using insmod instead of modprobe at least didn't result in an error. will test @ activboard tomorrow.
(see below for details)
long version:
@tomk:
before: controling mouseposition by touching activboard was possible
now: controling mouseposition by touching activboard isn't possible.
Possible reason: module "promethean" isn't loaded, see my modprobe output above.
@Lone_Wolf:
Thanks for your hint. nvidia-lts places a file called nvidia.ko.gz in
/usr/lib/modules/extramodules-3.10-lts/kernel/drivers/video/nvidia.ko.gz
in contrast, the file placed by "activdriver" is:
/usr/lib/modules/extramodules-3.10-lts/promethean.ko.gz
as in the PKGBUILD is written:
_extmoddir=$(uname -r | sed "s@\([0-9]*\.[0-9]*\)\.[0-9]*-[0-9]*\(.*\)@\1\2@")
if [ -d /lib/modules/extramodules-${_extmoddir} ]; then
_moddir="/lib/modules/extramodules-${_extmoddir}"/
else
_moddir="/lib/modules/$(uname -r)"/kernel/drivers/input/tablet/
fi
I placed it in
/usr/lib/modules/extramodules-3.10-lts/kernel/drivers/input/tablet/promethean.ko.gz
instead, rebooted, but again, promethean isn't listed in lsmod.
Researching a bit further I found a hint about using insmod instead of modprobe, so I extracted promethean.ko.gz and did in that directory:
sudo insmod promethean.ko
which resulted in no output.
Which is at least no error output! :-)
Today, I'm at home now and can't test it (activboard@work), but I'll report tomorrow whether it worked...
Last edited by Carl Karl (2013-11-05 16:07:13)
Offline
One reboot later:
$ modprobe promethean
modprobe: ERROR: could not insert 'promethean': Operation not permitted
so changing the directory did help but I didn't notice before?
sudo modprobe promethean
leads at least to promethean being listed in lsmod, which sound good.
So I only have to:
1. test whether it is really working wth the hardware
2. find out why the Operation not permitted error occurs before
3. edit the PKGBUILD to do all that automatically.
Sounds solveable... :-)
Offline
2. find out why the Operation not permitted error occurs before
OK, solved. Learned from there:
create
/etc/modules-load.d/promethean.conf
containing just the word
promethean
makes the module loaded in boot time, it is now listed by lsmod.
Offline
3. edit the PKGBUILD to do all that automatically.
here it is:
# Maintainer: Christian Bühler <....>
# Contributor: Zsolt Udvari <....>
pkgname=activdriver
pkgver=5.8.46
pkgrel=1
pkgdesc="The kernel mode and X11 drivers for Promethean ActivBoard and ActivHub."
arch=('i686' 'x86_64')
url="http://activsoftware.co.uk/linux/repos/ubuntu/dists/precise/Release"
license=('unknown')
makedepends=(linux-headers)
install=$pkgname.install
if [ "$CARCH" = "i686" ]; then
_arch='i386'
_md5sum='e2336497217283d9493f0231f0f8e9e2'
elif [ "$CARCH" = "x86_64" ]; then
_arch='amd64'
_md5sum='1d373dd00e23e082e4c4be689fec8123'
fi
source=(http://activsoftware.co.uk/linux/repos/ubuntu/pool/oss/a/$pkgname/${pkgname}_$pkgver-13~ubuntu~1204_$_arch.deb
10-promethean.conf)
md5sums=( $_md5sum
'11effc25fd592acacb9f9f3108618963')
build() {
tar xf data.tar.gz
make -C /lib/modules/$(uname -r)/build SUBDIRS="$srcdir/usr/src/promethean/kernel" modules
sed -i "s%KERN_INC = /usr/src/promethean%KERN_INC = ..%" usr/src/promethean/activlc/Makefile
BUILD=release make -C usr/src/promethean/activlc
sed -i s%/usr/local/bin/%%g usr/bin/promethean.sh
}
package() {
mkdir -p $pkgdir/usr
cp -r etc lib $pkgdir
cp -r usr/bin usr/lib usr/share $pkgdir/usr
install -D usr/src/promethean/activlc/release/activlc $pkgdir/usr/bin/activlc
_extmoddir=$(uname -r | sed "s@\([0-9]*\.[0-9]*\)\.[0-9]*-[0-9]*\(.*\)@\1\2@")
_moddir="/lib/modules/extramodules-${_extmoddir}"/kernel/drivers/input/tablet/
install -m644 -D usr/src/promethean/kernel/promethean.ko \
$pkgdir${_moddir}/promethean.ko
find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
install -D 10-promethean.conf $pkgdir/etc/X11/xorg.conf.d/10-promethean.conf
mkdir -p $pkgdir/etc/modules-load.d
cd $pkgdir/etc/modules-load.d
touch promethean.conf
echo "promethean" > promethean.conf
}
or just the diff:
--- PKGBUILD-original
+++ PKGBUILD-modification
@@ -35,13 +35,14 @@
cp -r usr/bin usr/lib usr/share $pkgdir/usr
install -D usr/src/promethean/activlc/release/activlc $pkgdir/usr/bin/activlc
_extmoddir=$(uname -r | sed "s@\([0-9]*\.[0-9]*\)\.[0-9]*-[0-9]*\(.*\)@\1\2@")
- if [ -d /lib/modules/extramodules-${_extmoddir} ]; then
- _moddir="/lib/modules/extramodules-${_extmoddir}"/
- else
- _moddir="/lib/modules/$(uname -r)"/kernel/drivers/input/tablet/
- fi
+ _moddir="/lib/modules/extramodules-${_extmoddir}"/kernel/drivers/input/tablet/
+
install -m644 -D usr/src/promethean/kernel/promethean.ko \
$pkgdir${_moddir}/promethean.ko
find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
install -D 10-promethean.conf $pkgdir/etc/X11/xorg.conf.d/10-promethean.conf
+ mkdir -p $pkgdir/etc/modules-load.d
+ cd $pkgdir/etc/modules-load.d
+ touch promethean.conf
+ echo "promethean" > promethean.conf
}
so only
1. test whether it is really working wth the hardware
is left. I'll see tomorrow...
Offline
1. test whether it is really working with the hardware
It works! :-)
Thanks for your help!
Offline
Carl Karl, glad you solved everything.
a comment about the PKGBUILD : on arch it's mostly frowned upon if packages automate things that should be user-controlled.
if you do upload this to AUR, i suggest to remove the lines that make the module autoloading.
(how to autoload modules at boot is covered on the arch 'kernel modules' wiki page).
If you decide to keep them, add a message to the install file to inform users that the module is autoloaded at boot.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Lone_Wolf, thanks for your suggestion, but there is one thing I don't understand:
If I want to autoload that module, but it isn't included in the PKGBUILD, I would have to create /etc/modules-load.d/promethean.conf myself, right?
But in that case, /etc/modules-load.d/promethean.conf is a file not managed by pacman, and as I think I remember to have red here that files not managed by pacman are a bad thing, aren't they?
Offline
They are bad in /usr. They are fine in /etc.
Offline
Ah, OK, now I understand, I think. Thanks!
Offline
Lone_Wolf, thanks for your suggestion, but there is one thing I don't understand:
If I want to autoload that module, but it isn't included in the PKGBUILD, I would have to create /etc/modules-load.d/promethean.conf myself, right?
But in that case, /etc/modules-load.d/promethean.conf is a file not managed by pacman, and as I think I remember to have red here that files not managed by pacman are a bad thing, aren't they?
files that are from packages usally don't live in '/etc' (except default configs) look at the 'nvidia' package for example.
Linux odin 3.13.1-pf #1 SMP PREEMPT Wed Mar 5 21:47:28 CET 2014 x86_64 GNU/Linux
Offline