Use Keyboard to resume from standby

March 6th, 2010, 9:03 pm

One of the things that would always irritate me, with Linux, was the fact that I could not resume my machine by hitting a key on the keyboard.  When I first searched for an answer, to this issue, many of the replies stated “look for an option in the BIOS.” To my dismay, I had no such option in the BIOS. After more searching I found /proc/acpi/wakeup!

/proc/acpi/wakeup looks like this:

Device	S-state	  Status   Sysfs node
UAR1	  S4	 disabled  pnp:00:08
SMB0	  S4	 disabled  pci:0000:00:01.1
USB0	  S4	 disabled  pci:0000:00:02.0
USB2	  S4	 disabled  pci:0000:00:02.1
US15	  S4	 disabled  pci:0000:00:04.0
US12	  S4	 disabled  pci:0000:00:04.1
NMAC	  S5	 disabled  pci:0000:00:0a.0
P0P1	  S4	 disabled  pci:0000:00:08.0
HDAC	  S4	 disabled
MXR0	  S4	 disabled  pci:0000:00:10.0
BR11	  S4	 disabled
BR12	  S4	 disabled  pci:0000:00:12.0
BR13	  S4	 disabled
BR14	  S4	 disabled
BR15	  S4	 disabled
BR16	  S4	 disabled
BR17	  S4	 disabled

Now this might be confusing, at first, but do not fear! We are interested in only two types of devices: USB and US

USB0	  S4	 disabled  pci:0000:00:02.0
USB2	  S4	 disabled  pci:0000:00:02.1
US15	  S4	 disabled  pci:0000:00:04.0
US12	  S4	 disabled  pci:0000:00:04.1

To figure out which device is which take the number after pci: and run grep on dmesg. Example for US15: dmesg | grep 0000:00:04.0

You will likely get a lot of output… you should look for something similar (Note: this differs by hardware, it likely won’t be the same)

[    6.164097] usb usb4: SerialNumber: 0000:00:04.0
[    7.284302] input: BTC USB Multimedia Keyboard as /devices/pci0000:00/0000:00:04.0/usb4/4-3/4-3:1.0/input/input2
[    7.284363] generic-usb 0003:046D:C312.0001: input,hidraw0: USB HID v1.10 Keyboard [BTC USB Multimedia Keyboard] on usb-0000:00:04.0-3/input0
[    7.300110] input: BTC USB Multimedia Keyboard as /devices/pci0000:00/0000:00:04.0/usb4/4-3/4-3:1.1/input/input3
[    7.300287] generic-usb 0003:046D:C312.0002: input,hiddev96,hidraw1: USB HID v1.10 Device [BTC USB Multimedia Keyboard] on usb-0000:00:04.0-3/input1

As you can see US15 is my USB keyboard so I will simply run echo "US15" > /proc/acpi/wakeup to allow US15 to wake up the computer.

USB0	  S4	 disabled  pci:0000:00:02.0
USB2	  S4	 disabled  pci:0000:00:02.1
US15	  S4	 enabled   pci:0000:00:04.0
US12	  S4	 disabled  pci:0000:00:04.1

If it is not appearant which devices are which there is always the trial and error process. Enable one, see if the desired device wakes up the machine and if it doesn’t, disable the device (by executing the echo command again) and try another.

Lastly just add the echo command to your startup script. On Arch /etc/rc.local is a good place.

Tags: , , ,
Category: Linux | Comment

PacketTracer 5.2.1 – Linux

January 15th, 2010, 3:22 pm

There is a bug with PacketTracer which seems relatively minor but can cause a lot of frustration to users.

Take me for example: I am taking Cisco 3. It has been 2 years since I took Cisco 1 and 2. The first day in class we were given a review packet tracer file to work on. I forgot to save and when I finally remembered it bit me in the but! I went to save my work and PacketTracer crashed! I lost everything.

Issue: PacketTracer 5.2.1 crashes / segfaults on linux when saving files.

Reason: PacketTracer 5.2.1  is built against Qt 4.4.3.  However, it is using the system version of Qt which is likely newer. In my case, I’m using Qt 4.5.3. Many other distributions also use 4.5.3. It appears that there has been a code change between Qt 4.4.3 and 4.4.5; therefore, making 4.4.5 incompatible with PT 5.2.1.

Solution: Have PacketTracer use the qt libs that it ships with.
This  can be accomplished with the use of LD_LIBRARY_PATH and a shell script.

#!/bin/sh

export LD_LIBRARY_PATH="/opt/pt/lib"
/opt/pt/bin/PacketTracer5

Adjust the paths as necessary, save the file, and make it executable.
PT might not look as nice and pretty, but it won’t crash!

Tags: , , , ,
Category: Uncategorized | Comment

PAL to NTSC

October 25th, 2009, 1:15 pm

I was asked to convert some European (PAL) dvds to the American (NTSC) format. With the help of a few linux tools, the process is pretty painless. A cautionary note: the process takes about 3 hours for one dvd using  my AMD X2 7750.

What you need:

First, we need to rip the DVD to the computer. We can do this by using dvdrip or vobcopy. Vobcoby is a simple command line utility that rips vob files straight from the dvd to the hard drive. dvdrip is a gui tool which is very easy to use. Load it up, create a new project, select the rip tab, and pick the title you want to rip. Ripping the dvd will probably take anywhere from 15-20 minutes.

