LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-01-2016, 07:03 PM   #16
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 2,048

Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310

That output confirms that your custom kernel is missing kernel support for this device. You need to build a kernel with that module (and possibly others for other device support).

Last edited by ferrari; 06-01-2016 at 07:05 PM.
 
Old 06-03-2016, 09:03 PM   #17
Sam_Rosewood
LQ Newbie
 
Registered: May 2016
Posts: 19

Original Poster
Rep: Reputation: Disabled
After two days of testing, I think that I started to understand :-) Let me tell this in order.
Originally, I had Ubuntu with last kernel updates (4.4.0-22) on my desktop, and I have tried to make a custom build with updating kernel to 4.4.0-22 by
apt-get dist-upgrade
in chroot and removing old kernel for economy by
apt-get purge -y linux-image-extra-4.4.0-21-generic linux-headers-4.4.0-21 linux-headers-4.4.0-21-generic linux-image-4.4.0-21-generic
But USB mouse didn't work with it. After
sudo modprobe hid-a4tech
terminal said
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-21-generic/modules.dep.bin'.
modprobe: FATAL: Module hid-a4tech not found in directory lib/modules/4.4.0-21-generic

I guess, Ubuntu refers onto old kernel folder.

I made an experiment. I re-installed Ubuntu with 4.4.0-21 kernel on my desktop and disabled updates. Then I made custom build on it, with kernel 4.4.0-21 too (without any updates). And it worked! My USB mouse worked! But only on 4.4.0-21.
And next, I tried to get build with updates. I updated Ubuntu on the desktop to 4.4.0-22 and used commands in chroot for making a build
apt-get -y dist-upgrade
depmod
apt-get purge -y linux-image-extra-4.4.0-21-generic linux-headers-4.4.0-21 linux-headers-4.4.0-21-generic linux-image-4.4.0-21-generic

But there was a same message about "Module hid-a4tech not found in directory lib/modules/4.4.0-21-generic"

Does somebody know how to initialize modules in chroot onto updated kernel and remove this link onto old one?

P.S. By comparison, I made "sudo modprobe hid-a4tech" on Ubuntu in my real desktop, before and after updating. On both kernels, 4.4.0-21 and 4.4.0-22, it didn't show any messages. Does chroot have its own analogue of reboot or something?
 
Old 06-03-2016, 10:18 PM   #18
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 2,048

Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
I recommend reviewing the way you're building the custom kernel

https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
https://help.ubuntu.com/community/Kernel/Compile
 
Old 06-03-2016, 10:36 PM   #19
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 7,653
Blog Entries: 10

Rep: Reputation: Disabled
http://www.berkes.ca/guides/linux_kernel.html
 
Old 06-04-2016, 02:07 PM   #20
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,073
Blog Entries: 1

Rep: Reputation: 669Reputation: 669Reputation: 669Reputation: 669Reputation: 669Reputation: 669
The 16.04 release has apt-file now.

$ sudo apt-get install apt-file
$ sudo apt-file update
$ apt-file find hid-a4tech

One way to find packages you're missing. Although with custom kernels you might need to grep the /boot/config. Otherwise:

$ sudo apt-get install xserver-xorg-input-all

And if you use the ubuntu desktop:

$ sudo apt-get install unity
== FAIL!!!!!!!

$ sudo apt-get install ubuntu-desktop
== better odds.

From my experience of doing a debootstrap install of 16.04. More of a 15.## upgraded to 16.04 since the debootstrap package in ubuntu lacked the xenial script until almost a week after it was released.
 
Old 06-09-2016, 08:32 PM   #21
Sam_Rosewood
LQ Newbie
 
Registered: May 2016
Posts: 19

Original Poster
Rep: Reputation: Disabled
OK, sorry for late reply.
After a few more tests, I didn't found another solution but making a build without kernel updating. And I am not excited by the idea of compiling the kernel from source, leastwise now.
But anyway, thanks everybody for the help! Maybe somebody will find how to update the kernel without braking USB mouse.
 
Old 06-10-2016, 12:27 PM   #22
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,073
Blog Entries: 1

Rep: Reputation: 669Reputation: 669Reputation: 669Reputation: 669Reputation: 669Reputation: 669
In general your can take your distros config.

Paraphrased via:
https://debian-handbook.info/browse/...mpilation.html

