?

Log in

No account? Create an account

pavelmachek's Journal

Recent Entries

You are viewing the most recent 25 entries.

22nd October 2017

12:22am: Prague and Nokia N900s
If you are travelling to Prague to ELCE, and have Nokia N900, N9 or N950, or spare parts for them, please take them with you. I may help you install postmarket os there (https://wiki.postmarketos.org/wiki/Main_Page), can probably charge N900 that does not charge, and spare parts would be useful for me. I have a talk about cameras, and will be around... https://osseu17.sched.com/event/ByYH/cheap-complex-cameras-pavel-machek-denx-software-engineering-gmbh .

16th October 2017

9:36am: Help time travelers!
Ok, so I have various machines here. It seems only about half of them has working RTC. That are the boring ones.

And even the boring ones have pretty imprecise RTCs... For example Nokia N9. I only power it up from time to time, I believe it drifts something like minute per month... For normal use with SIM card, it can probably correct from GSM network if you happen to have a cell phone signal, but...

More interesting machines... Old thinkpad is running without CMOS battery. ARM OLPC has _three_ RTCs, but not a single working one. N900 has working RTC but no or dead backup battery. On these, RTC driver probably knows time is not valid, but feeds the garbage into the system time, anyway. Ouch. Neither Sharp Zaurus SL-5500 nor C-3000 had battery backup on RTC...

Even in new end-user machines, time quality varies a lot. "First boot, please enter time" is only accurate to seconds, if the user is careful. RTC is usually not very accurate, either... and noone uses adjtime these days. GSM time and ntpdate are probably accurate to miliseconds, GPS can provide time down to picoseconds... And broken systems are so common "swclock" is available in init system to store time in file, so it at least does not go backwards.

https (and other crypto) depends on time... so it is important to know approximate month we are in.

Is it time we handle it better?

Could we return both time and log2(expected error) from system calls?

That way we could hide the clock in GUI if time is not available or not precise to minutes, ignore certificate dates when time is not precise to months, and you would not have to send me a "Pavel, are you time traveling, again?" message next time my mailer sends email dated to 1970.

25th September 2017

10:25am: Colorful LEDs
RGB LEDs do not exist according to Linux LED subsystem. They are modeled as three separate LEDs, red, green and blue; that matches the hardware.

Unfortunately, it has problems. Lets begin with inconsistent naming: some drivers use :r suffix, some use :red. There's no explicit grouping of LEDs for one light -- there's no place to store parameters common for the light. (LEDs could be grouped by name.)

RGB colorspace is pretty well defined, and people expect to set specific colors. Unfortunately.... that does not work well with LEDs. First, LEDs are usually not balanced according to human perception system, so full power to the LEDs (255, 255, 255) may not
result in white. Second, monitors normally use gamma correction before displaying color, so (128, 128, 128) does not correspond to 50% of light being produced. But LEDs normally use PWM, so (128, 128, 128) does correspond to 50% light. Result is that colors are completely off.

I tested HSV colorspace for the LEDs. That would have advantage of old triggers being able to use selected colors... Unfortunately, on N900, white color is something like 15% blue, which would result in significantly reducing number of white intensities we can display.

20th September 2017

12:16am: Unicsy phone
For a long time, I wanted a phone that runs Unix. And I got that, first Android, second Maemo on Nokia N900. With Android I realized that running Linux kernel is not enough. Android is really far away from normal Unix machine, and I'd argue away from anything usable, too. Maemo was slightly closer, and probably could be fixed if it was open-source.

But I realized Linux kernel is not really the most important part. There's more to Unix: compatibility with old apps, small programs where each one does one thing well, data in text formats so you can put them in git. Maemo got some parts right, at least you could run old apps in a useful way; but most important data on the phone (contacts, calendar) were still locked away in sqlite.

And that is something I'd like to change: phone that is ssh-friendly, text-editor-friendly and git-friendly. I call it "Unicsy phone". No, I don't want to do phone `cat addressbook | grep Friend | cut -f 1`... graphical utilities are okay. But console tools still should be there, and file formats should be reasonable.

So there is tui project, and recently postmarketos project appeared. Nokia N900 is mostly supported by mainline kernel (with exceptions of bluetooth and camera, everything works). There's work to be done, but it looks doable.

More is missing in the userspace. Phone parts need work, as expected. What is more surprising... there's emacs org mode, with great calendar capabilities, but I could not find matching application to display data nicely and provide alerts. Situation is even worse for contacts; emacs org can help there, too, but there does not seem to be agreement that this is the way to go. (And again, graphical applications would be nice).

16th September 2017

1:41pm: FlightGear fun
How to die in Boeing 707, quick and easy. Take off, realize that you should set up fuel heating, select Help|, aim for checklists.. and hit auto startup/shutdown. Instantly lose all the engines. Fortunately, you are at 6000', so you start looking for the airport. Then you
realize "hmm, perhaps I can do the startup thing now", and hit the menu item once again. But instead of running engines, you get fire warnings on all the engines. That does not look good. Confirm fire, extinguish all four engines, and resume looking for airport in range. Trim for best glide. Then number 3 comes up. Then number 4. Number one and you know it will be easy. Number two as you fly over the runway... go around and do normal approach.

26th February 2017

11:32pm: Using Linux notebook as an alarm clock
Is someone using notebook as an alarm clock? Yes, it would be easy if I did not suspend machine overnight, but that would waste power and produce noise from fans. I'd like version that suspends the machine...

21st February 2017

11:21pm: X220 to play with
Nice machine. Slightly bigger than X60, bezel around display way too big, but quite powerful. Biggest problem seems to be that it does not accept 9.5mm high drives...

I tried 4.10 there, and got two nasty messages during bootup. Am I the last one running 32 bit kernels?

I was hoping to get three-monitor configuration on my desk, but apparently X220 can not do that. xrandr reports 8 outputs (!), but it physically only has 3: LVDS, displayport and VGA. Unfortunately, it seems to only have 2 CRTCs, so only 2 outputs can be active at a time. Is there a way around that?

17th November 2016

12:49am: Linux did not win, yet
http://www.cio.com/article/3141918/linux/linux-has-won-microsoft-joins-the-linux-foundation.html Yes, Linux won on servers. Unfortunately... servers are not that important, and Linux still did not win on desktops (and is not much closer now than it was in 1998, AFAICT). We kind-of won on phones, but are not getting any benefits from that. Android is incompatible with X applications. Kernels on phones are so patched that updating kernel on phone is impossible... . This means that Microsoft sponsors Linux Foundation. Well, nice, but not a big deal. Has Microsoft promised not to use their patents against Linux? Does their kernel actually contain vfat code? Can I even get source for "their" Linux kernel? [Searching for Linux on microsoft.com does not reveal anything interesting; might be switching to english would help...]

14th November 2016

11:22am: foxtrotgps: not suitable for spacecraft navigation
Subject: foxtrotgps: not suitable for spacecraft navigation
Package: foxtrotgps
Version: 1.2.0-1
Severity: normal
Dear Maintainer,
Trying to use foxtrotgps in the spacecraft leads to some interesting
glitches.
When date line is reached, "track traveled" jumps over the whole
world, and "your position" gets de-synchronized from point when the
red line is painted.
Reproduced with Vostok-1 spacecraft.

6th October 2016

10:56am: FlightGame
FlightGame
FlightGear is a very nice simulator, but it is not a lot of fun: page with "places to fly" helps. But when you setup your flight details, including weather and failures, you can kind of expect what is going to happen. FlightGame was designed to address this (not for me, unfortunately, alrough... if you ever debugged piece of software you know unexpected things happen): levels are prepared to be interesting, yet they try to provide enough information so that you don't need to
study maps and aircraft specifications before the flight.
Don't expect anything great/too complex, this is just python getting data from gpsd, and causing your aircaft probles over internal webserver. But it still should be fun.
Code is at
. I guess I should really create a better README.
Who wants to play?

3rd October 2016

1:13pm: Linux V4.8 on N900
Basics work, good. GSM does not work too well, which is kind of a problem. Camera broke between 4.7 and 4.8. That is not good, either.

If you want to talk about Linux and phones, I'll probably be on LinuxDays in Prague this weekend, and will have a talk about it at Ubucon Europe.

24th September 2016

12:05pm: Audio fun
Documentation for audio on Linux... is pretty much nonexistent.

Notice!
There is a hidden pointer somewhere in this text to a page containing deeper information about using audio. You should have perfect understanding about the features described in this page before jumping into more complicated information. Just make sure you read this text carefully enough so you will be able to find the link.
Oh, thank you, so we are now on treasure hunt?
Under construction!
This page is currently being written. A more complete version should be released shortly.
....
Last updated Fri 16 Aug 1996 (minor changes).
Seems like the complete page is not going to be available any time soon.
Still, that was best page explaining how audio is supposed to work on Linux. Ouch. I could not get ALSA to work. OSS works fine. (I guess that also talks a bit about state of audio on Linux). And then I discovered that modem does not work in kernel 4.8, so my problems were not pulseaudio problems but modem problems. Oh well.
--

8th September 2016

12:46pm: Security getting hard/impossible on recent systems
Cache attacks: this is not good. Ok, so we have a rowhammer: basically very common, hard-to-work-around, hardware problem. Bits in your memory may flip. Deal with it.
And now, there are cache attacks, too. Users should not be able to spy on each other on multiuser system, but they very probably can. In particular, other users can tell which parts of emacs you are executing, and when. They can probably not distinguish what characters you are typing, but they can probably learn when you are typing space, normal letter, or moving cursor. Ouch. And if they indeed can spy on individual characters... you can hardly blame emacs. With plain keyboard, cache attack on individual letters is probably not feasible. With t-9 like system on touchscreen... it probably is. Deal with it. But how?
12:36pm: fcam-dev now gets autofocus on 4.7 kernel
Ok, without proper timing support, everything is really, really slow, but hey - I already got one usable photo out of the system :-).
Oh, and this is the reason to run Debian on your phone: https://citizenlab.org/2016/08/million-dollar-dissident-iphone-zero-day-nso-group-uae/ .
12:32pm: 25 years of Linux
25 years of linux and yes, I know Linux is popular. Still it was unexpected when I was asked in public transport if I know about Linux. Man wanted me to help with X restarting due to bad graphics drivers... I asked how he realized... and he told me about my T-shirt. I realized I have UnitedLinux T-shirt on... Given SCO's involvement in that one... should I burn the shirt?
12:31pm: ext4 encryption incompatible with grub
You encrypt a directory -- sounds easy, right? Support is in 4.4 kernel, my machines run newer kernels than that. Encrypting root would be hard, but encrypting parts of data partition should be easy.
Ok, lets follow howto... Need to do tune2fs. Right. Aha, still does not work, looks like I'll need to reboot.
Hmm. Will not boot. Grub no longer recognizes my /data partition, and that's where new kernels are. Old kernels are in /boot, but those are now useless. Lets copy new kernel on machine using USB stick. Does not boot. Fun.
tune2fs on root filesystem is useless, as it is too old. New one is ... on the data partition. Right. Ok, lets bring newer version of tune2fs in. "encryption" feature can not be cleared.
Argh! Come on, I did not even create single encrypted directory on the partition. I want the damn bit to go off, so I can go back to working configuration. "Old kernels can not read encrypted files" sounds ok, but "old kernels can not mount filesystem at all" is not acceptable here :-(.

You encrypt a directory -- sounds easy, right? Support is in 4.4 kernel, my machines run newer kernels than that. Encrypting root would be hard, but encrypting parts of data partition should be easy.
Ok, lets follow howto... Need to do tune2fs. Right. Aha, still does not work, looks like I'll need to reboot.
Hmm. Will not boot. Grub no longer recognizes my /data partition, and that's where new kernels are. Old kernels are in /boot, but those are now useless. Lets copy new kernel on machine using USB stick. Does not boot. Fun.
tune2fs on root filesystem is useless, as it is too old. New one is ... on the data partition. Right. Ok, lets bring newer version of tune2fs in. "encryption" feature can not be cleared.
Argh! Come on, I did not even create single encrypted directory on the partition. I want the damn bit to go off, so I can go back to working configuration. "Old kernels can not read encrypted files" sounds ok, but "old kernels can not mount filesystem at all" is not acceptable here :-(.
Ok, it seems it is possible to go back, as long as encryption was not actually used. fsck -fn; debugfs -w -R "feature -encrypt" /dev/device; fsck -fn;. I guess I was too optimistic. Using ext4 encryption would require at least new e2fsprogs at the root filesystem, which was something I was hoping to avoid.
12:28pm: Anyone with x60 and working gigabit?
On the lists, I was told that I probably have broken wire inside my notebook. I believe broken wires simply don't happen, so... is there anyone with working gigabit on x60?

16th August 2016

11:42pm: Vala -- seems ideal so far
I was searching for a language to write the phone GUI with... python3+gtk3 is way too slow; 9 seconds for trivial application is a bit too much (on N900). python2+gtk2 is a lot better at 2 seconds. Lua should be even faster.

But while searching for good language, Vala caught my mind. Designed to be integrated with gtk/dbus, compiled language. I was woried about error messages and errors from vala->c->binary compilation, but seems good so far.

Oh and it seems that emacs org mode is right thing to use for calendar. It looks like a bit too complex at first, but it seems the complexity is well justified... and I was doing similar things manually. Still have to search for a component to notify using popup / audio when an event is upcoming.

5th August 2016

1:50pm: Continents move... fun for openstreetmap
Openstreetmap has a problem... and a rather fundamental one. Saving all data in WGS-84 is nice and simple... but continents actually move. And that's why different countries use different coordinate systems. Australia moves a lot... cnet.com/.../australia-has-moved-1-5m Good thing is that we could map ships with that support. I guess there are other fundamental issues: world is 3D, and that is actually problem for multi-floor buildings. Plus, attributes for attributes would be useful. As in source:surface=survey...
1:46pm: Keyboard mapping and UCW czech
So I configured scroll-lock & pause to select volume up/down. Works well so far. I also remapped workplace switching to F1-F12 (without alt). Works well so far, as I switch workplaces a lot, and nothing really uses F1-F10.

Ouch, and for czech readers... UCW keyboard lives. Mate (== gnome2), in layouts add Czech Czech (UCW layout...), a v optionech "switching to another layout" capslock (while pressed)".

3rd August 2016

12:56am: 4 extra keys on desktop, 2 on notebook
Ok, so they are 4 keys on my keyboard I know absolutely no use of: "wakeup" key -- when any key wakes machine up, "power" key, which just duplicates "sleep" key, "scroll lock" and "pause". The first two are slightly non-standard, but surely there should be some use for scroll lock and pause in X (those are present even on notebook)? But it seems there is none. Scroll lock LED is also unused. Ideas?
12:55am: Tor browser a bit too unique?
Ok, this is scary: tor browser on https://browserprint.info/test -- "Your browser fingerprint appears to be unique among the 8,440 tested so far. Currently, we estimate that your browser has a fingerprint that conveys 13.04 bits of identifying information."

21st July 2016

10:54pm: Something usable for N9/N950?
I have both N9 and N950 here. Unfortunately, both are useless, as developer mode can not be enabled (because Nokia servers are down?).
     
There's tutorial -- how to install Sailfish. I'd love that. Neccessary images for N9 are no longer available. N950 images are still there, but... tutorial needs developer mode, and that's no longer possible.
Is there any way out of this for me?
Would it be possible to download image of working N9/N950 from some device, so that I could flash it?

19th July 2016

9:32am: Google play store playing with GPS?
Microsoft broke my father's computer: it made him update to Windows 10, when Windows 10 can not use two of 3 USB ports. Ouch.
Now it seems Google is trying to break my LG E720 cellphone. I did the right steps: it is running Cyanogen. One method is "we have great update for google Talk". Unfortunatelly, update is 20MB or more, basically filling internal flash and making phone unusable. And you can't disable update completely, you can only avoid clicking on it.
Now, Google seems to have invented new method of breaking my phone: Google Play Store started activating GPS. It does it on background. I tried downgrading to factory version of the play store, and not accepting its terms and conditions, but somehow I think it will come back.
Google Play Store definitely behaves like malware now. Unfortunately, on Android, it is hard to tell if malware-like behaviour is intentional by Google or if I have some third-party malware on the phone, too.

16th July 2016

8:42am: Updating userland on phone is... fun.
So I updated debian on my N900, because having different version on phone and PC sucks.
It booted, after I added "rw" to kernel command line, which is small miracle.
But X are without usable mouse, without panel, and without reasonable keymap. In particular, I don't have numbers, or any symbols besides ',.<>'. But I have root shell. Now I need to enable remote access somehow... which will be fun because sshd disappeared.
emacs to the rescue. By editing existing script, I can get access to characters such as '/', and launch telnetd. Installing sshd was easy with nmtui. Good.
Now, it seems something changed in the X land, and "xinput --set-prop --type=int 8 249 0 1" no longer works, which means touchscreen is
"upside down". If you know the replacement commands, let me know...
Powered by LiveJournal.com