Vobcopy Example: cd /home/pyther/dvdrip and vobcopy /dev/sr0

Next, we want demux (seperate) the audio and the video. ProjectX is very easy to use for this task and ProjectX insures the video and audio stay in sync.

To Demux the video:

This result in the following files being created:

If there are multiple audio tracks you will see zorro-001.ac3, zorro-001[1].ac3, zorro-001[2].ac3
In my case:

Lets clean up the directory right now:

Tags: , , , , ,
Category: Linux | Comment

RHCT Taken…

July 24th, 2009, 3:17 pm

Well  I got up this morning at 4:30am and headed of at 5:15am to Columbus, Ohio. The trip wasn’t bad, however the fog made it a bit harder. After 2hrs and 20 minutes in the car I made it. 1hr 30min early. I got breakfast, and looked over a few things.

The exam was fairly easy and took me about 1hr 30 minutes to complete. I got stuck on the last part of the exam which involved auto-mounting.

On my way home I stopped at Hardee’s, a great burger place!

We were instructed that we would be given an email letting us know if we passed or failed.

Tags: , , ,
Category: Linux | Comment

Evolution of the Arch Community

June 28th, 2009, 7:35 pm

I have been using Arch Linux since 2005. It is a great distro and there are a few devs that are still keeping it the Arch Way. For this I am grateful. However, the community has taken a change for the worse. When I first started using Arch if you asked a noob question you were given a man page or a google query. If you wanted to succeed with arch, you had to read up. I think this turned away a good amount of users, but that was the type of distro Arch was. Now the community is soft, we are willing to put up with people that have no clue what they are doing and that can’t survive on their own!

ataraxia summed it up very well:

“A part of me really misses those old days. We’re far too welcoming of people who don’t substantially get what The Arch Way is even about, or who just don’t agree with it. Arch hasn’t been materially harmed by the changes, but I think we’re overly patient in these forums nowadays with people that are just too inexperienced to succeed anyway, and even more so with BIGNUM practically-identical threads that could have been avoided by simply reading the last day’s posts (or even the front page news) before posting a new thread.”

Tags:
Category: Linux | Comment

New Computer

June 8th, 2009, 7:18 am

Well I was not excepting this to come. Let me explain. First my mother’s laptop died, sort of. It would be on AC power and then suddenly switch over to battery power. Because the battery no longer held a long charge ( <5 min), this became problematic. I decided it was best to give my mom my Dell Vostro 1000 laptop and just buy some cheap stuff from newegg. As you may or may not know my desktop at the time was an Atom 1.6ghz. This was enough for normal everyday tasks, but not enough for the occasional Virtual Machine or movie conversion.

$150 for a motherboard, cpu, and a stick of ram sure in the hell beats $400 for a mediocre laptop.  I ordered the parts, but later that night I found out that the sata card on my server stopped working. This meant no more Hard Drives! Needless to say this caused the Linux to crash and it was impossible to bootup again.

So Linux saved the day… It was about 11:00pm and I was getting ready to go to bed. This was when I found out my server’s sata card just died. So I took my Atom desktop, took out the hard drive, and tossed the server’s drive in there. Then with a little bit of file editing (fstab, grub, and inintrd boot image) I had the system back up and running.  So in three hours I had the whole server back online with all its services going. Now lets see that happen with Windows.

Finally, the motherboard, stick of ram, and cpu arrived. To make a long story short, I installed everything into the case that was housing, the now broken, server. Everything was going fine and I installed Arch Linux. I went to run firefox, but had no luck. I was receiving a “Bus Error”. After a quick google and some time on IRC I determined there was a corrupt library installed. Instead of trying to figure out what lib was corrupt I figured it was just easier to reinstall as I didn’t have much setup.

I reinstalled and now everything is working without a hitch. Now for the part you’ve all been waiting for, the specs!

The PSU and case are 4-5 years old, but, hey, they work. Overall this is a pretty nice system. It has more than enough power for what I need it to do. My only complaint with the motherboard is that suspend-2-ram is total trash in Linux. The onboard nvidia graphics are pretty nice too. I can play UT2004 which makes me happy!

I need to replace the power supply as it is very loud! I will probably do this before I go of to college as I doubt my roomate wants to listen to a blaring fan all night long!

Tags: , , ,
Category: Hardware | Comment

12/14/2008

December 14th, 2008, 11:14 pm

2008-12-14

WM: Openbox
GTK: MurrinaGilouche
Wallpaper: Lambency Blue
Tray: Stalonetray
Sidebar: Conky
Top Bar: Conky (mpd info + clock)

Tags: , , , , , ,
Category: Screenshots | Comment

Xorg 7.4

November 16th, 2008, 8:13 pm

Xorg’s hotplugging is pretty cool. I installed it both on my desktop and laptop. I can unplug my mouse from my desktop and plug it into the laptop. Within a second or two it detects the mouse, and it supports all the fancy buttons (middle click, back/foward buttons).

Just simply amazing!!! Now I just can’t wait until the open ati driver becomes stable!

Tags: , , , ,
Category: Linux | 1 Comment »