depot/third_party/nixpkgs/pkgs/tools/misc/ckb-next/modprobe.patch
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

26 lines
1.1 KiB
Diff

diff --git a/src/daemon/input_linux.c b/src/daemon/input_linux.c
index 8489f5b..b851419 100644
--- a/src/daemon/input_linux.c
+++ b/src/daemon/input_linux.c
@@ -63,7 +63,7 @@ int os_inputopen(usbdevice* kb){
// If not available, load the module
if(fd < 0){
- if(system("modprobe uinput") != 0) {
+ if(system("@kmod@/bin/modprobe uinput") != 0) {
ckb_fatal("Failed to load uinput module\n");
return 1;
}
diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp
index 1eb95bd..f7d38ba 100644
--- a/src/gui/mainwindow.cpp
+++ b/src/gui/mainwindow.cpp
@@ -284,7 +284,7 @@ void MainWindow::updateVersion(){
#elif defined(Q_OS_LINUX)
if(!(QFileInfo("/dev/uinput").exists() || QFileInfo("/dev/input/uinput").exists())){
QProcess modprobe;
- modprobe.start("modprobe", QStringList("uinput"));
+ modprobe.start("@kmod@/bin/modprobe", QStringList("uinput"));
if(!modprobe.waitForFinished())
qDebug() << "Modprobe error";