Unable to free the keyboard irq line: Device or resource busy
I was writing a sample request_irq code
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
MODULE_LICENSE("GPL");
int irq = 1;
int dev = 0xaa;
static irqreturn_t keyboard_handler(int irq, void *dev)
{
static int counter = 0;
pr_info("Keyboard Counter:%dn", counter++);
return IRQ_NONE;
}
static int test_interrupt_init(void)
{
pr_info("%s: In initn", __func__);
return request_irq(irq, keyboard_handler, IRQF_SHARED,
"my_keyboard_handler", &dev);
}
static void test_interrupt_exit(void)
{
pr_info("%s: In exitn", __func__);
synchronize_irq(irq);
free_irq(irq, &dev);
}
module_init(test_interrupt_init);
module_exit(test_interrupt_exit);
While removing this module, I am getting the error:
rmmod: ERROR: ../libkmod/libkmod-module.c:769 kmod_module_remove_module() could not remove 'interrupt': Device or resource busy
rmmod: ERROR: could not remove module interrupt: Device or resource busy
Why I am getting this error, as I am using IRQF_SHARED and passed the dev parameter in request_irq and free_irq
Update: From the dmesg, I don't see any printk on rmmod
Added dmesg logs:
[ 4007.223281] Keyboard Counter:884
[ 4007.560846] Keyboard Counter:885
[ 4007.670339] Keyboard Counter:886
[ 4008.240139] Keyboard Counter:887
[ 4008.275412] Keyboard Counter:888
[ 4008.359338] Keyboard Counter:889
[ 4008.425101] Keyboard Counter:890
[ 4008.433026] Keyboard Counter:891
[ 4008.501763] Keyboard Counter:892
[ 4008.579201] Keyboard Counter:893
[ 4008.653335] Keyboard Counter:894
[ 4008.682862] Keyboard Counter:895
[ 4008.733950] Keyboard Counter:896
$ cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
0: 1 0 0 0 IO-APIC 2-edge timer
1: 449 0 0 707 IO-APIC 1-edge i8042, my_keyboard_handler
6: 0 0 2 0 IO-APIC 6-edge floppy
7: 0 0 0 0 IO-APIC 7-edge parport0
8: 0 1 0 0 IO-APIC 8-edge rtc0
9: 0 0 0 0 IO-APIC 9-fasteoi acpi
c linux-kernel linux-device-driver interrupt-handling
|
show 3 more comments
I was writing a sample request_irq code
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
MODULE_LICENSE("GPL");
int irq = 1;
int dev = 0xaa;
static irqreturn_t keyboard_handler(int irq, void *dev)
{
static int counter = 0;
pr_info("Keyboard Counter:%dn", counter++);
return IRQ_NONE;
}
static int test_interrupt_init(void)
{
pr_info("%s: In initn", __func__);
return request_irq(irq, keyboard_handler, IRQF_SHARED,
"my_keyboard_handler", &dev);
}
static void test_interrupt_exit(void)
{
pr_info("%s: In exitn", __func__);
synchronize_irq(irq);
free_irq(irq, &dev);
}
module_init(test_interrupt_init);
module_exit(test_interrupt_exit);
While removing this module, I am getting the error:
rmmod: ERROR: ../libkmod/libkmod-module.c:769 kmod_module_remove_module() could not remove 'interrupt': Device or resource busy
rmmod: ERROR: could not remove module interrupt: Device or resource busy
Why I am getting this error, as I am using IRQF_SHARED and passed the dev parameter in request_irq and free_irq
Update: From the dmesg, I don't see any printk on rmmod
Added dmesg logs:
[ 4007.223281] Keyboard Counter:884
[ 4007.560846] Keyboard Counter:885
[ 4007.670339] Keyboard Counter:886
[ 4008.240139] Keyboard Counter:887
[ 4008.275412] Keyboard Counter:888
[ 4008.359338] Keyboard Counter:889
[ 4008.425101] Keyboard Counter:890
[ 4008.433026] Keyboard Counter:891
[ 4008.501763] Keyboard Counter:892
[ 4008.579201] Keyboard Counter:893
[ 4008.653335] Keyboard Counter:894
[ 4008.682862] Keyboard Counter:895
[ 4008.733950] Keyboard Counter:896
$ cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
0: 1 0 0 0 IO-APIC 2-edge timer
1: 449 0 0 707 IO-APIC 1-edge i8042, my_keyboard_handler
6: 0 0 2 0 IO-APIC 6-edge floppy
7: 0 0 0 0 IO-APIC 7-edge parport0
8: 0 1 0 0 IO-APIC 8-edge rtc0
9: 0 0 0 0 IO-APIC 9-fasteoi acpi
c linux-kernel linux-device-driver interrupt-handling
whatcat /proc/modulessays aboutinterrupt? It should be inLivestate. Can you show usdmesglogs ?
– Achal
Dec 30 '18 at 9:28
Added dmesg logs and cat /proc/interrupts output
– md.jamal
Dec 30 '18 at 9:51
Does thisinterruptmodule referenced by any other module ? that's the probable reason for Device or resource busy. Meanwhile you can dormmod -fto remove it, clear thedmesgand run again.
– Achal
Dec 30 '18 at 10:03
rmmod -f also gives the same error
– md.jamal
Dec 30 '18 at 11:31
Most likely the keyboard is already claimed by console or X not shared. You need to either be first or disable those.
– stark
Dec 30 '18 at 14:20
|
show 3 more comments
I was writing a sample request_irq code
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
MODULE_LICENSE("GPL");
int irq = 1;
int dev = 0xaa;
static irqreturn_t keyboard_handler(int irq, void *dev)
{
static int counter = 0;
pr_info("Keyboard Counter:%dn", counter++);
return IRQ_NONE;
}
static int test_interrupt_init(void)
{
pr_info("%s: In initn", __func__);
return request_irq(irq, keyboard_handler, IRQF_SHARED,
"my_keyboard_handler", &dev);
}
static void test_interrupt_exit(void)
{
pr_info("%s: In exitn", __func__);
synchronize_irq(irq);
free_irq(irq, &dev);
}
module_init(test_interrupt_init);
module_exit(test_interrupt_exit);
While removing this module, I am getting the error:
rmmod: ERROR: ../libkmod/libkmod-module.c:769 kmod_module_remove_module() could not remove 'interrupt': Device or resource busy
rmmod: ERROR: could not remove module interrupt: Device or resource busy
Why I am getting this error, as I am using IRQF_SHARED and passed the dev parameter in request_irq and free_irq
Update: From the dmesg, I don't see any printk on rmmod
Added dmesg logs:
[ 4007.223281] Keyboard Counter:884
[ 4007.560846] Keyboard Counter:885
[ 4007.670339] Keyboard Counter:886
[ 4008.240139] Keyboard Counter:887
[ 4008.275412] Keyboard Counter:888
[ 4008.359338] Keyboard Counter:889
[ 4008.425101] Keyboard Counter:890
[ 4008.433026] Keyboard Counter:891
[ 4008.501763] Keyboard Counter:892
[ 4008.579201] Keyboard Counter:893
[ 4008.653335] Keyboard Counter:894
[ 4008.682862] Keyboard Counter:895
[ 4008.733950] Keyboard Counter:896
$ cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
0: 1 0 0 0 IO-APIC 2-edge timer
1: 449 0 0 707 IO-APIC 1-edge i8042, my_keyboard_handler
6: 0 0 2 0 IO-APIC 6-edge floppy
7: 0 0 0 0 IO-APIC 7-edge parport0
8: 0 1 0 0 IO-APIC 8-edge rtc0
9: 0 0 0 0 IO-APIC 9-fasteoi acpi
c linux-kernel linux-device-driver interrupt-handling
I was writing a sample request_irq code
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
MODULE_LICENSE("GPL");
int irq = 1;
int dev = 0xaa;
static irqreturn_t keyboard_handler(int irq, void *dev)
{
static int counter = 0;
pr_info("Keyboard Counter:%dn", counter++);
return IRQ_NONE;
}
static int test_interrupt_init(void)
{
pr_info("%s: In initn", __func__);
return request_irq(irq, keyboard_handler, IRQF_SHARED,
"my_keyboard_handler", &dev);
}
static void test_interrupt_exit(void)
{
pr_info("%s: In exitn", __func__);
synchronize_irq(irq);
free_irq(irq, &dev);
}
module_init(test_interrupt_init);
module_exit(test_interrupt_exit);
While removing this module, I am getting the error:
rmmod: ERROR: ../libkmod/libkmod-module.c:769 kmod_module_remove_module() could not remove 'interrupt': Device or resource busy
rmmod: ERROR: could not remove module interrupt: Device or resource busy
Why I am getting this error, as I am using IRQF_SHARED and passed the dev parameter in request_irq and free_irq
Update: From the dmesg, I don't see any printk on rmmod
Added dmesg logs:
[ 4007.223281] Keyboard Counter:884
[ 4007.560846] Keyboard Counter:885
[ 4007.670339] Keyboard Counter:886
[ 4008.240139] Keyboard Counter:887
[ 4008.275412] Keyboard Counter:888
[ 4008.359338] Keyboard Counter:889
[ 4008.425101] Keyboard Counter:890
[ 4008.433026] Keyboard Counter:891
[ 4008.501763] Keyboard Counter:892
[ 4008.579201] Keyboard Counter:893
[ 4008.653335] Keyboard Counter:894
[ 4008.682862] Keyboard Counter:895
[ 4008.733950] Keyboard Counter:896
$ cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
0: 1 0 0 0 IO-APIC 2-edge timer
1: 449 0 0 707 IO-APIC 1-edge i8042, my_keyboard_handler
6: 0 0 2 0 IO-APIC 6-edge floppy
7: 0 0 0 0 IO-APIC 7-edge parport0
8: 0 1 0 0 IO-APIC 8-edge rtc0
9: 0 0 0 0 IO-APIC 9-fasteoi acpi
c linux-kernel linux-device-driver interrupt-handling
c linux-kernel linux-device-driver interrupt-handling
edited Dec 30 '18 at 9:51
md.jamal
asked Dec 30 '18 at 8:49
md.jamalmd.jamal
441519
441519
whatcat /proc/modulessays aboutinterrupt? It should be inLivestate. Can you show usdmesglogs ?
– Achal
Dec 30 '18 at 9:28
Added dmesg logs and cat /proc/interrupts output
– md.jamal
Dec 30 '18 at 9:51
Does thisinterruptmodule referenced by any other module ? that's the probable reason for Device or resource busy. Meanwhile you can dormmod -fto remove it, clear thedmesgand run again.
– Achal
Dec 30 '18 at 10:03
rmmod -f also gives the same error
– md.jamal
Dec 30 '18 at 11:31
Most likely the keyboard is already claimed by console or X not shared. You need to either be first or disable those.
– stark
Dec 30 '18 at 14:20
|
show 3 more comments
whatcat /proc/modulessays aboutinterrupt? It should be inLivestate. Can you show usdmesglogs ?
– Achal
Dec 30 '18 at 9:28
Added dmesg logs and cat /proc/interrupts output
– md.jamal
Dec 30 '18 at 9:51
Does thisinterruptmodule referenced by any other module ? that's the probable reason for Device or resource busy. Meanwhile you can dormmod -fto remove it, clear thedmesgand run again.
– Achal
Dec 30 '18 at 10:03
rmmod -f also gives the same error
– md.jamal
Dec 30 '18 at 11:31
Most likely the keyboard is already claimed by console or X not shared. You need to either be first or disable those.
– stark
Dec 30 '18 at 14:20
what
cat /proc/modules says about interrupt ? It should be in Live state. Can you show us dmesg logs ?– Achal
Dec 30 '18 at 9:28
what
cat /proc/modules says about interrupt ? It should be in Live state. Can you show us dmesg logs ?– Achal
Dec 30 '18 at 9:28
Added dmesg logs and cat /proc/interrupts output
– md.jamal
Dec 30 '18 at 9:51
Added dmesg logs and cat /proc/interrupts output
– md.jamal
Dec 30 '18 at 9:51
Does this
interrupt module referenced by any other module ? that's the probable reason for Device or resource busy. Meanwhile you can do rmmod -f to remove it, clear the dmesg and run again.– Achal
Dec 30 '18 at 10:03
Does this
interrupt module referenced by any other module ? that's the probable reason for Device or resource busy. Meanwhile you can do rmmod -f to remove it, clear the dmesg and run again.– Achal
Dec 30 '18 at 10:03
rmmod -f also gives the same error
– md.jamal
Dec 30 '18 at 11:31
rmmod -f also gives the same error
– md.jamal
Dec 30 '18 at 11:31
Most likely the keyboard is already claimed by console or X not shared. You need to either be first or disable those.
– stark
Dec 30 '18 at 14:20
Most likely the keyboard is already claimed by console or X not shared. You need to either be first or disable those.
– stark
Dec 30 '18 at 14:20
|
show 3 more comments
1 Answer
1
active
oldest
votes
Try this:
static int irq = 1, dev = 0xaa;
You need to give permission to variable irq and then call module_param() like below
module_param(irq, int, S_IRUGO);
sample code
MODULE_LICENSE("GPL");
static int irq = 1, dev = 0xaa, counter = 0;
module_param(irq, int, S_IRUGO); /* give the permission to user space variable */
static irqreturn_t keyboard_handler(int irq, void *dev)
{
pr_info("Keyboard Counter:%dn", counter++);
return IRQ_NONE;
}
/* registering irq */
static int test_interrupt_init(void)
{
pr_info("%s: In initn", __func__);
if(request_irq(irq, keyboard_handler, IRQF_SHARED,"my_keyboard_handler", &dev)) {
return -1;
}
else
{
pr_info("success n");
return 0;
}
}
static void test_interrupt_exit(void)
{
pr_info("%s: In exitn", __func__);
synchronize_irq(irq); /* synchronize interrupt */
free_irq(irq, &dev);
}
module_init(test_interrupt_init);
module_exit(test_interrupt_exit);
Same error, how can just changing to module_param will work..
– md.jamal
Dec 30 '18 at 11:41
Did you verify this code.. Is it working for you?
– md.jamal
Dec 30 '18 at 13:28
Yes it's working on my system. Can you tell your system kernel configuration ?
– Achal
Dec 30 '18 at 13:30
Linux ubuntu 4.20.0-rc6+ #1 SMP Fri Dec 28 00:44:41 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
– md.jamal
Dec 30 '18 at 13:32
I copied your code and still the same issue: Device or resource busy
– md.jamal
Dec 30 '18 at 13:37
|
show 1 more comment
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53976308%2funable-to-free-the-keyboard-irq-line-device-or-resource-busy%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try this:
static int irq = 1, dev = 0xaa;
You need to give permission to variable irq and then call module_param() like below
module_param(irq, int, S_IRUGO);
sample code
MODULE_LICENSE("GPL");
static int irq = 1, dev = 0xaa, counter = 0;
module_param(irq, int, S_IRUGO); /* give the permission to user space variable */
static irqreturn_t keyboard_handler(int irq, void *dev)
{
pr_info("Keyboard Counter:%dn", counter++);
return IRQ_NONE;
}
/* registering irq */
static int test_interrupt_init(void)
{
pr_info("%s: In initn", __func__);
if(request_irq(irq, keyboard_handler, IRQF_SHARED,"my_keyboard_handler", &dev)) {
return -1;
}
else
{
pr_info("success n");
return 0;
}
}
static void test_interrupt_exit(void)
{
pr_info("%s: In exitn", __func__);
synchronize_irq(irq); /* synchronize interrupt */
free_irq(irq, &dev);
}
module_init(test_interrupt_init);
module_exit(test_interrupt_exit);
Same error, how can just changing to module_param will work..
– md.jamal
Dec 30 '18 at 11:41
Did you verify this code.. Is it working for you?
– md.jamal
Dec 30 '18 at 13:28
Yes it's working on my system. Can you tell your system kernel configuration ?
– Achal
Dec 30 '18 at 13:30
Linux ubuntu 4.20.0-rc6+ #1 SMP Fri Dec 28 00:44:41 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
– md.jamal
Dec 30 '18 at 13:32
I copied your code and still the same issue: Device or resource busy
– md.jamal
Dec 30 '18 at 13:37
|
show 1 more comment
Try this:
static int irq = 1, dev = 0xaa;
You need to give permission to variable irq and then call module_param() like below
module_param(irq, int, S_IRUGO);
sample code
MODULE_LICENSE("GPL");
static int irq = 1, dev = 0xaa, counter = 0;
module_param(irq, int, S_IRUGO); /* give the permission to user space variable */
static irqreturn_t keyboard_handler(int irq, void *dev)
{
pr_info("Keyboard Counter:%dn", counter++);
return IRQ_NONE;
}
/* registering irq */
static int test_interrupt_init(void)
{
pr_info("%s: In initn", __func__);
if(request_irq(irq, keyboard_handler, IRQF_SHARED,"my_keyboard_handler", &dev)) {
return -1;
}
else
{
pr_info("success n");
return 0;
}
}
static void test_interrupt_exit(void)
{
pr_info("%s: In exitn", __func__);
synchronize_irq(irq); /* synchronize interrupt */
free_irq(irq, &dev);
}
module_init(test_interrupt_init);
module_exit(test_interrupt_exit);
Same error, how can just changing to module_param will work..
– md.jamal
Dec 30 '18 at 11:41
Did you verify this code.. Is it working for you?
– md.jamal
Dec 30 '18 at 13:28
Yes it's working on my system. Can you tell your system kernel configuration ?
– Achal
Dec 30 '18 at 13:30
Linux ubuntu 4.20.0-rc6+ #1 SMP Fri Dec 28 00:44:41 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
– md.jamal
Dec 30 '18 at 13:32
I copied your code and still the same issue: Device or resource busy
– md.jamal
Dec 30 '18 at 13:37
|
show 1 more comment
Try this:
static int irq = 1, dev = 0xaa;
You need to give permission to variable irq and then call module_param() like below
module_param(irq, int, S_IRUGO);
sample code
MODULE_LICENSE("GPL");
static int irq = 1, dev = 0xaa, counter = 0;
module_param(irq, int, S_IRUGO); /* give the permission to user space variable */
static irqreturn_t keyboard_handler(int irq, void *dev)
{
pr_info("Keyboard Counter:%dn", counter++);
return IRQ_NONE;
}
/* registering irq */
static int test_interrupt_init(void)
{
pr_info("%s: In initn", __func__);
if(request_irq(irq, keyboard_handler, IRQF_SHARED,"my_keyboard_handler", &dev)) {
return -1;
}
else
{
pr_info("success n");
return 0;
}
}
static void test_interrupt_exit(void)
{
pr_info("%s: In exitn", __func__);
synchronize_irq(irq); /* synchronize interrupt */
free_irq(irq, &dev);
}
module_init(test_interrupt_init);
module_exit(test_interrupt_exit);
Try this:
static int irq = 1, dev = 0xaa;
You need to give permission to variable irq and then call module_param() like below
module_param(irq, int, S_IRUGO);
sample code
MODULE_LICENSE("GPL");
static int irq = 1, dev = 0xaa, counter = 0;
module_param(irq, int, S_IRUGO); /* give the permission to user space variable */
static irqreturn_t keyboard_handler(int irq, void *dev)
{
pr_info("Keyboard Counter:%dn", counter++);
return IRQ_NONE;
}
/* registering irq */
static int test_interrupt_init(void)
{
pr_info("%s: In initn", __func__);
if(request_irq(irq, keyboard_handler, IRQF_SHARED,"my_keyboard_handler", &dev)) {
return -1;
}
else
{
pr_info("success n");
return 0;
}
}
static void test_interrupt_exit(void)
{
pr_info("%s: In exitn", __func__);
synchronize_irq(irq); /* synchronize interrupt */
free_irq(irq, &dev);
}
module_init(test_interrupt_init);
module_exit(test_interrupt_exit);
edited Dec 30 '18 at 11:57
answered Dec 30 '18 at 11:08
AchalAchal
9,1882830
9,1882830
Same error, how can just changing to module_param will work..
– md.jamal
Dec 30 '18 at 11:41
Did you verify this code.. Is it working for you?
– md.jamal
Dec 30 '18 at 13:28
Yes it's working on my system. Can you tell your system kernel configuration ?
– Achal
Dec 30 '18 at 13:30
Linux ubuntu 4.20.0-rc6+ #1 SMP Fri Dec 28 00:44:41 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
– md.jamal
Dec 30 '18 at 13:32
I copied your code and still the same issue: Device or resource busy
– md.jamal
Dec 30 '18 at 13:37
|
show 1 more comment
Same error, how can just changing to module_param will work..
– md.jamal
Dec 30 '18 at 11:41
Did you verify this code.. Is it working for you?
– md.jamal
Dec 30 '18 at 13:28
Yes it's working on my system. Can you tell your system kernel configuration ?
– Achal
Dec 30 '18 at 13:30
Linux ubuntu 4.20.0-rc6+ #1 SMP Fri Dec 28 00:44:41 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
– md.jamal
Dec 30 '18 at 13:32
I copied your code and still the same issue: Device or resource busy
– md.jamal
Dec 30 '18 at 13:37
Same error, how can just changing to module_param will work..
– md.jamal
Dec 30 '18 at 11:41
Same error, how can just changing to module_param will work..
– md.jamal
Dec 30 '18 at 11:41
Did you verify this code.. Is it working for you?
– md.jamal
Dec 30 '18 at 13:28
Did you verify this code.. Is it working for you?
– md.jamal
Dec 30 '18 at 13:28
Yes it's working on my system. Can you tell your system kernel configuration ?
– Achal
Dec 30 '18 at 13:30
Yes it's working on my system. Can you tell your system kernel configuration ?
– Achal
Dec 30 '18 at 13:30
Linux ubuntu 4.20.0-rc6+ #1 SMP Fri Dec 28 00:44:41 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
– md.jamal
Dec 30 '18 at 13:32
Linux ubuntu 4.20.0-rc6+ #1 SMP Fri Dec 28 00:44:41 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
– md.jamal
Dec 30 '18 at 13:32
I copied your code and still the same issue: Device or resource busy
– md.jamal
Dec 30 '18 at 13:37
I copied your code and still the same issue: Device or resource busy
– md.jamal
Dec 30 '18 at 13:37
|
show 1 more comment
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53976308%2funable-to-free-the-keyboard-irq-line-device-or-resource-busy%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
what
cat /proc/modulessays aboutinterrupt? It should be inLivestate. Can you show usdmesglogs ?– Achal
Dec 30 '18 at 9:28
Added dmesg logs and cat /proc/interrupts output
– md.jamal
Dec 30 '18 at 9:51
Does this
interruptmodule referenced by any other module ? that's the probable reason for Device or resource busy. Meanwhile you can dormmod -fto remove it, clear thedmesgand run again.– Achal
Dec 30 '18 at 10:03
rmmod -f also gives the same error
– md.jamal
Dec 30 '18 at 11:31
Most likely the keyboard is already claimed by console or X not shared. You need to either be first or disable those.
– stark
Dec 30 '18 at 14:20