Older blog entries for aristeu (starting at number 73)

decided to give github a try today. awesome service so far.

if you got a Nyko blu-wave and want to use it with Elisa:

svn co https://jake.ruivo.org/uinputd/trunk/jsremote

and follow the README file :)

after spending some time trying to get into advanced mode on my second iogear KVM, I finally figured out what's wrong. on the user manual it says:

1. press and hold clear key for two seconds.

2. press and hold minus key [-] key for one second.

3. release minus key [-] and within one second also release clear key

when, in reality it should be:

1. press and hold clear key for two seconds.

2. tap on the minus key.

3. release clear key shortly after.

I'm sick and tired of fixing cosmetic issues trying to add support to PS3 bluetooth remote to linux (three months redoing patches). I'll just leave the latest version of the required patches here. good luck trying to get past the fashion police.


Yes, the patches do work. If you have problems _using_ the patches, feel free to contact me.

So, the problem is solved. First off, its SUBSYSTEM is input not usb. We're handling a evdev device creation, don't forget. The final version:

ACTION=="add", SUBSYSTEM=="input", KERNEL=="event*", GOTO="wacom_rules"

ATTRS{idVendor}=="056a", SYMLINK+="input/wacom"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0000", SYMLINK+="input/wacom-tablets/penpartner input/wacom-tablets/penpartner-%b"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0010", SYMLINK+="input/wacom-tablets/graphire input/wacom-tablets/graphire-%b"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0047", SYMLINK+="input/wacom-tablets/intuos2-6x8a input/wacom-tablets/intuos2-6x8a-%b"


ATTRS looks for the file on the parent directories as well, solving the problem here.
One note is that if you try to get ATTRS{idVendor}=="056a" on the first rule to avoid repeating on all rules, it won't work, no idea why udev behaves this way.

It's easy to get upset with udev. On rawhide, the wacom rules simply don't work. The problem is that now there's no decent way to get Vendor/Product ids when you receive an eventX creation event. This is needed so the wacom rules can create /dev/input/wacom-tablets/<model> link. The current ugly way to fix it is to use ATTR{../id/vendor}. There must be a better solution. Yes, the rule worked for some time (BUS=="usb", KERNEL=="event*", SYSFS{idVendor}==...)

Spent my last days feeling like crap. Between fury explosions passing by depression and moments of extreme tension. The feeling that everything was falling apart. Something was terribly wrong. First suspect was the fact I don't go to climbing gym for a week, wrist injury. The lack of exercise can make me more nervous, but this is not the case: going to the gym everyday spend some time on treadmill. Coffee. In larger quantities or a stronger one can lead me to this behavior. Not the case also, I haven't been drinking more than the usual nor trying new brands. It could be lack of sleep. Hm, don't think so. I've been sleeping more than the usual since this weekend. Imagine trying to debug your brain while wanting to smash everything around. Not fun.

So, the answer came yesterday at night. I decided last friday that I wasn't having enough sugar. I'm a kind of person who prefers anything with salt than a chocolate or candy. Anyway, while reviewing what I usually eat everyday, I decided that would be healthy to have some chocolate everyday, some pieces. But what caffeine does is simply accelerate the sugar burn and having more than the usual on my veins made the amount of coffee I usually drink everyday more effective. This added to some problems I had last days resulted in a damn hard week.

No more coffee.

for you.




hm, what about dropping the chocolate instead?


after some time, I finally decided to do something about energy saving. I bought one of these to keep my home server running on constant power outages we got here. I installed apcupsd daemon and the CGI to provide informations about the state of battery, etc. I noticed that my home server - amd64 dual core 3800+, 3 SATA disks -, with a 19'' TFT monitor, DSL modem and a WRT54GS use 15% of APC capacity when idle and when I was compressing a big file with bzip2 (thus using one core, plus two disks (RAID1)) the usage jumped to 20%! It's 60VA more. Amazing.

