2015-11-08

Reset Toner on Brother MFC-9340CDW

The original Brother toner cartridges for the Brother MFC-9340CDW printer runs out of toner after a programmed amount of toner usage which is of course useless. This is how to reset the toners so you can continue to print for quite some time:

- Close all warning and error message windows and return to the main menu.
- Open the Fax menu
- Mark the '*' Button with a pencil, or just remember where it is. Do not press it. It will disappear in the next step.
- Return to the main menu.
- Open the printer so you can see the toners. 
- Press and hold the hidden '*' button for 7 seconds.
- A toner reset menu appears. Reset the toner in question.
  - Choose K=black, C=cyan, M=magenta, Y=yellow, STR=starter (small), STD=standard, HC=high capacity.
- Close the printer and return to the main menu.

See also https://www.timoschindler.de/brother-mfc-9140cdn-toner-resetten/


2015-09-30

Copy multiple lines from Windows Command Prompt (cmd.exe)

Holding down shift while pressing the right mouse button in the selected area copies the text and removes all linefeeds. This is not proper cut/copy/paste of multiple lines, but works for a single long line spanning multiple terminal lines. It is better than nothing.

2015-09-28

Visual Studio Intellisense: No focus on suggestions.

For some reason sometime my Intellisense changes behavior every now and then (probably a Linux Keyboard shortcut entered in VS). To fix this:

1. Type something so the Intellisense Popup opens.
2. Press Ctrl+Alt+Space to toggle whether the suggestion should have the focus or not.



2015-09-17

Volumio autoplay with NAS (hack)



Goal: Let Volumio 1.55 automatically start playing music automatically after the Raspberry Pi is powered on. The RPi is used completely headless and without any buttons, and while it is fine that I can control it through my phone or a computer, I sometimes just want to start the music on random play by flicking a plain old power switch and nothing more.


After a lot of fiddling with /etc/rc.local I realized that the NAS is mounted only after my commands in rc.local were executed. A sleep may help, but rc.local is killed if you sleep to long ... argh, nasty!




Instead I decided to hardcode the autoplay into the PHP scripts directly. I don't know any PHP, but how hard can it be?




Edit file /var/www/command/player_wrk.php and search for 'WORKER MAIN LOOP'.

Add the following lines before the '// --- WORKER MAIN LOOP --- //' line:




// Autoplay

sleep(5);

$cmd = 'amixer cset numid=3 1';

sysCmd($cmd);

$cmd = 'mpc repeat on';

sysCmd($cmd);

$cmd = 'mpc random on';

sysCmd($cmd);

$cmd = 'mpc consume off';

sysCmd($cmd);

$cmd = 'mpc single off';

sysCmd($cmd);

$cmd = 'mpc play';

sysCmd($cmd);




The amixer line tries to force 3.5mm jack audio output. Not sure this works. Omit it if you use your own DAC or HDMI.

Not sure the sleep(5) is necessary. This is actually not specific for NAS and should work with any source. It should play the playlist which was last active.




I would love to have this in the GUI, but I do not know how to hack that in.




Ah yes. Completely unrelated and just so I do not forget it: To get my TL-WN725N WLAN Dongle working with volumio 1.55 I had to download the firmware for it:

sudo wget https://github.com/lwfinger/rtl8188eu/raw/c83976d1dfb4793893158461430261562b3a5bf0/rtl8188eufw.bin -O /lib/firmware/rtlwifi/rtl8188eufw.bin

2015-05-07

Mac OS X telnet escape character on a german keyboard is Ctrl+Ü

The title says it all. To get the telnet escape char (^]) in a Mac OS X Terminal, for example to quit telnet, you have to type Ctrl+Ü on a german keyboard.

2015-01-12

Update Samsung SSD 840 EVO firmware on Zotac Linux server (poor read performance of old files).

My Samsung SSD 840 EVO was suffering from the apparently well known problem that 'old' files (files which have been written a long while ago and not touched since) had slow read transfer rates (as low as 5 MBytes/s in places, 29 MBytes/s for some big files I had).

I have a Zotac server without a CD drive, so I needed to run the Samsung Performance Restauration tool. I used the DOS / Mac variant which is a DOS bootable disk which contains the update tool. The easiest way to prepare the USB stick is NOT to use the USB zip provided by Samsung but to use the *.iso file (Samsung_Performance_Restoration.iso) instead:

- Mount the ISO file and get the file ISOLINUX/BTDSK.IMG from it.
- dd the BTDSK.IMG directly onto a USB stick
- boot from the USB stick and follow the instructions

On my Zotac machine when booting from this USB stick I got a couple of broken error messages about not being able to boot from device XYZ, but it booted OK from the stick after a couple of seconds.

The performance restauration procedure took 4.5h for a 1TB SSD (60% full) and about 15h for another 1TB SSD (95% full), so expect this to take some time.

Both SSDs were not erased by the procedure.


Avoid hang of headless Zotac server on Ubuntu Linux reboot. (How to disable the graphical console for grub and the Linux kernel.)

My Zotac server did not reboot without a monitor attached. Booting from power-up did work ok. The graphical console of grub seemed to be the problem. Since I do not use the monitor output at all not setting any graphics mode at all and using the 80x25 default console is fine for me. This is how to disable the graphical grub console:

Edit /etc/default/grub

Uncomment this line:
GRUB_TERMINAL=console

In addition I disabled setting any graphics mode on the Linux kernel and setting the timeout to 1 second.

My /etc/default/grub  file now looks like this:
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="text nomodeset"
GRUB_CMDLINE_LINUX=""

GRUB_TERMINAL=console

Reboot time: The time between pressing enter after 'reboot' and being logged in again with ssh is 25s.