You are not logged in.
Did you try with alsa?
I built live-boot packages with the fix and put them here for people to use until debian builds them. I really hope we don't have to fork live-boot for this.
https://sourceforge.net/projects/refracta/files/tools/live-boot, live-boot-initramfs-tools and live-boot doc all from 2022-12-16.
So do I:
Recently i've done several improvements in the sources of simple-netaid and i would like to share with you a brief tutorial explaining how to build it from source. The procedure has been tested in Void Linux and Slackware, but i had trouble running ifupdown in the later. Bear in mind that ifupdown is debian specific, though it's also used in a few independent distributions like Void and Alpine Linux. I still didn't try to build simple-netaid in Alpine, hence i'll specify the build dependencies only for devuan and void.
In de{bi,vu}an you can install them via apt:
# apt-get install git-core build-essential pkg-config autoconf automake libtool intltool libiw-dev libcdk5-dev \
gettext libjson-c-dev libprocps-dev libsigc++-2.0-dev libncurses-dev libvte-2.91-dev libgtk-3-dev
In Void the packages can be installed using the xbps package manager:
# xbps-install git base-devel pkgconf autoconf automake libtool intltool gettext-devel json-c-devel \
procps-ng-devel libsigc++-devel ncurses-devel vte-3-devel gtk+3-devel
Both libiw-dev (i.e. wireless-tools) and cdk5 are missing in the void repo, and we'll need to build them from source. In summary, we're going to build the projects below:
libpstat
libubox
ubus
wireless-tools (only in Void)
libnetaid
snetaid
cdk5 (only in Void)
simple-netaid-cdk
simple-netaid-vte3 (optional)
- Installing LIBPSTAT
Developed by Jude Nelson, libpstat is a small library for getting information on running processes in an OS-agnostic way. The source is available in his git repository, but i added a few extras to suit the needs of simple-netaid. Build it as follows:
$ git clone https://git.devuan.org/aitor_czr/libpstat.git
$ cd libpstat
$ make OS=LINUX
Now install it as root:
# make install PREFIX=/usr/local
- Installing LIBUBOX
This consists of a set of utilities, mostly wrappers, that are used by many OpenWrt projects. In this case, it's present in Ubus. The original code (developed by Felix Fietkau) uses the cmake build system, but i replaced it with gnu make:
$ git clone https://git.devuan.org/aitor_czr/libubox.git
$ cd libubox
$ make
As root:
# make install PREFIX=/usr/local
- Installing UBUS
Ubus is a system level micro bus architecture basically consistent with DBus. Again, i replaced cmake with the gnu autotools build system (instead of make in this case, because ubus is daemonized and the autotools provide configuration flags suitable for the different scenarios the end user may face depending on the installed init system).
To build the sources you'll have to export the PKG_CONFIG_PATH variable in order to find the libubox library. In Void:
$ export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig
In devuan:
$ export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/pkgconfig
Download and build the source:
$ git clone https://git.devuan.org/aitor_czr/libubus.git
$ cd libubus
$ autoreconf -i -f
At this point, in devuan with sysvinit run the following command:
$ ./configure --prefix=/usr/local --disable-runit
$ make
In Void with runit:
$ ./configure --prefix=/usr/local --disable-sysvinit
$ make
You can now install ubus:
# make install
You'll face "libtool: warning: remember to run 'libtool --finish /usr/local/lib'" warning because libtool complains that the prefix specified in the during the make phase is different from the one you have when you run make install. But it's a harmless warning and you don't need to do anything.
- Installing WIRELESS-TOOLS (Only in VOID LINUX)
You can download it from the Hewlett Packard repo:
$ git clone https://github.com/HewlettPackard/wireless-tools.git
$ cd wireless-tools/wireless_tools
$ make
As root:
# make install
- Installing LIBNETAID
This library consists of some C bindings for the high level ifupdown network manager. Download and build it as follows:
$ git clone https://git.devuan.org/aitor_czr/libnetaid.git
$ cd libnetaid
$ make
As root:
#make install
- Installing SNETAID
Configuration daemon for simple-netaid. For the same reason than Ubus, it uses the gnu autotools build system:
$ git clone https://git.devuan.org/aitor_czr/snetaid.git
$ cd snetaid
$ autoreconf -i -f
In devuan with sysvinit:
$ ./configure --prefix=/usr/local --disable-runit
$ make
In Void with runit:
$ ./configure --prefix=/usr/local --disable-sysvinit
$ make
You can now install snetaid:
# make install
- Configuring snetaid
Once the installation of snetaid completes, you need to create your user account. First of all create a new group named snetaid and add yourself to the group:
# groupadd netaid
# usermod -aG netaid $USER
Now issue the ldconfig command before starting the installed daemon (in some systems -e.g. Slackware- you may need to add the line /usr/local/lib to your /etc/ld.so.conf):
# ldconfig
After that, you'll be able to start snetaid. In devuan with sysvinit:
# service snetaid start
In Void with runit:
# sv start snetaid
At this point, i recommend you to reboot the system other than restarting the daemons to ensure that both ubus and snetaid start automatically without issues during the boot process. If everything went as spected, the output of ubus -v list should look similar to this:
$ ubus -v list
'ering.netaid' @0dc00e91
"interface_down":{"id":"Integer","ifname":"String"}
"interface_up":{"id":"Integer","ifname":"String"}
"ifdown":{"id":"Integer","ifname":"String","tty":"Integer"}
"ifup":{"id":"Integer","ifname":"String","tty":"Integer"}
"ipaddr_flush":{"id":"Integer","ifname":"String"}
"wpa_passphrase":{"id":"Integer","essid":"String","passwd":"String","filename":"String"}
"wpa_supplicant":{"id":"Integer","ifname":"String","filename":"String","tty":"Integer"}
"uninstall":{"id":"Integer","filename":"String"}
"scan_active_wifis":{"id":"Integer","ifname":"String"}
- Installing CDK5 (Only in VOID LINUX)
Download the source from debian and build it:
$ git clone https://salsa.debian.org/debian/libcdk5.git
$ cd libcdk5
$ ./configure
$ make
This should go quickly. Once it's built, install it as root:
# make install
- Installing SIMPLE-NETAID-CDK
This is a curses interface for simple-netaid. Build it with make:
$ git clone https://git.devuan.org/aitor_czr/simple-netaid-cdk.git
$ cd simple-netaid-cdk
$ make
And install it as root:
# make install PREFIX=/usr/local
- Installing SIMPLE-NETAID-VTE3
This is an optional Gtk container for the curses interface of simple-netaid. Build it with make in thje same way as the earlier:
$ git clone https://git.devuan.org/aitor_czr/simple-netaid-vte3.git
$ cd simple-netaid-vte3
$ make
And install it as root:
# make install PREFIX=/usr/local
The launcher should appear in the menu right now.
- Final steps
The last step is to install some runtime dependencies and configure ifupdown. In devuan:
# apt-get install ifupdown wpa-supplicant isc-dhcp-client lsb-base
In Void:
# xbps-install ifupdown wpa_supplicant dhcpcd
Void Linux uses NetworkManager by default, but it's highly recommended to disable it when using ifupdown. You can type:
# touch /etc/sv/NetworkManager/down
to prevent the runit from starting NetworkManager on boot.
Finally, add the following lines to the file /etc/network/interfaces, which has been installed together with ifupdown:
auto lo
iface lo inet loopback
iface <wired_device> inet dhcp
iface <wireless_device> inet dhcp
Note: I suggest to by-pass stanzas like auto and allow-hotplug in the configuration of ifupdown, because they may delay the boot process. The master branch of simple netaid will react to the plug-in events of the ethernet cable without the need of any other standalone application like ifplugd or netplug. Therefore, the system will be automatically connected to the network no matter whether or not the cable was plugged in during the boot process, as long as the interface is up when the event occurs.
Tried this on Daedalus/openRC/Cinnamon DE: display is incomplete, unfortunately the mixer can't be used.
You can build it from source. It's working for me and someone else also gave it a try in Gentoo. It did work for me in Void Linux as well.
You'll need to install the following build dependencies:
libgtkmm-3.0-dev | libgtkmm-2.4-dev
libasound2-dev
libsigc++-2.0-dev
libprocps-dev
Download the source from git:
https://git.devuan.org/aitor_czr/amixer-gtk
Depending on the version of Gtk you've chosen for the build, you might change the flags in ui/Makefile replacing gtkmm-3.0 with gtkmm-2.4 or vice versa.
Just do:
$ make
$ ui/amixer-gtk --help
Uso:
amixer-gtk [OPCIÓN…]
Opciones de ayuda:
-h, --help Mostrar opciones de ayuda
Opciones de la aplicación:
-D, --device Select the device
-c, --card Select the card
--systray Send to the system tray
For example, you can launch it by typing:
$ ui/amixer-gtk -D hw -c 0
The installation is trivial:
# make install
To uninstall it:
# make uninstall
Cleanup the build with:
$ make cleanall
DISCLAIMER: I recommend you to build it in Gtk3 because I'm fixing a bug in Gtk2, appearently caused by the latest commits.
distrowatch listed gnuinos for upcoming review, distro released earlier?
This is the first I have heard of gnuinos being mentioned in distrowatch.
aitor you release a fork today and have time time to trouble shoot, how?
testing fork iso with 6.1 incoming?
Fork? Sorry, but I don't know what are you talking about. I didn't release anything today.
sudo apt-get install linux-headers-5.19.0-0 dkms: running auto installation service for kernel 5.19.0-0.deb11.2-rt-amd64:Error! Could not locate dkms.conf file. File: /var/lib/dkms/snd_hda_codec_cs8409/1.0/source/dkms.conf does not exist. failed! run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 4
Remove the folder /var/lib/dkms/snd_hda_codec_cs8409 and reinstall the headers:
$ sudo apt-get --reinstall install linux-headers-5.19.0-0
Are you trying to build the driver again? If so, you are mixing hyphens and underscores. Use hyphens instead, and include an alias after the installation as I pointed out on sunday.
On the other hand, are you getting random noise with:
$ aplay /dev/urandom -f dat -D hw:1,0
or any other card,device pair?
install 5.19 first install failed. output
$ sudo apt-get install linux-headers-5.19.0-0 ...
Is that the running kernel? Higher versions like 5.19.0-2 do exist in Daedalus.
sudo apt-get install linux-headers-5.19.0-0 dkms: running auto installation service for kernel 5.19.0-0.deb11.2-rt-amd64:Error! Could not locate dkms.conf file. File: /var/lib/dkms/snd_hda_codec_cs8409/1.0/source/dkms.conf does not exist. failed! run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 4
Files located at /usr/src/snd_hda_codec_cs8409-1.0/ are copied to /var/lib/dkms/snd_hda_codec_cs8409/1.0/source/ where the build process is carried out.
I guess that you forgot to edit dkms.conf in /usr/src/snd...
below is snd blacklist to prevent conflict with othe snd settings.
/etc/modprobe.d/blacklist.confblacklist snd_soc_skl
You'll find blacklisting worked, but the codec may be reverted back. Here you are one scenario where sound modules are autoloaded on boot despite blacklisting:
https://superuser.com/questions/429255/ … eze-solved
In such cases, it may be a good idea to block loading as well. For example:
blacklist snd_hda_codec_generic
install snd_hda_codec_generic /bin/false
no sound after reboot
speaker-test -c2 -t wave ...
The following command sends ramdom noise output to hw:0,0 (i.e. :<card>,<device>)
$ aplay /dev/urandom -f dat -D hw:0,0
Playing raw data '/dev/urandom' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
^CAborted by signal Interrupción...
no sound after reboot
Unfortunately
Now we are going to modify the install target in the Makefile, renaming the module before it's installation:
install: mkdir -p $(KDIR)/updates/ mv snd-hda-codec-cs8409.ko snd_hda_codec_cs8409.ko cp snd_hda_codec_cs8409.ko $(KDIR)/updates/ depmod -a
cd /usr/src/snd....... dir
mkdir -p $(KDIR)/updates/error output
sudo mkdir -p $(KDIR)/updates/
bash: KDIR: command not found
No, no... You don't have to run this code. Make will do, because it's part of the Makefile. The recipes concerning to the install target. However, you can leave the Makefile as is, and use modprobe and lsmod without underscores:
# modprobe snd-hda-codec-cs8409
$ lsmod | grep snd-hda-codec-cs8409
But then you have to create an alias by adding the line:
alias snd-hda-codec-cs8409 snd_hda_codec_cs8409
to the modprobes.alias of the running kernel, located in /lib/modules/${kernel_version}/, as I explained previously.
aitor wrote:One question arises: why do we need to rename the *.ko?
Better workarounds...?I'm referring to this:
using modprobe with hyphens the later use of lsmod didn't list anything
I mean, using hyphens in the module name, it's not listed by lsmod
I answer myself:
# echo "alias snd-hda-codec-cs8409 snd_hda_codec_cs8409" >> /lib/modules/${kernel_version}/modules.alias
I see lots of aliases replacing hyphens by underscores in the modules.alias. Therefore, the workaround in the install target of the Makefile is superfluous if we add an alias for the driver.
c'est fini...?
One question arises: why do we need to rename the *.ko?
Better workarounds...?
I'm referring to this:
using modprobe with hyphens the later use of lsmod didn't list anything
I mean, using hyphens in the module name, it's not listed by lsmod
aitor wrote:... but I'm not sure whether or not hyphens are allowed for kernel module names.
Yes, they are! I've found some of them. So, I'll write the definitive howto in a few minutes...
Indeed, there are a lot. But this morning something got me confused, because using modprobe with hyphens the later use of lsmod didn't list anything. This is the reason why I changed all the hyphens by underscores in the module name. In doing so, It doesn't build. Hense, the howto needs a workaround in the install target of the Makefile.
First of all, remove the previous work:
# dkms remove -m snd_hda_codec_cs8409 -v 1.0
# rm -rf /usr/src/snd_hda_codec_cs8409 -v 1.0
Leave the content of dkms.conf as follows (using hyphens):
PACKAGE_NAME=snd-hda-codec-cs8409
BUILT_MODULE_NAME=snd-hda-codec-cs8409
PACKAGE_VERSION=1.0
BUILT_MODULE_LOCATION=./
DEST_MODULE_LOCATION=/kernel/driver/updates
AUTOINSTALL=yes
Now we are going to modify the install target in the Makefile, renaming the module before it's installation:
install:
mkdir -p $(KDIR)/updates/
mv snd-hda-codec-cs8409.ko snd_hda_codec_cs8409.ko
cp snd_hda_codec_cs8409.ko $(KDIR)/updates/
depmod -a
Here you are the rest of the steps:
# mkdir /usr/src/snd-hda-codec-cs8409-1.0
# cp -Rv . /usr/src/snd-hda-codec-cs8409-1.0
# dkms add -m snd-hda-codec-cs8409 -v 1.0
# dkms build -m snd-hda-codec-cs8409 -v 1.0
# dkms install -m snd-hda-codec-cs8409 -v 1.0
# modprobe snd_hda_codec_cs8409
$ lsmod | grep snd_hda_codec_cs8409
In my computer:
$ lsmod | grep snd_hda_codec_cs8409
snd_hda_codec_cs8409 163840 0
snd_hda_codec_generic 98304 2 snd_hda_codec_cs8409,snd_hda_codec_realtek
snd_hda_codec 184320 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_codec_cs8409,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core 118784 6 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_codec_cs8409,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
One question arises: why do we need to rename the *.ko?
Better workarounds...?
... but I'm not sure whether or not hyphens are allowed for kernel module names.
Yes, they are! I've found some of them. So, I'll write the definitive howto in a few minutes...
By the way...
aitor wrote:tux wrote:parent dir '/usr/src/snd_hda_codec_cs8409-1.0'
Contaning the configuration file for dkms, I suppose.
Try deleting it (but don't remove the content of the folder):
# dkms delete -m snd_hda_codec_cs8409
and then add, build and install it again. Via dkms add/build/install
man dkms does not have delete action, only remove or uninstall
name of folder snd_hda_codec_cs8409 and name of the .config file is call dkms.conf
might below command fix?
sudo dkm remove -m dkms.conf
The command is:
# dkms remove -m snd_hda_codec_cs8409 -v 1.0
instead of delete.
cd '/usr/src/snd_hda_codec_cs8409-1.0'
sudo dkms add -m snd_hda_codec_cs8409 -v 1.0 ouput - Creating symlink /var/lib/dkms/snd_hda_codec_cs8409/1.0/source -> /usr/src/snd_hda_codec_cs8409-1.0 DKMS: add completed.
dkms install -m snd_hda_codec_cs8409 -v 1.0 Kernel preparation unnecessary for this kernel. Skipping... Building module: cleaning build area... make -j4 KERNELRELEASE=5.18.0-0.deb11.4-amd64 -C /lib/modules/5.18.0-0.deb11.4-amd64/build M=/var/lib/dkms/snd_hda_codec_cs8409/1.0/build.... Error! Build of snd_hda_codec_cs8409.ko failed for: 5.18.0-0.deb11.4-amd64 (x86_64) Make sure the name of the generated module is correct and at the root of the build directory
and in stable
Kernel preparation unnecessary for this kernel. Skipping... Building module: cleaning build area... make -j4 KERNELRELEASE=5.10.0-18-amd64 -C /lib/modules/5.10.0-18-amd64/build M=/var/lib/dkms/snd_hda_codec_cs8409/1.0/build... Error! Build of snd_hda_codec_cs8409.ko failed for: 5.10.0-18-amd64 (x86_64) Make sure the name of the generated module is correct and at the root of the build directory
there are dmks headers for apt-get install dkms linux-headers-5.10.0-18-amd64 but none for backport 5.18.0.0-amd64
This morning I've built it successfully, but now I'm getting the same error than you. The problem is that, testing one of my installers, I formatted the disk where the installation succeded. However, I'm pretty sure that this mess comes from the use of underscores instead of hyphens in the module name. Though I see all the drivers using underscores in /lib/modules, this one is generated as snd-hda-codec-cs8409.ko. You can see this fact in the Makefile, but I'm not sure whether or not hyphens are allowed for kernel module names.
Give me some time, and I'll update my how-to.
sudo dkms add -m snd_hda_codec_cs8409 and sudo dkms add -m snd_hda_codec_cs8409-master
give error
Sorry, the version of the module was missing in my howto:
# dkms add -m snd_hda_codec_cs8409 -v 1.0
I put it when using dkms build and dkms install , but I forgot it when adding the module.
Now it should work...
Sorry again
is the parent the subdirectory inside /usr/src/snd_hda_codec_cs8409-1.0'
Yes.
if it is then there is no subdirectory inside /usr/src/snd... dir and only an copy of /home/user/snd-hda-codec-cs8409-master at /usr/src/snd_hda_codec_cs8409-1.0'
As a result:
BUILT_MODULE_LOCATION=./ ==> absolute_dir = /usr/src/snd_hda_codec_cs8409-1.0/ + relative_dir (= ./)
where the Makefile is found, that is:
path_to_the_makefile ==> absolute_dir/Makefile = /usr/src/snd_hda_codec_cs8409-1.0/Makefile
All this is right, and the origin of the issue is another one.
parent dir '/usr/src/snd_hda_codec_cs8409-1.0'
Contaning the configuration file for dkms, I suppose.
Try deleting it (but don't remove the content of the folder):
# dkms delete -m snd_hda_codec_cs8409
and then add, build and install it again. Via dkms add/build/install
cannot find ./ dir
Huh? It's the parent directory
should i nano edit /usr/snd... dir and add
BUILT_MODULE_LOCATION=./usr/src
delete /usr/src/snd... dir and restart whole process again?
Nope. The location is right. This variable is not an absolute path (note that it hasn't a forward slash at the beginning), but a relative path (relative to /usr/src/snd_hda_codec_cs8409-1.0/ where the tarball has been uncompressed). And it's the path to the Makefile, which is located in the parent directory.
In some cases, for example, you can find the Makefile in
/usr/src/<name>-<version>/src/Makefile
Hence, the variable would be BUILT_MODULE_LOCATION=./src
If I'm not mistaken