Jan192008

Getting suspend to work on a Toshiba Tecra M3

Filed under: fc8 tecra m3 suspend linux 

Tonight I decided two things would happen: I would upgrade to Fedora 8 and I would get my damn suspend to work (it hasn't worked since FC5).

The upgrade to FC8 went smoothly as expected (I was on FC7). I decided to dump my GNOME settings in order to not interfere with any new goodness that might get bestowed on me. More or less it was a fresh install, but like any sane person, I keep /home on a separate partition so no backup/restore was required. All in all it was about an hour from start to finish (that included reinstalling any missing apps and basically getting it back into working shape). Pretty acceptable.

After the novelty of the newish looking desktop had worn off a bit, I decided to delve in and make my suspend work (suspend-to-RAM that is, I consider hibernate or suspend-to-disk to be a waste of time).

First thing was to assess what the current state of affairs was. So without further ado, I selected "Suspend" from the GNOME power icon. They system suspended properly down to a single little blinking light on the front. So far so good. Next comes resuming. I press the power button, things come back to life, I get a tiny bit of text that says "Linu" and... nothing. Black screen. I try switching virtual terminals, ctrl-alt-backspace, etc, all to no avail. The system isn't locked up (I can see disk light activity when I killed X) but there's no screen. Ctrl-alt-F1 and ctrl-alt-del reboots me. I do some research and finally come upon this page. I've seen it before but felt daunted by the absolute denial that my configuration was supported (binary nVidia driver) and that my laptop model invoked pages of not mentioning. I decide to forge ahead anyway.

My process is going to basically be trial-and-error. There are only so many quirks to try. Because I don't want to screw up my brand new GNOME settings (Gconf has a tendency to bork your settings if you kill it enough), I create a user called "pm" for testing with. I begin trying the most promising settings first (--quirk-vbe-post, etc). Nothing, nothing... nothing. Lots of reboots and little to show for it.

But then. Finally:

$ pm-suspend --quirk-vbe-post --quirk-dpms-on

and voila. I'm right back in GNOME where I left off. Joy.

Next step is to make this permanent. Following the docs, I edit:

/usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-toshiba.fdi

and add the following section:

<!-- Toshiba Tecra M3 -->
<match key="system.hardware.product" string="TECRA M3">
  <merge key="power_management.quirk.vbe_post" type="bool">true</merge>
  <merge key="power_management.quirk.dpms_on" type="bool">true</merge>
</match>

Next I restart HAL with:

# service haldaemon restart

and finally the grand final test: select Suspend from the GNOME power icon.

Works perfectly.

Anyway, I hope this helps someone else. I'll post on the nVidia forums and Fedora forums.



3 comments Leave a comment


Jul142008

More thoughts on LinuxHater and FOSS

Filed under: linuxhater linux 

LinuxHater is an effective man. His blog is like a car-wreck you can't peel your horrified eyes away from despite your desire to maintain a sense of decency and the terrible knowledge that you will be haunted by disgust for days afterward. It's damn hard to stop reading his crap.

Anyway, in much the same way that watching the Special Olympics makes us ponder our own humanity, LinuxHater has compelled me to think about what makes FOSS fundamentally different than proprietary software.

First of all, ask yourself, why the hell would anyone write software for free? I mean, writing software is hard in general and you can actually get paid to do it. What kind of moron gives it away? Here's a suggestion: ask your wife/girlfriend why she doesn't charge you for sex. After all, there's clearly a market and, regardless of what you might like to believe, having sex with you isn't likely the pinnacle of sexual experience for a woman. Still, she does it. There's some inexplicable driving force that causes an otherwise sane person to want to get sweaty with your fat ass. We refer to this phenomenon as "love", probably for lack of a more rational explanation.

Free software is driven by a similar force. Software developers, like women, come in two handy flavors: the ones who do it for love of the task, and Professionals. Now, I have nothing against professionals, but there is a very, very small intersection of people who are both paid to do something and love what they are doing. This means that most of the people who write "professional" software hate their jobs. In contrast, I'd be amazed to find the open source contributor who doesn't love his job. This doesn't mean that the the open source developer doesn't face the same frustrations as the professional developer, only that they are differently motivated and one's expectations of them should be different than a professional. To illustrate this point, consider again your wife or girlfriend (or "life partner" for you fruity-rainbow Mac folks). There are certain, um "tasks" that are almost exclusively the realm of professionals. So when a free software developer tells you in no uncertain terms that he's not going to bend over for you, perhaps you should take it with the same disappointed silence you do when your wife declines to do that thing you saw on while browsing thumbnail sites or maybe, just maybe you might help taking take out the trash now and again you lazy bastard.

You might just get lucky.



2 comments Leave a comment


Jul122008

LinuxHater, and why he's both right and wrong

Filed under: linuxhater linux osx 

Somehow I missed that this guy has a pretty interesting blog, even if it's a bit difficult for a Linux user to read due to the apparent vitrol he extols with every other word. It's hard to read because so many of his bitches about Linux and FOSS are dead-on and it hurts a bit to have the weaknesses of Linux pulled from under the rock and cooked with a magnifying glass. It's also hard to read because the truths are so insidiously intertwined with utter crap that your mind has to do somersaults to properly separate and digest it.

LinuxHater lives in a world of hypocrisy. Why? Because he simultaneously rips into FOSS and then turns and compares OSX in a positive light. Maybe he should remove all FOSS software from OSX and then tell me how much he likes it: remove Mach, BSD, Safari, Adium, bash, etc and then tell me how great it is. Apple has done a wonderful job of polishing these FOSS turds with their millions of dollars. Quite an amazing feat. Take free software, spend tons of money cleaning it up, and then call it your own. Brilliant, if your name is Montgomery Burns.

Secondly, OSX runs on a very limited amount of hardware. I don't necessarily think this is a bad thing, but I expect running OSX on, say, a cheap Dell laptop would not be a much happier experience than with Linux (in fact, probably worse). Would suspend work? How about the sound card or 3D acceleration? Maybe, but your odds would be probably much better with Linux. He complains that Ubuntu crashes on him frequently. As anyone will tell you, this is almost certainly caused by hardware problems (either broken hardware or poorly-supported hardware). Any computer with unsupported or broken hardware is almost guaranteed to cause serious stability issues regardless of the OS you use. Next time, buy a Linux-certified PC (they do exist!).

Of course, any time I mention Apple's limited hardware selection, I'm forced (by the buildup of bile) to point out that Apple's computers tend to be among the most expensive. Sure, you can argue that the price difference will be made up by time save by not futzing around with cheaper alternatives. We could also just solve the world's energy crisis by insisting everyone buy a new electric vehicle. I know that in our precious sense of self-entitlement we often forget that some people actually have more time than money, but let us take a moment to remind ourselves that not everyone is skinny because they are rich anorexics, or that they buy clothes at second-hand stores simply because they have no sense of fashion. Linux fills a niche for those not rich enough to get on the proprietary-software wagon.

And yes, I know many of you will point to the $1200 wonders that Apple sells as low-end models. $1200 isn't horrible for a laptop, but those particular laptops tend to be end-of-life models that would normally appear on overstock.com or in the vendor's closeout section if they were PC's. I just purchased a Sony Vaio for $620 from overstock.com (core2 duo, 15" widescreen). I decided to check what a similar Mac would cost, but I couldn't. You either pay $1100 for a 13" Mac, or jump straight to $2000 for the Pro series. Inexpensive 14" and 15" Macs are a thing of the past, apparently. I guess sometimes choice is a good thing.

Anyway, back to the main topic.

Windows has the same problem Linux has in regard to hardware (it must support a wide variety of hardware), but it gets around the lion's share of the problem by getting support from hardware vendors. They don't have to write 435,485,308 drivers, just charge vendors to have the driver certified. Frankly, there is no way to force vendors to do this from the Linux world. Linux must rely on good will from vendors (e.g. nVidia, Intel, AMD) and the work of volunteers (many of whom have other jobs that actually pay money). Of course, even this actual advantage has failed to make Windows any more stable. After 5 or 6 years, XP was actually usable (if mind-numbingly boring), but Vista is the most god-awful piece of crap I've ever had to pinch my nose over while downloading a Fedora DVD to replace it. Microsoft has had exactly two successful operating systems (from a non-suck perspective): NT 3.1 and 2000. Neither of them were very interesting but at least didn't remind you every 3.5 seconds that there was an OS there who's primary function was to prevent you from working.

At the end of the day, I can't help but wonder what the hell LinuxHater's problem is. If he hates Linux and has the money to buy a Mac, then fucking do it. No one is forcing him to accept what amounts to a free gift and certainly no one is asking for his whining about it (even if he's right). If he's forced to use it at work, then maybe I can sympathize a bit (I bitch endlessly when forced to use Windows or Mac for more than a few minutes), but I doubt this is the case. It sounds to me like a case of someone with too much time on their hands (and too much disposable income as well). Nothing like being rich and bored to get that endearing sense of entitlement and superiority going. At the end of the day, it sounds like LinuxHater is probably technically capable enough (and certainly loud-mouthed enough) to make splash in the FOSS world and help address some of the issues he finds so annoying, so the fact that he doesn't simply leaves me believing he needs his diaper changed.

Some people seem to believe that he's making a valuable contribution by pointing out the shortcomings in Linux. If you also consider punching someone in the mouth when they buy you socks for Christmas as valid criticism, then I guess you might agree.

LinuxHater: we get the message. Please take your ball and go the fuck home.



3 comments Leave a comment


Feb82009

htop: an alternative to top

Filed under: linux 

I love top-esque utilites, so here's htop.



2 comments Leave a comment


Dec92006

Easiest Setup for IE on Linux EVAR

Filed under: ie explorer linux 

If you do web development and Linux is your primary environment, you know how annoying it is to keep a dedicated Windows box around just for testing Internet Explorer. VMware is a good solution but kind of overkill for one app. Here's the easiest way yet:

ies4linux

Enjoy.



0 comments Leave a comment


Jun52006

Wifi Radar

Filed under: wifi linux 



0 comments Leave a comment


Feb42009

Speed up multiple SSH sessions

Filed under: linux 

I often use multiple SSH sessions into the same server. I also do things like port-forward remote ports to local ones (for accessing managed switches, databases, and other things that might not have a public IP address).

A trick I've used before is having ssh setup a "master" socket, so that all ssh sessions to a particular host use a shared connection. This also prevents the harmless but annoying messages about being unable to forward ports that have already been forwarded by another ssh session. However, the method I'd been using previously required that I start the first ssh session differently than subsequent ssh sessions.

Tonight I stumbed across this article in Linux Journal which gives a really great setup that gives all the benefits of my old method and makes the whole process completely transparent.



0 comments Leave a comment


Feb42009

iotop rocks

Filed under: linux 

If you have a recent Linux kernel, iotop is a new utility that makes detecting I/O hogs a snap.



0 comments Leave a comment


Nov22009

Linux and Intel wireless cards

Filed under: intel+wifi linux 

If you've got an Intel wireless card (especially 802.11n adapters), I highly recommend using the latest drivers from the kernel wireless project.

I have an Intel 5100 and was experiencing lots of lost connections, especially under any type of load. Not only that, but it would typically max out at 60Mbps. Since updating to the latest stable drivers, I now get around 130Mbps and haven't had a single disconnect, even when pushing a total of 2.4GB at 9.9MB/s to a server on my LAN. It also seems to associate much quicker, but that might just be my new love for the card.

As a note, these same drivers are available in Ubuntu via the backports package, but I don't recommend using this as it includes a lot of other drivers, and for me, I experienced kernel panics when using them. I also note that uninstalling them doesn't remove them from /lib/modules/2.6.x/updates, so you get to have fun figuring that out on your own.

I finally got my issues resolved by completely removing all files from /lib/modules/2.6.x/updates and following the build/install directions for the new drivers.



0 comments Leave a comment


Aug102010

noatime and tmpwatch: oops

Filed under: linux noatime tmpwatch 

from "man tmpwatch":

Make the decision about deleting a file based
on the file's atime (access time). This is the default.

Combine this with a common trick of turning atime off on filesystems and you have a recipe for breaking things that expect their temporary files and directories to be around when they need them. I configure Nginx to put its temp files under /var/tmp/nginx, but that directory kept disappearing. I added code to build the directory tree when Nginx is started, but they would disappear while it was running. Turns out that noatime is the culprit, and tmpwatch is the unwitting accomplice.

There's a few ways to fix this issue:

  1. Put your temp files somewhere else.
  2. Use relatime rather than noatime. Unfortunately relatime is only available in newer kernels (2.6.18 doesn't have it).
  3. Change tmpwatch to use --ctime. There's a nice writeup on this here.

In the case of Nginx, I actually decided to move the temp files to /var/run/nginx. Since the files in question are actually temporary buffers that Nginx manages on its own, this seemed the right solution.



0 comments Leave a comment




Copyright © 2007, Cliff Wells