$ cd /home/user/linux/kernel/
(assumes you've already gotten and extracted the kernel sources to said location)
$ make mrproper
$ cp /boot/config /home/user/linux/kernel/.config
$ make oldconfig
(push enter a lot for defaults. Prompted for changes in the new kernel)
$ make menuconfig
(or make xconfig, mostly to verify your preferences. Or to target your specific CPU for compatibility and that 1% performance gain)

And then the usual build stuff. Various distro specific ways to keep your package management system in play. Package kernel-package for make-kpkg which is old way. Using make deb-pkg is the new way in debian based systems. Be prepared for it to take a long time and chew up a lot of space (10G's?).

$ make deb-pkg
$ cd ../
$ sudo dpkg -i whatever_got_generated*.deb

Ubuntu tends to have all the same tools as debian so it should work over there too. Otherwise follow the instructions included in the kernel sources. And reference the ./doc/ tree for further insight. It's not something one needs to do much these days unless you're using bleeding edge hardware. Or deal in the kernel development paradigm.

Be prepared to install things you might not have installed. Especially if you didn't apt-get install build-essential devscripts kernel-package when you built up your current install. Having apt-file installed helps to find the packages you might be missing when you get an error. Instead of blindly installing everything until it magically works.
 
Old 06-10-2016, 07:03 PM   #23
jefro
Moderator
 
Registered: Mar 2008
Posts: 16,676

Rep: Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454
You should be able to install the driver using modprobe. http://www.cyberciti.biz/faq/add-rem...ernel-modules/
 
Old 06-10-2016, 07:34 PM   #24
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 2,048

Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
Quote:
You should be able to install the driver using modprobe. http://www.cyberciti.biz/faq/add-rem...ernel-modules/
Post #15 already confirmed that the custom kernel did not have the module present. That's the OP's issue with building the kernel.
 
Old 06-10-2016, 09:16 PM   #25
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 7,653
Blog Entries: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
Post #15 already confirmed that the custom kernel did not have the module present. That's the OP's issue with building the kernel.
Wouldn't the option for that module that's not present show it'self during the configuration of the kernel just before running 'make modules'?

If OP is using the same kernel version than all he'd have to do is cp the driver module to the initrd directory and rebuild the initrd. Right?
 
Old 06-10-2016, 09:17 PM   #26
jefro
Moderator
 
Registered: Mar 2008
Posts: 16,676

Rep: Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454
So, did he install the module???
Post #2 stated that it was either usb or mouse issue.

Pretty sure you simply add insert the module without compiling the kernel. There are three basic ways to add in a driver for the most part. One is to use native kernel, second is to add on in user space, third is a way for some drivers using ndiswrapper.

Last edited by jefro; 06-10-2016 at 09:19 PM.
 
1 members found this post helpful.
Old 06-10-2016, 11:28 PM   #27
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 2,048

Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
It was established that the hid-a4tech is missing from the custom kernel, and yes the OP should be able to compile a single in-tree kernel module. I would expect to see /usr/src/linux/.config contain something like 'CONFIG_HID_A4TECH=m'
but assume instead it is commented instead eg '# enable HID_A4TECH module: CONFIG_HID_A4TECH=m'.

So...
Code:
make oldconfig
Edit .config as required so that 'CONFIG_HID_A4TECH=m', then
Code:
make modules_prepare
make SUBDIRS=scripts/mod
make SUBDIRS=drivers/hid/hid_a4tech modules
cp drivers/hid/hid_a4tech/hid_a4tech.ko /lib/modules/$(uname -r)/kernel/drivers/hid/
depmod
Now it should be possible to load it with
Code:
modprobe hid_a4tech
Reference (see single module build example)
https://wiki.emulab.net/wiki/ubuntu-kernel-build
 
Old 06-10-2016, 11:34 PM   #28
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 2,048

Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
Quote:
If OP is using the same kernel version than all he'd have to do is cp the driver module to the initrd directory and rebuild the initrd. Right?
Yes, I guess so.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB mouse doesn't work The Real Bev Slackware 8 12-13-2010 08:37 PM
USB mouse doesn't work wei Linux - Hardware 0 08-30-2006 09:18 AM
USB Mouse Doesn't Work elamigo2004 Linux - Software 16 08-26-2006 02:20 AM
USB mouse doesn't work under Mepis 3.4.3 LQer928 MEPIS 1 02-23-2006 07:31 AM
USB Mouse Scrollwheel Doesn't work alan_daniel Linux - Hardware 4 07-06-2005 12:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration