Chad Perrin: SOB

25 January 2009

That was easy: suspend works now.

Filed under: Geek — apotheon @ 01:07

Suspend/Resume now works on my ThinkPad R52 with FreeBSD

I haven’t bothered trying to get suspend/resume to work on my ThinkPad R52 for a while. It has been long enough that I don’t remember what I tried — so I don’t know if what I did to get it working this time was something I had tried before and, at the time, didn’t work. Some software on my system has been updated, and some configuration changed, since then. As such, it’s possible that the exact same thing that worked this time didn’t work before. It’s also possible that, in the midst of my experimenting and research, I just managed to miss the very easy fix for getting things working on FreeBSD.

Relevant Specs

Hardware: ThinkPad R52 Mobility Radeon X300

Software: FreeBSD 6.2-RELEASE (yes, I need to upgrade that)

xorg.conf: Driver “radeon”

loader.conf: radeon_load=”YES”

That’s it for preëxisting system specs that seem relevant and changeable. Obviously, there’s more that might have a bearing on whether this works for you, but I think it’s all stuff that falls under the control of one of the specs I already brought up (such as hardware details that are determined by the fact it’s an R52).

Relevant Config Changes

I added this to my /etc/sysctl.conf: hw.acpi.reset_video=1

I added this to my /boot/loader.conf: acpiibmload=”YES”

Any other possibly relevant settings I left at default values. The defaults involve closing the lid not changing suspend state, for instance — which is what I want, since I tend to close my lid a lot (after locking the screen) when I walk away from my laptop for a few minutes, and don’t want networking interrupted every time I do so. Another default is having hardware devices turned off when the system is suspended so that less power is used, since I only really need to suspend when I move my laptop from one network to another anyway.

After rebooting my computer once, suspend and resume seem to work flawlessly. I’ll be using suspend from time to time now, and checking to see whether any unexpected problems surface, but so far it looks good. I’m just amazed at how easy that is, and how annoyingly difficult it is to find information that very clearly lays out the importance of these two configuration file options. Maybe my discovery will help someone else.

New Attributes, (Mostly) Old Rules

Filed under: Geek,RPG — Tags: , , , — apotheon @ 01:11

This is part of my RPG series of entries here at SOB. See the inaugural entry in the series for more details.

I’ve taken issue with the way attributes are handled in D&D for a very long time — both the names of the attributes and the way game effects are based on them. I don’t like the fact that half-orcs are, on average, mentally retarded (with a -2 Intelligence); I don’t like the fact that being likable grants you more power as a sorcerer; I don’t like the fact that people essentially have to be more learned to be better at hiding in shadows; I don’t like the fact that the ability to make out details of someone approaching from a distance is based on whether you’re wise; I don’t like the fact that being attractive is essentially a prerequisite for being any good at scaring the crap out of someone.

New Attributes

For the most part, this is solved by doing nothing more drastic to the game system than changing the names of the attributes. As a result, I’m going to start using a new set of attributes in my games:

  • ST: Strength (same as always)
  • DX: Dexterity (same as always)
  • CN: Constitution (same as always)
  • SC: Scholarship (formerly Intelligence)
  • IN: Intuition (formerly Wisdom)
  • PR: Presence (formerly Charisma)

The Scholarship attribute is not native Intelligence, nor is it a character’s current level of education. Rather, it is the character’s affinity for academic knowledge and educational study.

The Intuition attribute is the cunning, common sense reasoning, awareness, and mystical connectedness of the character. There’s a nice differentiation between Intuition and the concept of wisdom that we encounter in everyday life, too, that was not well represented with the attribute known as Wisdom.

The Presence attribute is a character’s force of personality and ability to impose his or her will on others through manipulation, intimidation, cajoling, and other nonphysical and nonmagical means of influencing others’ decisions and emotions. This also helps remind people that the physical attractiveness of a character is not necessarily identical to a given attribute — a character may be both beautiful and uncharismatic, and neither necessarily has a strong relationship to the Presence attribute itself.

New Rules

You might think these changes would require a whole bunch of new rules to make things work out smoothly. I’ve listed and explained all the rules changes I think are required to make this work well.

Skill Points:

This does increase the problem of connecting the Scholarship/Intelligence attribute with one’s skill point total in OGL/d20 games (i.e., D&D and Pathfinder), however. As such, when determining skill point totals, I’ll just let a player use the higher of SC and IN to determine skill points. As such, a Cleric who would have gotten two skill points per level with an Intelligence of 10 and Wisdom of 17, instead gets five skill points per level with a Scholarship of 10 and Intuition of 17. If you’re going to use this modified list of attributes, I recommend you do the same. It helps if you remember that a character with a higher Intuition is more likely to have a greater focus on experiential and innate talent based skills, whereas a character with a higher Scholarship is more likely to have a greater focus on academic skills (book learnin’). In cases where a character has more academic skills than talent-based skills, despite having a higher Intuition than Scholarship, I’m willing to just let it go with giving the PC the benefit of the doubt on points so that I don’t penalize a player for having attributes that best suit the character concept (I tend to prefer point-buy systems over dice-rolling for attribute determination).

That’s it. No, really — after thinking about it and discussing it with my SigO, I don’t think there are any other cases of basic game rules that need to be adjusted at all to fit with this change in the attributes’ names and concepts.

23 January 2009

framerate adjustment for crappy Flash video

Filed under: Geek — apotheon @ 11:58

About a week and a half ago, I talked about Flash Workarounds for FreeBSD — especially YouTube. I mentioned that my current approach to dealing with Flash on my FreeBSD laptop is to use the open source swfdec plugin for Firefox, which is apparently Flash 5 compliant and catching up with later Flash versions. Unfortunately, that doesn’t really solve the problem of Flash video on YouTube. My solution for that is to use youtube-dl to download YouTube videos:

youtube-dl 'http://www.youtube.com/watch?v=foo' -o bar.flv

In that example, just replace the foo with whatever mess of mixed characters identifies the video you want to watch, and bar with whatever you want to use as a filename before the .flv filename extension.

Then, with the file downloaded, I use MPlayer to play the video, after having installed the appropriate media codecs. It’s all pretty simple to set up on FreeBSD, though installing codecs may be a bit more of an onerous task on many Linux distributions.

There are many YouTube videos that, when downloaded and played using MPlayer, end up with the video and sound out of sync, however. This tends to take the form of video playing at some incredibly high framerate while sound plays at the usual pace, so that you get a few seconds into a five-minute video’s sound before it stops because all the video has already played at a rate so fast you probably didn’t even get to see everything — and what you did see definitely didn’t look right.

There’s a simple fix for the problem in MPlayer’s command line options, but it’s not exactly easy to find in the (extremely lengthy) manpage: use the -fps option to set a different video framerate. I’ve found that 30 tends to work well. Try that and, if it’s not perfect, adjust to suit your needs. The command to play your bar.flv file with the video framerate adjusted would look something like this:

mplayer -fps 30 bar.flv

Nice and simple. Yeah?

« Newer PostsOlder Posts »

All original content Copyright Chad Perrin: Distributed under the terms of the Open Works License