Posts for the month of February 2021

Creative Sound Blaster Z no sound under Fedora 33

I got myself an old Creative Sound Blaster Z to replace my build-in sound card, to amplify my sound experience, how-ever on first install I got myself into a pickle:

feb 24 22:54:52 technetium kernel: snd_hda_intel 0000:09:00.0: Direct firmware load for ctefx-desktop.bin failed with error -2
feb 24 22:54:52 technetium kernel: snd_hda_intel 0000:09:00.0: Direct firmware load for ctefx.bin failed with error -2
$ sudo lspci -v -s 09:00.0
09:00.0 Audio device: Creative Labs Sound Core3D [Sound Blaster Recon3D / Z-Series] (rev 01)
	Subsystem: Creative Labs SB1570 SB Audigy Fx
	Flags: bus master, fast devsel, latency 0, IRQ 39, IOMMU group 14
	Memory at fca04000 (64-bit, non-prefetchable) [size=16K]
	Memory at fca00000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [40] Power Management version 3
	Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
	Capabilities: [70] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Virtual Channel
	Capabilities: [170] Device Serial Number 00-00-00-00-00-00-00-00
	Capabilities: [180] Power Budgeting <?>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

Found a brilliant suggestion Raymond (back in 2016):

$ dnf provides /lib/firmware/ctefx.bin
$ sudo dnf install alsa-firmware

Reboot the system and it was al working as expected.

Bonus tip if you want to switch between headphone and speaker output

If you STILL don't have sound, try opening alsamixer, selecting your card with
F6, and toggling "HP/Speaker Auto Detect" with the 'm' key. This switch sets
whether or not you want to manually select the output with the 'Output Select' control.

Credits The original writer of the driver Conmanx360

Output switch script

This will provide a shortcut to quickly switch between headphone and speaker output with (as bonus) an shortcut key for Gnome:

Create install directory if does not exists:

$ mkdir -p $HOME/bin

'Install' script audio-switch-output.sh script:

$ cat << 'EOF' > $HOME/bin/switch-audio-output.sh && chmod 755 $HOME/bin/switch-audio-output.sh
#!/bin/sh
#
# Quickly switch between headphones and speakers 
# Tested on Creative Sound Blaster Z soundcard which is assumed to be card0
#
cmd="amixer -c 0"
if $cmd sget 'Output Select',0 | grep -q "Item0: 'Speakers'"; then
	$cmd -q sset 'Output Select',0 'Headphone'
else
	$cmd -q sset 'Output Select',0 'Speakers'
fi
EOF

Warning: Be careful, this will override any existing custom gnome shortcut keys, use Gnome GUI Settings -> Keyboard Shortcuts.

Add shortcut to call script quickly:

$ cat <<EOF | DCONF_PROFILE=user dconf load /org/gnome/settings-daemon/plugins/media-keys/
[/]
custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']

[custom-keybindings/custom0]
binding='<Primary><Alt>AudioMute'
command='$HOME/bin/switch-audio-output.sh'
name='Switch audio output'
EOF

Brother DCP-L3550CDW printer not printing

My DCP-L3550CDW printer was not printing multiple copies of the same document when asked via LibreOffice using the default (driverless) driver. It is most likely caused due to the fact the default driver does not implement the collate CUPS feature well so was hoping the Brother vendor provided DCP-L3550CDW driver is going to work fine.

How-ever printing revealed no output at all. Debugging output for the cups wrapper could be enabled (DEBUG=1) at file:/opt/brother/Printers/dcpl3550cdw/cupswrapper/brother_lpdwrapper_dcpl3550cdw which in turns stores debug logging at file:/tmp/br_cupswrapper_laser.log and file:/tmp/br_cupswrapper_laser_lpderr.

The last one give me a good error message:

Can't locate File/Copy.pm in @INC (you may need to install the File::Copy module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /opt/brother/Printers/dcpl3550cdw/lpd/filter_dcpl3550cdw line 9.
BEGIN failed--compilation aborted at /opt/brother/Printers/dcpl3550cdw/lpd/filter_dcpl3550cdw line 9.

The fix is easy:

$ sudo dnf install perl-File-Copy

And voila, printing of multiple copies is working. Big thanks to brother for providing linux printer drivers which can be debugged (unlike other vendors)!