Monday, May 18, 2009

Fix a Frozen System with the Magic SysRq Keys

http://fosswire.com/post/2007/09/fix-a-frozen-system-with-the-magic-sysrq-keys/
It says:
You finally got your Linux environment to crash. Ctrl+Alt+Backspace does nothing [...]
The Linux kernel includes a secret method of restarting your PC should it ever stop doing its job.
  1. Hold down the Alt and SysRq (Print Screen) keys.
  2. While holding those down, type the following in order. Nothing will appear to happen until the last letter is pressed: REISUB
  3. Watch your computer reboot magically.
What the individual keys do in that sequence are not as important as
what it does as a whole: stops all programs, unmounts all drives, and
reboots. A lot safer than just cutting the power.

Here it is again: REISUB. Remember that, as it
will save you a lot of time when you are configuring a system and
something gets messed up. Need a mnemonic? Try Raising Elephants Is So Utterly Boring.


nix's note (09 Dec 2008):
Just some other additional notes: alt+print screen + REISUB = reboot alt+print screen + REISUO = shutdown

---------

See also:
http://en.wikipedia.org/wiki/Magic_SysRq_key:
The AltGr key, if present, can be used in place of Alt key in order to avoid alternative uses of these combinations such as Screenshot for Alt+SysRq+s under Gnome. It also can be accessed from the serial console
[...]
unRaw      (take control of keyboard back from X), 
tErminate (send SIGTERM to all processes, allowing them to terminate gracefully),
kIll (send SIGKILL to all processes, forcing them to terminate immediately),
Sync (flush data to disk),
Unmount (remount all filesystems read-only),
reBoot.

This can prevent a fsck being required on reboot and gives some programs a chance to save emergency backups of unsaved work.

Another common version of this mnemonic device is "Raising Skinny Elephants Is Utterly Boring", which performs the same task, but in an alternate order. There is debate regarding whether the Sync command should come earlier or later.

Wait a few seconds between each command. For example, many applications will do an emergency save on receiving SIGTERM, but if SIGKILL is sent too soon, the application will not have time. Likewise, the Sync and Unmount processes need a few seconds before the system is rebooted.



ZyXel G-220 v2 on (Myth)Ubuntu 8.04 x86_64

Issue:
System hangs upon insertion; need several reboots before working.
It used to work fine with Mythbuntu 7.10 x86_64.
A friend tested it on its Ubuntu 8.10 x86 and it works --> is it a 64-bit issue?

Suggestions:
1. blacklist:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/74362
Tim Gardner wrote on 2007-03-27: (permalink)
Try a more current driver by blacklisting zd1211rw:
edit /etc/modprobe.d/blacklist and add zd1211rw
edit /etc/modules and add zd1211rw-mac80211
Either reboot or 'modprobe zd1211rw-mac80211', then insert the zd1211.
2. cardbus:
issue muight be related to cardbus and USB system (my pc seems to hang because both mouse and keyb are USB...)
http://communities.vmware.com/message/575305#575305
In short, the problem was Ubuntu not mounting USBFS to /proc/bus/usb.
Solution:
sudo mount -t usbfs none /proc/bus/usb
and add the following line in the /etc/fstab file:
usbfs /proc/bus/usb usbfs auto 0 0
Similar effect should be obtained if inserting a another USB dongle and AFTER that the USB wifi key: the first insertino should trigger the usbfs system, than the wifi key mounts with no issue.
3. kernel
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/74362
Mark Krapivner wrote on 2008-09-20:
i worked with alpha 6 a few days and i didn't encounter this bug (with Kernel 2.6.27), if any one else can confirm it's fixed too please do so :-)
BUT, this bug still exists on kernel 2.6.24 that comes with hardy, which is an LTS release.

SnowTDM wrote on 2008-05-09:
[...]
But if I start 8.04 version with 7.10 kernel (2.6.22) card connects perfectly, including with WAP encryption. It also connect if I boot with 7.10 desktop CD.
I think it is a problem with driver or module zd1211rw in conjunction with new kernel.
4. ndiswrapper
my try:
blaklist zd1211rw module and try ndiswrapper with the original windows driver

Monday, May 4, 2009

PVR-150 IRBlaster

Periodically, I spend some time on the internet looking for a "simple" and "working" method to let the IRBlaster of my Hauppauge PVR-150 pilot a SKY satellite receiver.
The system is now upgraded to a Mythbuntu 8.04.1 x64.

Recently I've found two interesting hints:

This last post here, and the raw codes for the SKY receiver here (only italian).

rkocher writes:


Remove lirc by running:

"sudo apt-get --purge remove lirc"

To ensure the driver is not still loaded run:

"modprobe -r lirc_i2c"

Then follow the instructions at http://www.blushingpenguin.com/mark/blog/?p=24

which links to the evergreen "Marks' Braindump" blog, which has recently been updated for the recent kernels.

I'll give it a try soon