I just resubmitted a very simple patch by the fourth time, at least. seems I just can't focus the code I'm writting and can't concentrate. seems I need a *lot* of effort to do so in these days. I wonder what this could be. if it's because I'm tired, I'm tired for months already and it's scary even to imagine how much time resting I would need to fix this, if this is the real problem. seems it's not going to improve next weeks, having to organize all stuff to my relocation.

fn <-> ctrl
OK, I'm getting closer to finally swap this 'fn' key with ctrl on mac's keyboard. And I need to do it quickly, before I get used with it. Lemme explain the problem first.
This powerbook has its keyboard and other keys (power button, eject button, etc) behind a bus, called ADB. I heard about some Apple notebooks using USB for its keyboard. But it's not my case. The problem with this is this keyboard controller, even reporting Fn key as a regular key (some controllers don't even let you know that there's a Fn key, making it impossible to do) but do some Fn + key sequence translation in hardware. For example: you have to configure this controller to tell if the F1-F7 keys, while pressed alone will generate a F1-F7 key event or the special functions. This could be pretty anoying: to have F1 key you should press Fn too: ctrl + alt + fn + f1 to switch from console to X. Anyway, the question here is that the keyboard controller _won't_ tell you that Fn + F1 key were pressed, only a F1 key event will show up (or brightness down).
If this processing were done in kernel level (i.e. Fn keypress + F1 would generate a brightness down, processed in kernel) it would be a lot easier to just swap the Fn with Ctrl before this processing and that would have a chance to be included in Linus' tree. But it isn't that simple.
To have this done, we have to know how the controller is configured and translate all the keys back. e.g.: if keypad's '3' is pressed, we must check if fn key were pressed before and if it were, we must generate Ctrl + 'l'. If 'l' is pressed, we must check if Ctrl is pressed and translate it to keypad's '3' killing the other 2 events. Definitely something that should be done in user level. We'll be back to this shortly.
Why don't you buy a real mouse?
One of the top issues for an Anything-but-Mac user to begin to use a mac is the mouse. On desktops it can be easily replaced by other, real, mouse. But in notebooks, it isn't so easy. You can't ignore the touchpad. It's there, built-in, doesn't waste more space in your backpack or workspace. To solve this, some sysctl options were created to emulate the second and third mouse buttons using keyboard keys. On MacOS, instead, applications usually have a modifier + mouse button to emulate other keys. This is a lot nicer because you don't lose one of your keyboard keys. Doing this on kernel isn't easy: this PowerBook has the keyboard behind ADB but the touchpad is an USB device and communicating one with other would be a big kludge and probably won't be accepted for inclusion (I agree with them). So, Michael Hanselmann began to work on inputd, a generic userspace daemon to do this kind of remap. Just for fun, I decided to write a simple application only to solve this specific problem: emulate second and third buttons using a key modifier: apple_mouse was born. But I wasn't satisfied with this. I really hate this Fn key, so I could use it as key modifier to use with apple_mouse. Not long time later I discovered Fn key isn't being reported by adbhid. While doing this, I decided it was time to fix another problem: the default SYSRQ key on macs doesn't exists in my PowerBook (and probably in other models too). Two nights later, I got these three patches. They're still waiting for comments on linuxppc-dev list, but it's safe to use them already (I'm not having problems with them). The result is that KEY_FN event is generated anyway (so you can use with apple_mouse) and you may configure the SYSRQ key on /sys/classes/keyboard0.
So, while doing this stuff, I figured that now it's possible to remap Fn/Ctrl in userspace, where this kind of stuff belongs. Now just wait for an inspired night to do so. BTW, while working on apple_mouse, I was able to fix lots of bugs on libuinput and it's now functional.
more input madness
I decided to try out something new and got a trackball. I don't use mouse so much while working, so couldn't be so bad to get used with. And it wasn't. Actually it's really fun. Kinda like when you first tried to use a regular mouse. I got a lot better with it: I'm able to get flawlessly up to level 5 in xbill and played warcraft III without problem. FPS games still requires a bit more training...

64 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!