screen model B152EW01
Simon turned up with a spares or repairs he's ebayed and we got to work. We couldn't find any instructions so we just took all the screws out!!
The lid is glued to the body which makes it a bit scruffy when you put it back together but all worked out ok, no hassles really except working out what to do. Even though the outer shells looked the same, the two laptops didn't have exactly the same motherboard but the screen luckily had the same connections.
Sadly there were the dreaded vertical stripes when it came on but that might be damage on the MB from when it got smashed. It's still muc better than literally half the screen being lcd juice.
Record of some of the computer tech I deal with so that it's documented at least somewhere.
Friday, 28 May 2010
Monday, 24 May 2010
Fuck you jQuery
> jQuery is a fixed part of RoundCube which allows you to make use of the very comfortable jQuery functions when writing plugin scripts.
Great, now I have to learn TWO frameworks at once.
Here's a tip, esp. for YOU Resig : If Javascript is too hard for you, perhaps you should pick up a broom and get a job you can do.
Great, now I have to learn TWO frameworks at once.
Here's a tip, esp. for YOU Resig : If Javascript is too hard for you, perhaps you should pick up a broom and get a job you can do.
Wednesday, 19 May 2010
Mac-Mini ACPI wake-on-lan
tl;dr : use ACPI, if you want wake-on-lan you can only suspend to ram
# uname -a
Linux mini1 2.6.32-gentoo-r7 #13 SMP Wed May 19 18:11:25 BST 2010 i686 Genuine Intel(R) CPU 1300 @ 1.66GHz GenuineIntel GNU/Linux
.config make.conf
and yet
So by default wake-on-lan is disabled (quite right too), thus :
(and *sigh* I have to show you the GPL! - is it really fucking worth it, the notice is longer than the code they gave me) :
so now acpitool -[Ss] both work, I made a swap for storing disk based and it restores just fine, except mplayer waits until a media change before resuming to play on screen (the sound might work, I have it on mute). That's not good enough for this application, it might be an hour. I read some stuff on't'net earlier about dumping video registers and the like and ended up using sys-power/hibernate-script. It didn't do any better so I went for a quick and dirty : kill `{pgrep mplayer}
Or rather I installed daemontools and made mplayer a service (I use SLiM to auto-login to X but I realise now I could have done it with daemontools (I didn't have it installed at the time). Oh well, I learned about xdm.
Hibernate lets you run scripts on resume so I just have it kill mplayer and unclutter (which removes the cursor).
When the Mac-mini is in suspend-to-disk I can't get it to hear Wake-On-Lan magic packets, I have to use the power button to get it to resume. It works just fine with suspend-to-ram (the power led slowly pulses so you know it's on).
TuxOnIce looks like it might help but I can't be arsed with it no more.
# uname -a
Linux mini1 2.6.32-gentoo-r7 #13 SMP Wed May 19 18:11:25 BST 2010 i686 Genuine Intel(R) CPU 1300 @ 1.66GHz GenuineIntel GNU/Linux
.config make.conf
APM
It won't have it :CONFIG_APM=yand yet
mini# apmd
No APM support in kernelACPI
mini# acpitool -e
... snip ...
Device S-state Status Sysfs node
---------------------------------------
1. PXS1 S4 disabled pci:0000:01:00.0
2. PXS2 S4 disabled pci:0000:02:00.0
mini# ethtool eth0
Settings for eth0:
... snip ...
Supports Wake-on: pg
Wake-on: d
So by default wake-on-lan is disabled (quite right too), thus :
(and *sigh* I have to show you the GPL! - is it really fucking worth it, the notice is longer than the code they gave me) :
mini# cat /etc/init.d/wol
#!/sbin/runscript
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
need net
}
start() {
acpitool -w | grep -q enabled || acpitool -W 2
# -W 2 stupidly toggles enabled/disabled
ethtool -s eth0 wol g
}
restart() {
start
}
so now acpitool -[Ss] both work, I made a swap for storing disk based and it restores just fine, except mplayer waits until a media change before resuming to play on screen (the sound might work, I have it on mute). That's not good enough for this application, it might be an hour. I read some stuff on't'net earlier about dumping video registers and the like and ended up using sys-power/hibernate-script. It didn't do any better so I went for a quick and dirty : kill `{pgrep mplayer}
Or rather I installed daemontools and made mplayer a service (I use SLiM to auto-login to X but I realise now I could have done it with daemontools (I didn't have it installed at the time). Oh well, I learned about xdm.
Hibernate lets you run scripts on resume so I just have it kill mplayer and unclutter (which removes the cursor).
When the Mac-mini is in suspend-to-disk I can't get it to hear Wake-On-Lan magic packets, I have to use the power button to get it to resume. It works just fine with suspend-to-ram (the power led slowly pulses so you know it's on).
TuxOnIce looks like it might help but I can't be arsed with it no more.
Sunday, 16 May 2010
Loeliger's TIL
I first implemented Loeliger's TIL (ISBN-10: 007038360X) in AVR machine code though as with most FORTH type projects, writing the interpreter is as far as anyone goes. My interest in SIMD has given me an excuse to write it in x86 assembler. Unfortunately I'm going to have to do it on Linux, though it's like choosing which nugget to pick out of the cat litter tray. Alarmingly I read what is effectively the Linux manual. Nearly 400 syscalls. What a diabolical monster!!
Anyway Loeliger. One of my favourite readings.
Here's a template I made for the inner loop. It contains no actual mnemonics because the idea is that to port it to a new platform, one just %defines the required bits, just leaving the platform dictionary to write.
I've done the %defines and %macros for x86 now.
work in progress
I've got some nifty macros going there, NASM seems easy to use.
Anyway Loeliger. One of my favourite readings.
Here's a template I made for the inner loop. It contains no actual mnemonics because the idea is that to port it to a new platform, one just %defines the required bits, just leaving the platform dictionary to write.
COLON:
PUSH_I_2_RS ; PSH I -> RS
WA_2_I ; WA -> I
JMP_NEXT ; jmp NEXT
SEMI :
my_ca ; Code Address of SEMI
POP_RS_2_I ; POP RS -> I
NEXT:
DEREF_I_2_WA ; @I -> WA
I_2_NEXT_I ; I = I + 2
RUN:
DEREF_WA_2_CA ; @WA -> CA
WA_2_NEXT_WA ; WA = WA + 2
CA_2_PC ; CA -> PC ; implicit JMP CA
I've done the %defines and %macros for x86 now.
work in progress
I've got some nifty macros going there, NASM seems easy to use.
Saturday, 15 May 2010
Mac-Mini Gentoo revisited
I got the Mac-Mini back. This time round I skipped the whole "Install 10.5 and use boot camp to make a partition" and went straight for the Gentoo i386 disk.
Then I booted using the rEFIt iso disk, it fiddled with the MBR and now it boots.
Wheeee all done, got X, got ALSA, got mplayer
I have to make it do i915 as a module for Xorg, had to add mesa for the dri to work.
But work it does !!
mini1 ~ # fdisk /dev/sda
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
... snip ...
mini1 ~ # parted /dev/sda
GNU Parted 1.9.0
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit b
(parted) p
Model: ATA FUJITSU MHV2060B (scsi)
Disk /dev/sda: 60011642880B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 20480B 209735679B 209715200B fat32 EFI system partition boot
2 209735680B 1000000511B 790264832B ext2
3 1000000512B 10000000511B 9000000000B ext3
4 10000000512B 60011625983B 50011625472B ext3
(parted)
Then I booted using the rEFIt iso disk, it fiddled with the MBR and now it boots.
# cat /etc/fstab
/dev/sda2 /boot ext2 noauto,noatime 1 2
/dev/sda3 / ext3 noatime 0 1
/dev/sda4 /mnt/Store ext3 noatime 0 1
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
# cat /boot/grub/menu.lst
title Gentoo Linux
root (hd0,1)
kernel /boot/kernel root=/dev/sda3
Wheeee all done, got X, got ALSA, got mplayer
I have to make it do i915 as a module for Xorg, had to add mesa for the dri to work.
But work it does !!
Monday, 10 May 2010
Keep on Clucking with Chickenfoot
Websites with black backgrounds do my eyes in, so here's a Chickenfoot script to set the background and color for all elements on the current page to Plan9 like calm.
And here's a bit of helper code to inspect collections :
(in Chickenfoot the last evaluation is printed on the console)
This simple script sat on right click has made my day, and it's only midday!
var s = document.getElementsByTagName("*")
for(a in s) {
s[a].style.background = "#FFD"
if(s[a].nodeName == "A") { // HREFs
s[a].style.color = "#00F"
s[a].style.textDecoration = "none"
} else {
s[a].style.color = "#111"
}
}
And here's a bit of helper code to inspect collections :
(in Chickenfoot the last evaluation is printed on the console)
function inspect(e) {
var b = ""
for(k in e) {
b += k + " = " + e[k] + "\n"
}
return b
}
// use it like this :
var c = ""
var s = document.getElementsByTagName("*")
for(a in s)
c += inspect(s[a])
c
This simple script sat on right click has made my day, and it's only midday!
Subscribe to:
Posts (Atom)