tag:blogger.com,1999:blog-71400457703424360152024-03-05T14:54:52.282-08:00Domesticated HackerDavehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.comBlogger33125tag:blogger.com,1999:blog-7140045770342436015.post-32146002116774874402020-10-19T21:20:00.003-07:002020-10-20T22:25:56.637-07:00Random GPU passthru notes<h2 style="text-align: left;"><span style="font-family: courier;">Random GPU passthru notes</span></h2><h3 style="text-align: left;"><span style="font-family: courier;">Setting up rlimits</span></h3><p style="text-align: left;"><span style="font-family: courier;">if qemu says this:</span></p><p></p><blockquote><p style="text-align: left;"><span style="font-family: courier; font-size: x-small;">2020-10-20T03:55:36.078813Z qemu-system-x86_64: -device vfio-pci,host=02:00.0,id=hostdev0,bus=pci.0,addr=0x7,multifunction=on,x-vga=on: VFIO_MAP_DMA failed: Cannot allocate memory</span></p><div></div></blockquote><p style="text-align: left;"><span style="font-family: courier;">dmesg probably says something like this:</span></p><p style="text-align: left;"><span style="font-family: courier; font-size: x-small;"></span></p><blockquote><p style="text-align: left;"><span style="font-family: courier; font-size: x-small;">[ 147.460769] vfio_pin_pages_remote: RLIMIT_MEMLOCK (65536) exceeded</span></p></blockquote><p><span style="font-family: courier;">Add this to /etc/security/limits.conf (at least on gentoo):</span></p><p style="text-align: left;"><span style="font-family: courier; font-size: x-small;"></span></p><blockquote><p style="text-align: left;"><span style="font-family: courier; font-size: x-small;">dave<span style="white-space: pre;"> </span> hard<span style="white-space: pre;"> </span>memlock<span> </span>20000000</span></p><p style="text-align: left;"><span style="font-family: courier; font-size: x-small;">dave<span style="white-space: pre;"> </span> soft<span style="white-space: pre;"> </span>memlock<span> </span>20000000</span></p><div></div></blockquote><h3 style="text-align: left;"><span style="font-family: courier;">Giving myself permission to use vfio</span></h3><div><span style="font-family: courier;">I've never found a better way to do this, on boot I execute this to give myself permission to use the correct vfio group that my second video card is in:</span></div><p style="text-align: left;"><span style="font-family: courier;"><span> </span><span style="font-size: x-small;">chown dave:dave /dev/vfio/31</span></span></p><h3 style="text-align: left;"><span style="font-family: courier;">Keys getting stuck, mouse jumping randomly </span></h3><div><span style="font-family: courier;">Only seems to happen when the kbd and mouse are used at the same time. Easiest way to test was to move the mouse while typing in nodepad. The mouse would jump around and sometimes (not often) a key would get stuck. </span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Started happening after I did a full emerge -vup world upgrade (the kernel from 4.13.? to 5.9.1, it had been a while). Even tried using my old kernel, and old qemu (I saved them before upgrading), still broken.</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"><span style="font-size: x-small;">thanks to: https://www.reddit.com/r/VFIO/comments/824cdi/evdev_passthrough_problem_in_games_keys_get_stuck/</span></span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">My startup script only had the -object input-linux lines for keyboard and mouse, so I guess it was defaulting to PS/2 devices? Has been working fine for 3 years. Installed virtio drivers and added these devices and it was all fine again.</span></div><div><span style="font-family: courier;"><div></div><blockquote><div><span style="font-size: x-small;">-device virtio-keyboard</span></div><div><span style="font-size: x-small;">-device virtio-mouse</span></div><div></div></blockquote><h3 style="text-align: left;">Sound needs to be modules</h3><div>My monitors use the snd-hda sound driver, so does my computer. That's 3 snd-hda devices. When I compile the hda intel/realtek driver in the kernel it claims all three devices. vfio requires all devices in an iommu group be unbound (so to pass the video card to qemu, the sound card must also be passed, not possible when the kernel has claimed the sound device on the monitor). echoing something to the /unbind thing just waits forever and never returns.</div><div>The way around this is to make a modprobe file to claim the gpu and onboard sound for vfio before the kernel driver can get hold of it.</div><div>/etc/modprobe.d/vfio.conf:</div><div><div></div><blockquote><div><span style="font-size: x-small;">options vfio-pci ids=10de:1b81,10de:10f0</span></div><div><span style="font-size: x-small;">softdep snd-hda-intel pre: vfio-pci</span></div><div></div></blockquote><div><br /></div></div><div><br /></div></span></div><span><a name='more'></a></span><div><span style="font-family: courier;">My Full win10 startup script with pci passthru:</span></div><div><br /></div><div><div><span style="font-size: x-small;">qemu-system-x86_64 -name guest=Win107 \</span></div><div><span style="font-size: x-small;">-machine pc-i440fx-2.9,accel=kvm,usb=off,vmport=off \</span></div><div><span style="font-size: x-small;">-cpu Haswell-noTSX,kvm=off \</span></div><div><span style="font-size: x-small;">-m 16384 \</span></div><div><span style="font-size: x-small;">-overcommit mem-lock=off \</span></div><div><span style="font-size: x-small;">-smp sockets=1,cores=6,threads=1,maxcpus=6 \</span></div><div><span style="font-size: x-small;">-uuid 12345567-1234-1234-1234-123455667780 \</span></div><div><span style="font-size: x-small;">-no-user-config -nodefaults \</span></div><div><span style="font-size: x-small;">-no-hpet -no-shutdown \</span></div><div><span style="font-size: x-small;">-global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 \</span></div><div><span style="font-size: x-small;">-boot order=dc \</span></div><div><span style="font-size: x-small;">-bios /usr/share/seabios/bios.bin \</span></div><div><span style="font-size: x-small;">-device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 \</span></div><div><span style="font-size: x-small;">-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5 \</span></div><div><span style="font-size: x-small;">-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1 \</span></div><div><span style="font-size: x-small;">-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2 \</span></div><div><span style="font-size: x-small;">-drive file=/mnt/images/win10.qcow2,format=qcow2,if=none,id=drive-ide0-0-0 \</span></div><div><span style="font-size: x-small;">-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 \</span></div><div><span style="font-size: x-small;">-drive file=/dev/disk/by-id/wwn-0x50014ee206f54395,format=raw,if=none,id=drive-ide0-0-1 \</span></div><div><span style="font-size: x-small;">-device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,bootindex=3 \</span></div><div><span style="font-size: x-small;">-drive file="/home/dave/images/virtio-win-0.1.189.iso",format=raw,if=none,id=drive-ide0-1-0,readonly=on \</span></div><div><span style="font-size: x-small;">-device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 \</span></div><div><span style="font-size: x-small;">-chardev pty,id=charserial0 \</span></div><div><span style="font-size: x-small;">-device isa-serial,chardev=charserial0,id=serial0 \</span></div><div><span style="font-size: x-small;">-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 \</span></div><div><span style="font-size: x-small;">-device virtio-net-pci,netdev=net0,mac=00:16:3e:00:01:01 \</span></div><div><span style="font-size: x-small;">-netdev user,id=net0 \</span></div><div><span style="font-size: x-small;">-device vfio-pci,host=02:00.0,id=hostdev0,bus=pci.0,addr=0x7,multifunction=on,x-vga=on \</span></div><div><span style="font-size: x-small;">-device vfio-pci,host=02:00.1,id=hostdev1,bus=pci.0,addr=0x8 \</span></div><div><span style="font-size: x-small;">-device usb-host,vendorid=0x046d,productid=0xc215 \</span></div><div><span style="font-size: x-small;">-msg timestamp=on \</span></div><div><span style="font-size: x-small;">-vga none \</span></div><div><span style="font-size: x-small;">-audiodev pa,id=1 -device intel-hda -device hda-output,audiodev=1 \</span></div><div><span style="font-size: x-small;">-object input-linux,id=kbd0,evdev=/dev/input/by-id/usb-046d_G15_Gaming_Keyboard-event-kbd,grab_all=on,repeat=on \</span></div><div><span style="font-size: x-small;">-object input-linux,id=mouse0,evdev=/dev/input/by-id/usb-Logitech_USB-PS_2_Optical_Mouse-event-mouse \</span></div><div><span style="font-size: x-small;">-device virtio-keyboard \</span></div><div><span style="font-size: x-small;">-device virtio-mouse</span></div><div><br /></div></div><div><br /></div><h3 style="text-align: left;"><br /></h3>Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-70031550077764903462019-08-12T17:54:00.000-07:002019-08-12T18:31:29.549-07:00dbell review review<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">I posted a review to dbell's website that went over the problems I had. No surpise, dbell responded with "<span style="background-color: white;">Thank you for your detailed review. Few of your points are notable and others we couldn’t simply agree.</span><span style="background-color: white;"> "</span></span><br />
<span style="background-color: white;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span>
<span style="background-color: white;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">They went on to object to each of my points, and I notice my 2/5 stars review has been removed from their website. </span></span><br />
<span style="background-color: white;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span>
<span style="background-color: white;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Here are the points in my review, and their response, and my response back to them. I sent my thoughts back to them but didn't get anything in response.</span></span><br />
<span style="background-color: white;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span>
<br />
<div style="background-color: white; line-height: 18pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: #32373c;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">1. Motion detection is useless – the motion detection is way too sensitive. On the least sensitive setting (or most sensitive, I tried both), on a day with no wind it would push motion alerts at least once minute to my phone. I’m not exaggerating–at least once a minute. The closest thing that could trigger motion it is my neighbour’s tree, 25ft away. So, this device pretty much needs to point at a wall. Tech support said this was a known thing and there was no fix. So I had to turn off motion detection.</span></span></div>
<blockquote class="tr_bq" style="color: #222222;">
<span style="color: #32373c;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">dbell: "If you set motion detection sensitivity to 6, it won’t capture 25ft away, value 6 allows max 10ft but motion detection can be improved, we acknowledge that"</span></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="color: #222222;">me: </span><span style="color: #32373c;">I tried min and max sensitivity and all values in between. no change. I disagree that value 6 captures max 10ft. That is not consistent with what I experienced.</span></span></blockquote>
<br />
<div style="background-color: white; color: #222222; line-height: 18pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: #32373c;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">2. The button sticks. Over the week that it was installed I had six visitors say they rang the doorbell and nothing happened. I had to push very hard on the button to unstick it, leaning into it with my body, and there would be a loud click. Then it worked properly again for about an hour with barely a touch needed to ring the door. Then it would get sticky again. Tech support offered to send me a new dbell, but because of the other issues I decided to return it.<u></u><u></u></span></span></div>
<blockquote class="tr_bq">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">dbell: "<span style="background-color: white; color: #32373c;"> We are sorry to hear this – we shipped out 10k+ units, haven’t had a single complaint on stickup button. So it must be our bad luck – you may have received something like that. I haven’t verified your return unit as it went to damaged pile, hard to find it. We do not resell customers return."</span></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">me: Ok, I agree it is bad luck, but it still happened to me. All I can report on is my n=1 sample size. </span></blockquote>
<div style="background-color: white; color: #222222; line-height: 18pt; margin: 0cm 0cm 0.0001pt;">
<br /></div>
<div style="background-color: white; color: #222222; line-height: 18pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: #32373c;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">3. It can’t actually save clips to a NAS… unless you press a button in the app, assuming the app doesn’t crash first. If you want to save the clip of what happened, or what’s happening, you need to answer the door or motion event in the app and press the record button. If you don’t answer, there is no saved clip. Tech support recommended inserting an SD card to automatically upload to my NAS, however this records continuously, it doesn’t save just the clips of the event.<u></u><u></u></span></span></div>
<blockquote class="tr_bq">
<span style="background-color: white; color: #32373c;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">dbell: "I am not sure which NAS you have. We have tested with QNAP and it saves file in h264 format which VLC can play, need to configure VLC, we have a help topic on that too."</span></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">me: My NAS is irrelevant, I mentioned that writing to the NAS wasn't a problem. Writing only the clips of motion events was the problem. You either get a constant stream to the NAS (which VLC can't play) or you have to manually initiate recording from within the app.</span></blockquote>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"> <span style="background-color: white; color: #32373c;"> </span></span><br />
<div style="background-color: white; color: #222222; line-height: 18pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: #32373c;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">4. It can’t save clips to the SD card either. With the SD inserted, the video is broken into a continuous stream of files which have no header and tech support couldn’t tell me how to play them. So it seems that technically the claim that it can save footage to a NAS or cloud is true.. you either have to manually initiate the recording, or you get a continuous stream in a format that no one knows how to play.</span></span></div>
<blockquote class="tr_bq">
<span style="background-color: white; color: #32373c;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">dbell: "Video is not broken into continuous stream. When SD card is formatted it creates 32 blank stream file. But when the video is recorded, it overwrites one of those blank file as one video – video is never truncated in any chunk. So not sure how you are saying that. you can access the video files from app or from the IE browser or any other major browser interface."</span></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">me: So the continuous video stream is broken into files, that's what I said. But the issue wasn't this it's that it's continuous video. If I'm away and don't answer the motion detection, how do I find the video for it on my NAS. I have to go through all the video to find the right time index... but I can't even do that because VLC won't play it. They claim there's a knowledge base entry to play the files on VLC, but the tech I was interacting with didn't know how.</span></blockquote>
<div style="background-color: white; color: #222222; line-height: 18pt; margin: 0cm 0cm 0.0001pt;">
<br /></div>
<div style="background-color: white; color: #222222; line-height: 18pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: #32373c;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">5. I ordered black and they sent a white interior bell. Tech support offered to send a new one of these, but I declined because of the other issues.<u></u><u></u></span></span></div>
<div style="background-color: white; color: #222222; line-height: 18pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: #32373c;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<blockquote class="tr_bq">
<span style="background-color: white; color: #32373c;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">dbell: "Black doorbell is shipped with white indoorbell and black indoorbell, we have both options. Some customers like white and some likes black. This was our error and we were happy to replenish with a white one."</span></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">me: the website shows black. This wasn't presented as an option anywhere in the ordering process. </span></blockquote>
<div style="background-color: white; color: #222222; line-height: 18pt; margin: 0cm 0cm 0.0001pt;">
<br /></div>
<div style="background-color: white; color: #222222; line-height: 18pt; margin: 0cm 0cm 0.0001pt;">
<span style="color: #32373c;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">6. The app crashes frequently and I couldn’t use it to configure the dbell. The app kept complaining that I wasn’t on the same network as the device. I found the (mostly undocumented) web interface and used that to configure the device. After I answered the door two or three times the app would just crash.<u></u><u></u></span></span></div>
<blockquote class="tr_bq">
<span style="background-color: white; color: #222222;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">dbell: "Which app did you face that? For Android and iOS we get report when the app crash and we continuously fix it. For Android there are over 10k devices, so we are on constant bug fix. For iOS Apple updates the OS and sometimes breaks the app, again we are always patching/fixing the issues. I use the iOS everyday, it will crash once in a while, may be once in a week. So not sure how frequent was yours. It appears your views are sort of more than regular views, for example, you say you couldn’t even configure using the app due to crash – this one is hard to believe as I do configure around 10-12 units each day. So not sure what’s going on here."</span></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">me: Again, my experience. But during the process of configuring the unit I was using the app heavily. Crashing once a week probably translated into crashing every 10 minutes while setting things up and trying settings. Also, it crashes once a week under normal use? That's once a week too many times.</span></blockquote>
<br />
<h2>
Review on Amazon:</h2>
<h2>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: small;"><span style="font-weight: normal;">I bought the next version of this doorbell (the dbell HD x2) directly from dbell . Ultimately I returned it for a refund. Some of the claims on the website do not match the capabilities of the device (see below). If you're looking for a device that can send you a notification when someone is at your door and let you talk with them right away, this will work fine. If you want to do more complicated stuff like motion detection or saving clips to the cloud/home NAS, I can't recommend this product.</span></span></h2>
<h2>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: small; font-weight: normal;">1. Motion detection is useless. The motion detection is way too sensitive. On the least sensitive setting (or most sensitive, I tried both, and all values in between), on a day with no wind it would push motion alerts at least once a minute to my phone. I'm not exaggerating. The closest thing that could trigger it is my neighbour's tree, 25ft away. </span></h2>
<h2>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: small; font-weight: normal;">2. The button would stick. Over the week that it was installed I had six visitors say they rang the doorbell and nothing happened. Each time the button was stuck. Maybe I got a bad unit, but it doesn't change that it happened.</span></h2>
<h2>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: small; font-weight: normal;">3. It can't actually save clips to a NAS... unless you press a button in the app. If you want to save the clip of what happened, or what's happening, you need to answer the door or motion event in the app and press the record button. If you don't answer, there is no saved clip. </span></h2>
<h2>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: small; font-weight: normal;">4. It can't save clips to the SD card either. Tech support recommended inserting an SD to automatically upload to the NAS. And yes, while this does auto-upload to the NAS, it uploads a constant stream to the SD and the NAS (if configured) broken into files. There is no option to write just clips of events. </span></h2>
<h2>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: small; font-weight: normal;">5. The app crashes frequently. The dbell would not configure from the app, it either kept crashing or threw an error that I wasn't on the same network as the device (I was). The dbell also has a web interface, mostly undocumented, but I found it and this is how I configured it. Every 3rd or so time I answered the door within the app it would crash too.</span></h2>
<h2>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: small; font-weight: normal;"><br /></span></h2>
<h2>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: small; font-weight: normal;"><br /></span></h2>
<h2>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: small;"><br /></span></h2>
<h2>
</h2>
<blockquote class="tr_bq">
</blockquote>
Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-6579371496500677132019-07-28T21:06:00.000-07:002019-07-29T08:21:46.916-07:00dbell Smart DoorbellI got a dbell x2 (their newest model) in May 2019. I really wanted to like it, like really really wanted to like it. It has a unique set of features that sets it apart from other doorbells where paying a monthly fee just to see who is at your door, or who was at your door yesterday has somehow become the norm. The dbell is designed in Canada and has no subscription fees. You can pay for cloud storage but since I wasn't going to be using it, I didn't really pay attention to that. What interested me was that could, according to the website, write clips of motion and visitors directly to my NAS. This means two things: First, I don't need a subscription or any cloud storage, I can integrate the clip directory with my home automation software to see all the events and footage. And second, I don't need to use a hack like constantly streaming HD video stream across my home network to monitor the feed to extract motion and doorbell events to collect these clips.<br />
<br />
Sadly, the website overstates the capabilities of the device and software, and there are other issues too. If all you want is a smart doorbell that can push a notification to your phone so you can see who is at your door when they are at your door, this is the doorbell for you.<br />
<br />
Here is why it didn't work for me and why I returned it for a refund (minus shipping):<br />
<br />
<ol>
<li>Motion detection is useless - the motion detection is way too sensitive. Other reviews have said this too, I should have paid more attention. On the least sensitive setting (or most sensitive, I tried both), on a day with no wind it would push motion alerts once or twice a minute to my phone. I'm not exaggerating--at least once a minute. The closest thing that could trigger it is my neighbour's tree, 25ft away. So, this device pretty much needs to point at a wall. I wasn't expecting to have to turn off motion detection, which is kind of a dealbreaker.</li>
<li>The button would stick. Over the week that it was installed I had six visitors say they rang the doorbell and nothing happened. Each time the button was stuck. I had to push it very hard to unstick it, leaning into it with my body, and there would be a loud click. Then it worked properly again for about an hour, with barely a touch needed to ring the door. Then it would get sticky again. A doorbell that visitors can't use is also a dealbreaker. To their credit, they offered to send me a new one, but because of the other issues I decided to return it.</li>
<li>It can't actually save clips to a NAS... unless you press a button in the app. If you want to save the clip of what happened, or what's happening, you need to answer the door or motion event in the app and press the record button. If you don't answer, there is no saved clip. </li>
<li>It can't save clips to the SD card either. Tech support recommended inserting an SD to automatically uploaded to the NAS. And yes, while this does make auto-upload work, it causes the dbell to write a constant stream to the SD and the NAS (if configured). There is no option to write just clips of the event. The stream is broken into a continuous stream of 60MB files which have no header and tech support couldn't tell me how to play them.</li>
<li>I ordered black and they sent a white interior bell, despite black being shown on the website. They also offered to send a new one of these, but I declined because of the other issues.</li>
<li>The app is broken and crashes frequently. The dbell would not configure from the app, it either kept crashing or threw an error that I wasn't on the same network as the device. The dbell also has a web interface, mostly undocumented, but I found it and this is how I configured it.</li>
</ol>
<div>
I contacted their technical support to see about resolving the motion detection and writing clips to the NAS. They always responded within a day or two so that was great, but it became evident that I was experiencing a device and software limitation, not a configuration problem. The device just didn't perform as advertised. I was told that trees are a known problem and there was no way to fix the motion detection, and that I should insert an SD card to automatically capture the video to the NAS (see #4 above, it just records continuously).</div>
<div>
<br /></div>
<div>
Because of the dealbreakers and that I couldn't save clips to my NAS, I eventually asked for a refund. They said there would be a 30% restocking fee (the website states 20%). Then they told me that I should have tested the device inside first, before I removed the protective plastic, so they could resell it, and then they would have waived the restocking fee. I found this a little insulting. I did test it, but not long enough to figure out that the button would stick, and not to test the sensitivity of the motion detection -- these are things that I just assumed would work. I also connected it to my NAS and assumed the clip writing thing was just a configuration problem which, because the app kept crashing, I hadn't hit on the right settings yet.</div>
<div>
<br /></div>
<div>
In the end they waived the restocking fee, maybe because I pointed out that the device didn't work as advertised, and also that I'd have to send it back anyway because the button was sticking. But they did keep the shipping. So all in all I'm out about $34 because I had to cover the return shipping too.</div>
<div>
<br /></div>
<div>
So now I'm in the market for a smart doorbell again. Once that has motion detection, and one that will write motion and doorbell events to my NAS without bouncing all the video off the cloud or requiring a subscription fee.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-8805415086755778402018-12-31T11:29:00.002-08:002019-07-25T21:32:04.414-07:00Resetting the Page Count on a Samsung Laserjet (MLT-R116 Drum)<span style="font-family: "verdana" , sans-serif;">Our Samsung M2835 printer's drum unit (MLT-R116, not toner, the drum unit) finally hit its software-programmed end-of-life of 10,000 pages. </span><span style="font-family: "verdana" , sans-serif;">This is annoying for several reasons:</span><br />
<br />
<ul>
<li><span style="font-family: "verdana" , sans-serif;">Page 9,999 was perfectly fine</span></li>
<li><span style="font-family: "verdana" , sans-serif;">I disagree with business practices involving software-enforced obsolescence </span></li>
<li><span style="font-family: "verdana" , sans-serif;">Other printers (Brother and HP) provide an option to reset the page count</span></li>
</ul>
<div>
<span style="font-family: "verdana" , sans-serif;">After some research, it turns out drum unit uses the same technique as toner cartridges to enforce end-of-life. It uses a small 4Kbit i2c EEPROM to store the page count. </span></div>
<div>
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "verdana" , sans-serif;">There are some great resources for resetting almost the same EEPROM on toner cartridges on Samsung printers. I used and adapted these to reset the drum counter.</span></div>
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;"><a href="https://github.com/nharrer/speer">https://github.com/nharrer/speer</a></span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;"><a href="https://www.netzgewitter.com/projects/speer-samsung-printer-eeprom-resetter/">https://www.netzgewitter.com/projects/speer-samsung-printer-eeprom-resetter/</a></span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;"><a href="https://www.netzgewitter.com/2014/12/reset-samsung-clp510-toner-cartridge-with-raspberry-pi/">https://www.netzgewitter.com/2014/12/reset-samsung-clp510-toner-cartridge-with-raspberry-pi/</a></span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;"><a href="https://github.com/lugu/toner_chip_reset">https://github.com/lugu/toner_chip_reset</a></span></li>
</ul>
<div>
<br /></div>
<div>
<span style="font-family: "verdana" , sans-serif;">Here's the Chip with contacts soldered to it so I can plug it into my raspberry Pi.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS2yTKTXI5I4SC3C_RkaTw3HD6QD8pcoeq7xk-_dBXWdNwgri4DP4ilSxytdbZCVELBDcPYn9PX2_dRUp_dYLqyT_QqnS_RDxnFygfmTaZ8PY9127zC9t8M-CKicAlWnValLvt2x4NiR4/s1600/IMG_7071.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh568wsylV3_MbIWapBtyZV-VpSEx-fXdE_FZmDHAX6J0bsc4IifKYOzyNX-pLiDa5vlYFuF1oIYn17-_CXk_wP5k-_4AHJKTSoAVzGOqFJsCx170wn4TnVWCTisApxM5-bHRoncnGAHBc/s1600/IMG_7073.JPG" imageanchor="1" style="clear: left; display: inline !important; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg_fMe0G7A-IL2EOFpMI9KxsAjnFeXWAIjFQkwkQxY_dilzz-p8kSqYjwQCnoP0V9gS4Qx-tRganTwVpPn6IJQoDrhyphenhyphenISOGto90RsZdavileSGJHqutosy9JmtUYMkyc1mC2_Z89QtZug/s1600/IMG_7072.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg_fMe0G7A-IL2EOFpMI9KxsAjnFeXWAIjFQkwkQxY_dilzz-p8kSqYjwQCnoP0V9gS4Qx-tRganTwVpPn6IJQoDrhyphenhyphenISOGto90RsZdavileSGJHqutosy9JmtUYMkyc1mC2_Z89QtZug/s1600/IMG_7072.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS2yTKTXI5I4SC3C_RkaTw3HD6QD8pcoeq7xk-_dBXWdNwgri4DP4ilSxytdbZCVELBDcPYn9PX2_dRUp_dYLqyT_QqnS_RDxnFygfmTaZ8PY9127zC9t8M-CKicAlWnValLvt2x4NiR4/s1600/IMG_7071.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1290" data-original-width="1531" height="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS2yTKTXI5I4SC3C_RkaTw3HD6QD8pcoeq7xk-_dBXWdNwgri4DP4ilSxytdbZCVELBDcPYn9PX2_dRUp_dYLqyT_QqnS_RDxnFygfmTaZ8PY9127zC9t8M-CKicAlWnValLvt2x4NiR4/s320/IMG_7071.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "verdana" , sans-serif;">And here's the chip by itself:</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh568wsylV3_MbIWapBtyZV-VpSEx-fXdE_FZmDHAX6J0bsc4IifKYOzyNX-pLiDa5vlYFuF1oIYn17-_CXk_wP5k-_4AHJKTSoAVzGOqFJsCx170wn4TnVWCTisApxM5-bHRoncnGAHBc/s1600/IMG_7073.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1170" data-original-width="1453" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh568wsylV3_MbIWapBtyZV-VpSEx-fXdE_FZmDHAX6J0bsc4IifKYOzyNX-pLiDa5vlYFuF1oIYn17-_CXk_wP5k-_4AHJKTSoAVzGOqFJsCx170wn4TnVWCTisApxM5-bHRoncnGAHBc/s200/IMG_7073.JPG" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg_fMe0G7A-IL2EOFpMI9KxsAjnFeXWAIjFQkwkQxY_dilzz-p8kSqYjwQCnoP0V9gS4Qx-tRganTwVpPn6IJQoDrhyphenhyphenISOGto90RsZdavileSGJHqutosy9JmtUYMkyc1mC2_Z89QtZug/s1600/IMG_7072.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1344" data-original-width="1310" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg_fMe0G7A-IL2EOFpMI9KxsAjnFeXWAIjFQkwkQxY_dilzz-p8kSqYjwQCnoP0V9gS4Qx-tRganTwVpPn6IJQoDrhyphenhyphenISOGto90RsZdavileSGJHqutosy9JmtUYMkyc1mC2_Z89QtZug/s200/IMG_7072.JPG" width="194" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMS43Ks8UHA1RJhtiZ8-CiIuSwyR6JGKKfqhQZJkHi4AMTlkDwMZ7cnLqJlhWrkeXAvGRXiuS-J-Jxr0wGiOH3IRSXBHRMCX4QNmNBRX1H6yJ5yn0i3xDGjkOGVBok2A0sC1Q1nj6VPDc/s1600/IMG_3688.JPG" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMS43Ks8UHA1RJhtiZ8-CiIuSwyR6JGKKfqhQZJkHi4AMTlkDwMZ7cnLqJlhWrkeXAvGRXiuS-J-Jxr0wGiOH3IRSXBHRMCX4QNmNBRX1H6yJ5yn0i3xDGjkOGVBok2A0sC1Q1nj6VPDc/s320/IMG_3688.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "verdana" , sans-serif;">And here's the connection to the RPI:</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzcqSt7ghRO2PaHSjmcS0z3tiwhOtK56yToWhiys7XHebsi5Z_MjCcG2iHPEijJpRJGWES5pPjAKZnOJJLWz181QLhWy1eDmfsPIwgRvrd_ZcuOQnMiAgMS97cc0HmyfVsiQ3JZB5PB88/s1600/IMG_7076.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1205" data-original-width="1600" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzcqSt7ghRO2PaHSjmcS0z3tiwhOtK56yToWhiys7XHebsi5Z_MjCcG2iHPEijJpRJGWES5pPjAKZnOJJLWz181QLhWy1eDmfsPIwgRvrd_ZcuOQnMiAgMS97cc0HmyfVsiQ3JZB5PB88/s320/IMG_7076.JPG" width="320" /></a></div>
<br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">So once connected, dumping and re-writing the ROM is easy. Use the above links to enable i2c on the RPI and then:</span><br />
<br />
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">python speer.py -b 0x50.bin --addr 0x50</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">python speer.py -b 0x51.bin --addr 0x51</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">bvi 0x50.bin</span></li>
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">Change offset 0x0C to 00 00 00 00 # See Note Below!</span></li>
</ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">python speer.py -r 0x50.bin --addr 0x50</span></li>
</ul>
<div>
<span style="font-family: "verdana" , sans-serif;">Now the drum counter reports 0 and the printer will print again. Note: from what I have been reading, some versions of the firmware require modifications to other offsets too. It's probably easiest to take a snapshot of the eeprom, save it somewhere safe, and then reload the eeprom 5 years later when the page counter is too high.</span></div>
<div>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Note: Thanks to Joe Cooper, you may also, or instead, have to reset bytes of the 0x50.bin starting at 0x26 to 00 00, and at 0x2E to 00 00. It's possible different printer models/firmware are storing the page count at different offsets.</span></div>
<div>
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "verdana" , sans-serif;"></span></div>
Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com26tag:blogger.com,1999:blog-7140045770342436015.post-39309818251679801702015-09-01T09:13:00.004-07:002015-09-01T10:29:35.117-07:00First Uber Ride *Updated*First trip with Uber: driver and trip was great, app and experience was sub-par.<br />
<br />
Update: Customer service swings experience to positive agian.<br />
<br />
I'd like to think I'd be writing this if all went smoothly, but it didn't, and here we are. Let's start with the positive. My wife and I were standing outside at Bay and Wellesley, we requested a ride to YYZ, Steve was there within 2 minutes. It was a pleasant ride. It was cheaper than a cab, it was cleaner than a cab, it was cheaper than the new train thingy from downtown Toronto to the airport ($30/person, really?), and the subway wasn't running that early anyway.<br />
<br />
Now, we did the estimate fare thing, and requested the pickup no less than 5 seconds after that, and ZOMG 1.5x SURGE PRICING! I'm suspicious that demand rose "through the roof" at 8:30am on a Sunday morning within those 5 seconds, but maybe it was a coincidence, or maybe we were the last grain of sand. It was still cheaper than a taxi, so we accepted the 1.5x fare.<br />
<br />
The night before I added a $20 promo off the first ride. Everyone said add it, and offered their user-specific codes. I realize now I could have, and should have, added the user-specific code from one of my friends so they get $20 too. The system accepted the promo code I used. It knows I'm in Canada. You can see where this is going.<br />
<br />
Three days later it has charged the full amount to my credit card, no promo code. The promo code still shows up in my account "Enjoy $20 off your first ride" (that's it, no restrictions are visible). I have a sneaky suspicion that this was a US-only code and the system didn't bother to tell me, or at least warn me. It would be such a simple thing to do--FYI, you have a Canadian postal code, you just put in a US-only promo. That's just annoying.<br />
<br />
I navigated their help system and entered that the system didn't apply the promo code for the trip. Now my pessimist is taking over and I expect this to happen:<br />
1. They'll mail me back eventually and tell me it's a US-only code, or had some other restriction the system didn't tell me about.<br />
2. I'll request that they apply it anyway because there was no indication it wouldn't work so they should put $20 back on my card, since that would have been the outcome had I used one of my friend's code (which I can't use anymore because I've taken my first trip).<br />
3. They'll offer a $20 credit.<br />
4. I'll pretty much have no choice to accept, even though I don't see myself using Uber again in the near future.<br />
<br />
So feeling a bit taken-advantage-of by the last-second surge pricing and no promo code. But it was cheaper than a taxi. A little good customer service right now could turn my feelings around but right now I'm unlikely to use Uber again in the near future. <br />
<br />
<br />
<br />Update: No sooner did I finish writing that than Chad from Uber responded with some great customer service. The code is indeed a US-only code, they put the $20 back on my CC. <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-23828780115540688262010-07-12T16:37:00.000-07:002013-01-20T12:17:41.652-08:00Skype + Compiz + Cairo DockApparently skype video has issues with cairo dock. I can confirm this, it definitely doesn't work, where all other webcam apps (like cheese, or guvcview) work fine. The recommend solution from skype is to simply turn off all visual effects and compositing. Just like Adobe recommended all 64bit users switch to a 32bit browser just to use their latest flash player that fixed a rather nasty bug. It's the "hit it with a big hammer corporate approach".<br/><br/>Thanks to the folks at <a href="http://forum.linuxmint.com/viewtopic.php?f=47&t=36236&p=208735">http://forum.linuxmint.com/viewtopic.php?f=47&t=36236&p=208735</a> for this one. Just add "export XLIB_SKIP_ARGB_VISUALS=1" to /usr/bin/skype and skype. And it all works.Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-48662236990518233062009-10-24T09:39:00.000-07:002013-01-20T12:17:41.665-08:00Firefox 3.5 SoundsThe 3.5 release of firefox has enabled sounds for an alert message. Everytime javascript decides to generate an alert() my speakers go "DING!". <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=508474">Bugs have been filed</a>, and complaints made on many forums. The firefox devs seem to think that their sound scheme is now "doing the right thing".<br/><br/>I beg to differ.<br/><br/><a name='more'></a><br/><br/>In that bug report, the firefox devs say to just turn off the system bell in gnome (similarly in KDE). I don't run gnome. I don't run KDE. I tried installing gnome just to turn off sound. Nope. I tried installing KDE just to turn off sound. Nope.<br/><br/>Here's what I ended up doing:<br/><pre><code>emerge --unmerge sound-theme-freedesktop<br/>USE=-sound emerge gnome-media</code></pre><br/>The second was to prevent gnome-media from pulling in the freedesktop sound again. Presumably now, if I did use gnome, I'd have no sounds at all.<br/><br/>Hey Firefox, how about a config:option. I shouldn't have to neuter my system. Stop interfering with system-level alerts.Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-33878781914951916942009-08-13T13:47:00.000-07:002013-01-20T12:17:41.659-08:00Greasemonkey + FacebookPsst, facebook, I don't want to be friends with random people just because "we both went to UBC", or "we both live in Vancouver". UBC is pretty big, so is Vancouver. I also don't want to become fans of things just because my friends have. So.. bye-bye suggestion box:<br/><br/>Step 1, install greasemonkey: <a href="https://addons.mozilla.org/en-US/firefox/addon/748">https://addons.mozilla.org/en-US/firefox/addon/748</a><br/><br/>Step 2, install this greasemonkey script, just detaches the suggestion box from the HTML, making it disappear, the more elegant solution would be if facebook would just not send the HTML in the first place.. but that's asking too much mehtinks: <a href="http://slicer.ca/files/facebook_desuckify.user.js">http://slicer.ca/files/facebook_desuckify.user.js</a><br/><br/>Step 3, enjoy facebook without the stupid suggestion box.Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-90970670246362488992009-07-22T10:58:00.000-07:002013-01-20T12:17:41.683-08:00Recovering UbuntuA few days ago I did something bad. I did a distro upgrade to bleeding edge Ubuntu (9.10) before release, all for the want of the latest version of libvirt on my antiquated laptop.<br/><br/>I know pre-release software might be rough around the edges, I know things might not work, but I didn't really care, after all these things are usually fixed over time. However, what I didn't bargin for was that the upgrade process was to totally bjorked that it sent dpkg into an infinite loop unpacking the same packages, over and over again, until I stopped it.<br/><br/>Big mistake, but what else could I do?<br/><br/><a name='more'></a><br/><br/>Now my laptop has a nifty new security feature: It freezes on boot with a responsive kernel. The magic alt-sysrq keys still work, allowing a safe reboot. (alt-sysrq-s : sync drives, alt-sysrq-u : remount drives readonly, alt-sysrq-b : reboot NOW). I believe the cause was that dpkg didn't get to do the "configuring packages" step, so everything got updated, but not configured.<br/><br/><strong>Assessing the Problem</strong><br/><br/>Ubuntu helpfully provides recovery kernels (same kernels, different boot options to be more verbose), none of which worked in my case, but they allow one to watch what is going on during boot. In my case, the last message I saw was "Running /scripts/init-bottom... Done." and then it froze. Google turned up a few hits of people with the same problem, but no solution, and no better description of the problem.<br/><br/>However, I know that the init scripts ARE running, so that means the kernel is successfully booting and passing control to the initrd image, which may or may not be finishing, and thus may or may not be passing control to the real init scripts on disk. Those real init scripts are definitely not running, you know, the part that starts with: "* Reading files needed to boot.. [ OK ]". So the problem is in the middle somewhere. This further supports my working theory: the kernel got updated, but initramfs doesn't match the kernel, so it's becoming very unhappy.<br/><br/><strong>Getting a Command Prompt<br/></strong><br/><br/>Given that the kernel IS booting, it's easy to bypass the initscripts and get a command prompt. Edit the kernel command line in grub at boot time and append "init=/bin/bash" to it. Presto, instead of running init, it just drops you to a prompt.<br/><br/>If my initramfs theory is true, all I need to do is finish dpkg's configuration phase to fix things. To do that, first mount the root filesystem read/write: mount / -o remount,rw then run dpkg configure: dkpg --configure -a<br/><br/>Indeed, that was definitely a problem, it spent quite a while configuring packages and regnerating things.<br/><br/><strong>Additional Recovery, Just In Case</strong><br/><br/>Just in case that wasn't the problem, it could be an init bug that has been fixed in a later release of some package, so while we're at it, let's just do an upgrade too. Bring up networking: dhclient & (the & is needed to throw it in the background, for some reason my CTRL keys weren't responding, like CTRL-Z to stop the current program, or CTRL-C to exit it). Then do an update to pull down the package lists: apt-get update. Then do the install: apt-get upgrade. This completed successfully.<br/><br/>Reboot (using the sysrq method, since init didn't run, nothing has hooked ctrl-alt-del, and the reboot command can't talk to init (because it's not running) so it does nothing).<br/><br/>That indeed fixed it, it boots right up to the graphical login, no problem. Ta-Da!Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-24449737089407814812009-06-25T06:24:00.000-07:002013-01-20T12:17:41.654-08:00Error message FAIL<p>I'm trying to get libvirt working, just to play with it. Here's the error:</p><br/><pre style="padding-left: 30px;">libvir: Network Config error : cannot create bridge 'virbr0': Package not installed</pre><br/><p>Package not installed? But the bridge utilities are installed. After much googling, I discovered it's a bridge-utils error message, and here's my translated version:</p><br/><pre style="padding-left: 30px;">Ethernet bridging support isn't enabled in the kernel</pre><br/><p>lrn2writeerrormessages. kthx.</p><br/><p></p>Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-9573588623308654022009-06-16T10:54:00.000-07:002013-01-20T12:17:41.684-08:00nVidia blocking signal problem fixedhave been experiencing <a href="http://bugs.gentoo.org/260441">this bug</a> since the 180.35 nVidia drivers were released. The dreaded blocked signals bug. The .37 driver was supposed to fix it, and did for many people, but not me. Neither did .41, .44, .51, or the latest ones, 180.60. This wasn't a big problem, I reasoned I'd just wait until it was actually fixed and continue using the 180.29 drivers. That waiting ended today when I upgraded to kernel 2.6.30 and discovered the .29 drivers don't build against that kernel. Curses.<br/><br/><a name='more'></a><br/><br/>So I did what any good programmer would do, searched the Internets. Nothing. Then I fired up vim and exitted it (in a console, because X doesn't start with the lost signal bug), causing the predictable soft-lockup. Then I switched consoles and attached GDB to vim to see where it was blocked. Sure enough in libGL.so. nVidia's driver. I'm not sure why libGL is even being used, I suspect it has something to do with needing to wedge it in the signal path just in case.<br/><br/>On a whim, I let the program continue and stopped it again, this time it stopped in tls/libnvidia-tls.so.180.22. Excuse me? I'm on the 180.60 drivers, not 180.22. So I did a complete search for stale nVidia drivers:<br/><pre>/usr/lib64/libnvidia-tls.so.180.22<br/>/usr/lib64/xorg/modules/libnvidia-wfb.so.1 -> /usr/lib64/xorg/modules/libnvidia-wfb.so.180.22<br/>/usr/lib64/xorg/modules/libnvidia-wfb.so.180.22<br/>/usr/lib64/libvdpau_nvidia.so.180.22<br/>/usr/lib64/libnvidia-tls.so.1 -> /usr/lib64/libnvidia-tls.so.180.22<br/>/usr/lib64/libnvidia-cfg.so.180.22<br/>/usr/lib64/libnvidia-cfg.so.1 -> /usr/lib64/libnvidia-cfg.so.180.22<br/>/usr/lib64/libnvidia-cfg.so -> /usr/lib64/libnvidia-cfg.so.1<br/>/usr/lib64/tls/libnvidia-tls.so.180.22<br/>/usr/lib64/tls/libnvidia-tls.so.1 -> /usr/lib64/tls/libnvidia-tls.so.180.22</pre><br/>With similar ones in /usr/lib32. What a mess. I deleted them all, reinstalled the 180.60 nVidia drivers, and everything works properly!<br/><br/>Dear Gentoo: please cleanup your stale files. Thx, A Gentoo User.Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-67601033024931013592009-06-03T08:13:00.000-07:002013-01-20T12:17:41.672-08:00Profiling PHP Code<p>I have a PHP script I wrote for my research that takes stupidly long time to run. Why? I don't know. So on an off chance of finding something useful, I put "PHP profiling" into google.</p><br/><p>So it turns out that PHP profiling is a huge topic, there are many websites ready to provide HOWTOs and tutorials for a zillion different techniques. And, like everything in the computer world it seems, the solution is easy and sifting through all useless advice and "type-this-random-thing-into-your-console" is what takes the time.</p><br/><p>Here's what gentoo users need to know:</p><br/><ol><br/><li>emerge xdebug</li><br/><li>Edit /etc/php/php-cli/ext/xdebug.ini , set xdebug.enable_profiling="1", and I also had to increase my max_nesting_level to "1000". It took forever to figure this out, ALL the documents say "oh, just put the settings in php.ini.". WRONG. They get ignored in there. </li><br/><li>Install kcachegrind, and use it to load the profile dumps now being written in /tmp/cachegrind*</li><br/></ol><br/><p>Done.</p><br/><p></p><br/><p></p><br/><p></p>Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-39575842442106360812009-02-13T14:23:00.000-08:002013-01-20T12:17:41.662-08:00Rogers sold my email address<p>One of the advantages of having my own domain name is that I can give out a different email address to every company that wants my email. I use a pattern to generate these addresses, they're not one-word somethings that a spambot would guess.</p><br/><p>Yesterday, I recieved an email from netmarketingcanada.com with links that point me back to netmarketingcanada.com to unsubscribe and view things. They're advertising.. 30% off.. something... my email client doesn't load the remote images (also from netmarketingcanada.com) so I can't see the majority of their email, but that's not the point.</p><br/><p>The email was TO the email address that Rogers Canada (and only Rogers Canada) has for me. So, a big thanks Rogers for selling my email address to spammers. I don't remember seeing "will sell your email address to spammers" in their privacy policy, but perhaps it has been updated and someone could point me to that clause?</p><br/><p></p>Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-26161180422468692312009-02-11T17:16:00.000-08:002013-01-20T12:17:41.657-08:00iPhone BlissI have three beefs with my iPhone:<br/><ol><br/> <li>I can't use <a href="http://www.gtkpod.org/about.html">gtkpod</a> or other software to sync my music, because it's running firmware >= 2.0</li><br/> <li>Disregarding music, I can only sync everything else (contacts, whatnot) in Linux over ssh to a <a href="http://blog.iphone-dev.org/">jailbroken iPhone</a> (requires remote mounting via. sshfs), even if the phone is sitting beside, me plugged into a USB port.</li><br/> <li>1 and 2 should happen automatically as soon as I plug in to USB, I shoudn't need to drop to a terminal and type stuff.</li><br/></ol><br/>Happily, there is a solution for all 3. Here, I'll talk about 1 and 2.<br/><br/><a name='more'></a><br/><h3>Syncing the iTunes Database on Firmware >= 2.0</h3><br/>Why is this a problem? Well the folks at Apple have apparently been reading Mircosoft's playbook on locking in your customers and locking out everyone else. They were unhappy that<a href="http://www.monroe.nu/archives/110-iPod-Classic-Will-Be-Supported.html"> their previous iTunesDB hash was broken</a> and anyone could write to their own iPods, so they silently created a new one, thus locking out anyone who doesn't go through their software. And then, continuing to follow Microsoft's fine example, they got all uppity about the <a href="http://bluwiki.com/go/Ipodhash">Ipodhash</a> project which was working on reverse engineering their new hash, so they threatened legal action.<br/><br/>Happily, again taking a page from the Microsoft playbook, everything must be backwards compatible. On a jailbroken iPhone you simply tell the phone to use an earlier version of the database, a version that gtkpod and others can read and write. Yes, it's that easy.<br/><br/>See: <a href="http://marcansoft.com/blog/2009/01/using-amarok-and-other-itunesdb-compatible-software-with-the-iphone-2x">http://marcansoft.com/blog/2009/01/using-amarok-and-other-itunesdb-compatible-software-with-the-iphone-2x</a><br/><br/>Summary:<br/><ol><br/> <li>Edit <strong>/System/Library/Lockdown/Checkpoint.xml</strong></li><br/> <li>Find the <strong>DBVersion </strong>key</li><br/> <li>Change the integer that follows it (on the next line) from <strong>4</strong> to <strong>2</strong>.</li><br/> <li>Reboot the phone.</li><br/></ol><br/>Party... or something.<br/><h3>Communicating over USB</h3><br/>It's great that we can actually talk to our iTunes Database now, yay! But, we still need to go through a<a href="http://www.fsckin.com/2007/10/10/how-to-stream-music-from-the-iphone-in-ubuntu/"> lengthy procedure</a> to setup remote ssh filesystem access because Apple pulled another Microsoft and invented a new USB communication protocol (instead of using standard ones, like the USB mass storage device). And of course, you can guess who they shared information about that protocol with. Yup, no one.<br/><br/>Enter <a href="http://matt.colyer.name/projects/iphone-linux/index.php?title=Main_Page">libiphone and ifuse</a> and a successful implementation of Apple's new USB protocol. Requires fuse to be enabled in the kernel (or type "sudo modprobe fuse", and it will be enabled)<br/><br/>Since I maintain my own system, I have no problem installing my personal built libraries right into the system directory, many purists will flame me for what I am about to type, hopefully one day these tools will appear in package repositories for the various linux distros:<br/><pre><br/>git clone <a class="external free" title="http://git.matt.colyer.name/2008/libiphone/" rel="nofollow" href="http://git.matt.colyer.name/2008/libiphone/">http://git.matt.colyer.name/2008/libiphone/</a>cd libiphone./autogen.sh./configure --prefix=/usrmake && make install<br/><br/>git clone <a class="external free" title="http://git.matt.colyer.name/2008/ifuse/" rel="nofollow" href="http://git.matt.colyer.name/2008/ifuse/">http://git.matt.colyer.name/2008/ifuse/</a> cd ifuse./autogen.sh./configure --prefix=/usrmake && make install</pre><br/>Then, run their utility to generate keys for iPhone communication:<br/><pre>libiphone-initconf</pre><br/>And mount the iPhone somewhere:<br/><pre>mount.fuse.ifuse none /media/iPhone</pre><br/>The last step is to simply point gtkpod at the mountpoint. iTunesDB syncing across USB.Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-84262410974500811892008-12-11T19:13:00.000-08:002013-01-20T12:17:41.681-08:00UBC VPN<hr />I need to document this. Why do most help manuals and HOWTOs read like the author assumes the reader is an expert, and knows what he or she is doing? I had a professor like that once in undergrad; he taught his course as though we all had already mastered the content. We learned nothing.<br/><br/>I couldn't help thinking of him while trying to setup VPN access to UBC. "It's easy, even in Linux" the HOWTO claims, but it is scarcely more than: 1. Setup VPN. 2. Add routes. 3. Done. Steps 1 and 2 could use a few sub-points.<br/><br/><a name='more'></a><br/><br/>So here's what I did. First, I enabled ppp_synctty, ppp_mppe, and ppp_generic in my kernel. That's in "Device Drivers" -> "Network Device Support", and then:<br/><ul><br/> <li>PPP (point-to-point protocol) support<br/><ul><br/> <li>PPP support for sync tty ports</li><br/> <li>PPP MPPE compression (encryption) (EXPERIMENTAL)</li><br/></ul><br/></li><br/></ul><br/>The docs don't tell you, but sync tty is important. PPTP fails badly without it. Next, is to actually install PPTP.<br/><pre style="padding-left: 30px;"># <strong>emerge pptpclient</strong></pre><br/>Then run the pptp command line config thingy. All the docs recommend using networkmanager, which is fine if you're in gnome, or knetworkmanager in kde. But if you, like me, choose to use something else, networkmanager fails. So, the command line it is.<br/><pre style="padding-left: 30px;"># <strong>pptp-command</strong><br/>1.) start<br/>2.) stop<br/>3.) setup<br/>4.) quit<br/>What task would you like to do?: <strong>3</strong></pre><br/>Choose, 3 to setup, then 4 to add a new PPTP tunnel, then 1 to create an "other" tunnel, no idea what that means, then it should look something like this:<br/><pre style="padding-left: 30px;">1.) Other<br/>Which configuration would you like to use?: <strong>1</strong><br/>Tunnel Name:<strong> ubc<br/></strong>Server IP: <strong>vpn.ubc.ca</strong><br/>What route(s) would you like to add when the tunnel comes up?<br/>This is usually a route to your internal network behind the PPTP server.<br/>You can use TUNNEL_DEV and DEF_GW as in /etc/pptp.d/ config file<br/>TUNNEL_DEV is replaced by the device of the tunnel interface.<br/>DEF_GW is replaced by the existing default gateway.<br/>The syntax to use is the same as the route(8) command.<br/>Enter a blank line to stop.<br/>route: <strong>add -net 142.103.0.0 netmask 255.255.0.0 dev TUNNEL_DEV</strong><br/>route: <strong>add -net 137.82.0.0 netmask 255.255.0.0 dev TUNNEL_DEV</strong><br/>route: <strong>add -net 128.189.0.0 netmask 255.255.0.0 dev TUNNEL_DEV<br/></strong>route: <strong><press enter></strong><br/>Local Name and Remote Name should match a configured CHAP or PAP secret.<br/>Local Name is probably your NT domain\username.<br/>NOTE: Any backslashes (\) must be doubled (\\).<br/>Local Name: <strong>YOUR CWL ID<br/></strong>Remote Name [PPTP]: <strong>ubc<br/></strong>Adding ubc - vpn.ubc.ca - YOUR CWL ID - ubc<br/>Added tunnel ubc</pre><br/>Ok, so what did all that do? Well, it created a file called 'ubc' in /etc/ppp/peers with all the above settings in it. The tunnel name is used to identify the tunnel, it serves no other purpose. The server IP is what we are connecting to. The routes are blocks of IP addresses to forward through the tunnel. In this case, for UBC, those are the class B IP ranges for the UBC campus. Later, I added more to do things like forward connections to IEEE Xplore through the campus so I can access journal articals. The Local Name, has two purposes: It helps identify which CHAP secret will be used for authentication, and it is also the username that is forwarded to the server, so this must be the UBC CWL ID. The remote name can be anything.<br/><br/>Next step, edit /etc/ppp/chap-secrets, and add the following line:<br/><pre style="padding-left: 30px;">YOUR CWL ID <space> ubc <space> YOUR CWL PASSWORD</pre><br/>You can use the pptp-command menus to do this too. This tells the local pppd that when you're using local name 'YOUR CWL ID' and remote name ubc, that it should use this password.<br/><br/>Are we there yet?, No, not quite. Creating the tunnel also added a /etc/ppp/options.pptp file. We now must edit this file. Anywhere in the file, add the line:<br/><pre style="padding-left: 30px;">nopcomp</pre><br/>And at the bottom, uncomment this line:<br/><pre style="padding-left: 30px;">mppe required,stateless</pre><br/>Without doing that, the ppp connection spews errors about unknown packet types, took a little while digging through google to figure that one out.<br/><br/>Now the pptp-command can be invoked again to start the 'ubc' tunnel, and it should all work, at least it does for me.<br/><pre style="padding-left: 30px;"># <strong>pptp-command start</strong></pre><br/>And<br/><pre style="padding-left: 30px;"># <strong>pptp-command stop</strong></pre>Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-64521133580927360752008-03-30T05:10:00.000-07:002013-01-20T12:17:41.671-08:00Bridging MediaI haven't posted anything hackishery in a while, so here we go.. Yesterday I attended <a href="http://bridging-media.com/">Bridging Media</a>, my super sekret invite was secured through a friend of mine, Erica, who happened to be co-running the event. A very successful event. Hats off to Erica and the whole organizing crew! I'd signup for another one in a heartbeat.<br/><br/><a name='more'></a><br/><br/>There's not a lot for me to say about this crowd, they're media folks who are trying to figure out this whole internet and technology thing. They want to distribute their content (and hopefully make money) using a medium that hasn't been deprecated in the eyes of geeks since 1997. Several of these adventurers (Boris and Catherine, that I met) have immersed themselves in this world and expertly know their way around. There were some pretty cool ideas floating around, some of which I wish we (the tech/geek community) had thought of 10 years ago. But................ But.................. (and for emphasis, a few more dots to build suspense)......................<br/><br/>However....................................................<br/><br/>I lived through the .com era, I was IN SILICON VALLEY when the whole thing came crashing down. I heard Alan Greenspan tell everyone it was going to come crashing down, and he was going to pull the trigger. Noone listened. I see the same thing happening all over again with this digital media community. At least, this is my fear.<br/><br/>They talked about getting money to finance their projects, and pushing ads to "eyeballs" as a continuous income stream. They talked about subscription models for income. We heard people pitch their companies that do "microfunding", and how you could buy a small part of a production to help it along.<br/><br/>Ugh.<br/><br/>We went through this 10 years ago in tech. IT DOESN'T WORK. Adblockers effectively remove ALL ADVERTISEMENTS from a webpage. Google ads work because of their size and because their ads are non-invasive, but all those little ad companies that used to pay for display, or pay per click, Gone. Popups, popunders, and forcing content infront of the user are on their way out.<br/><br/>"Microfunding" and buying small parts of a production is great in theory, but here's the slippery slope: Eventually someone will say "Hey! If we invent parts for people to buy, we can give them away, and pay people in parts of the company instead of real money". I believe that's called "stock". Someone made the comment that it's the geeks that try everything, and it's the stuff that sticks that is disseminated to the general populous. Unfortunately the stuff that doesn't stick isn't well known.<br/><br/>Before you think your new idea is going to take off like a bottlerocket, do some research, have a look at what tech tried 10 years ago. Specifically, look at what didn't work. How many trials did Edison's light bulb take? And how many of those failed trials do we know?<br/><br/>With a little research effort, maybe this time Alan Greenspan like figure won't have to trigger an avalanche just to stop a snowball.Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-36824825727834882112008-03-16T07:36:00.000-07:002013-01-20T12:17:41.661-08:00Exiting a Bus - Episode 4 - A New Dope<p>I just don't understand the logical processes used by some people. Further, I don't understand how these people have avoided being eliminated from our society through some sort of accident of their own causing. But whatever.</p><br/><p>Let's set the scene: It's a nice quiet day, I'm on a bus coming home from campus, the bus is rather empty. It's an extended "accordion" bus, 60 feet long, and plenty of seats available.</p><br/><p>DING stop request, nothing unusual. I'm sitting at the front left of the bus, in the first set of seats facing forward, just minding my own business. The bus pulls up to the stop, stops, and opens the front doors just incase anyone at the stop wants to get on, but no one does. Then comes the "hiss" of the compressed air opening one of the rear doors, judging by the volume, the middle doors, evidentially someone is getting off, another successful bus stop. Those doors will hiss again in 5 seconds and we'll be on our way.</p><br/><p>But before that happens, the excitement starts. About 2 seconds before the doors close, an asian lady (why is it always asian?) probably early 40s, sitting in the closest seat to the front of the bus (shown in blue in the diagram below), gets up and starts walking towards the back of the bus. I'm in the first set of forward facing seats so she quickly passes out of my vision. I just assumed she was going for an empty pair of forward facing seats.</p><br/><p>Apparently Not.</p><br/><p>It takes a good 10 seconds to walk the length of one of these buses. The doors have closed for a good 5 seconds and the driver is already pulling out into traffic. And then we hear it. "WAIT STOP I WANT TO GET OFF, DOORS DOORS!".</p><br/><p><img src="http://www.slicer.ca/files/bus.jpg" alt="How to Exit A Bus" /></p><br/><p>Naturally, we all turn around to see what the ruckus is about. Yup, it's that same lady. She walked from the front of the bus to the rear, and then attempted to exit by the rear doors. I admire her strictly obeying all those signs that say "Please Exit by the Rear Doors". But .. maybe a little common sense next time? Please? So let's review.. When sitting at the closest seat to the front of the bus, the only appropriate exit to use is the one furthest from you.</p><br/><p></p><br/><p></p>Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-71877803444830335442008-02-04T09:28:00.000-08:002013-01-20T12:17:41.675-08:00Exiting a Bus<p>I'll probably go back and write about previous IPTPYA episodes, but here's a fresh one for today.</p><br/><p>The procedure for exitting a bus is rather complicated (I'll write more about other experiences later). But today all the stupidity of Vancouver mustered itself into one lady in a spectacular manifestation of misfiring neurons. Today we got to ride an older bus. These buses don't have advanced door opening technology like a pushbar (which, if repeatededly and violently shaken will eventually trigger the door opening switch normally triggered by a single push), no, these buses have a large 30 point font in clear yellow on black letters on both doors at eye level that reads: "STEP DOWN ON TOP STEP TO OPEN DOORS".</p><br/><p>Let's dissect that. STEP DOWN. As opposed to stepping up, or sideways, or backwards, or remaining immobile, clearly indicates a step in a downward direction is required. But required for what? ON TOP STEP. Ohh, now as a reasonable person, I interpret this to mean that I need to step onto a step, as opposed to standing in the aisle waiting for something to happen through telepathy. TO OPEN DOORS. Ahhhh, so all this only applies if I actually want to open the doors. So what I'm getting out of this is standing in place probably won't open the doors. I need to move my footsies somewhere.</p><br/><p>So, the bus stops and the lady is standing in the aisle directly infront of the door. As a bonus, the big green light above the door turns on, indicating that the doors will open on command. And two big white lights also turn on, illuminating the 30 point yellow on black font. Or rather, would have illuminated them if it wasn't the middle of the day with a clear sky. She stands there, staring at the door for a second, then leans forward, skillfully avoiding losing her balance and grabs the door handle (which is actually a handrail after the doors swing open), and starts violently shaking it. Nothing happens. Now, this is actually an impressive gymnastic feat. There are two large downward steps between the aisle and the door, to lean forward and grab the door without losing balance and accidentally stepping on the TOP STEP would take a lot of skill. I doubt I could do it without practicing. Over time the shaking becomes more violent until it climaxes when the green light turns off and the bus starts moving. Then the yelling starts. "Bah Doos! BAH DOOS! BAH DOOS! BAH DOOS!". (Translated in to English, that's "Back Doors", I think.)</p><br/><p>I'm surprised the driver could even hear her over the racket of the engine and the violent door shaking which upon climaxing showed no signs of relenting. The driver stops the bus.. the magic green light and two white lights go on.. again.. and the driver yells back "You have to step down on the top step".</p><br/><p>Pause. Pause. Violent door shaking. Complete foot immobility. BAH DOOS! BAH DOOS! At long last the three chimes sound indicating that all the doors are about to open, and the driver manually opens them. She storms off the bus in a huff. The kicker is she had a monthly bus pass dangling from her neck validated for the past several months, she's clearly a regular customer of the transit system, but apparently not a regular customer of logical thought processes. I guess we should thank her ineptitude for holding all of us up for a good minute of entertainment.</p><br/><p>So to recap, when your attempting to exit a bus, the aisle is an IPTPYA.</p>Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-19358855497213150352008-02-04T06:40:00.000-08:002013-01-20T12:17:41.651-08:00Inappropriate Places to Park Your Assstronomically unintelligent keister<p>What is IPTPYA? Inappropriate Places To Park Your Ass. I live in Vancouver, and while I'm sure every city has its fair share of idiots, they seem to congregate around Universities. Vancouver has two of these institutions. I'm not just talking about students either, I'm talking about people, in general, who have somehow manged to avoid being eliminated by natural selection while simultaneously demonstrating they have only evolved enough logic and common sense to triumph over the turnip table of the local produce store in a battle of the wits.</p><br/><p>One subtype of these people are my pet peeve. I'm a person that likes to get where I'm going without being held up for no good reason. I don't speed or drive dangerously when in my car, and I don't bump into people or shove I'm walking/running, and if there's a traffic jam, whatever, I'm fine with that. But it's the people who impede traffic (either vehicle or people traffic), the ones that are completely clueless to their surroundings, that don't even notice they're creating an impassible obstruction, and that can't fire the 3 required neurons to figure it all out, that really annoy me.</p><br/><p>"I am constantly amazed by the lack of common sense and general awareness in University students". I started using this phrase back in undergrad. I noticed many of my fellow students didn't seem to be "all there" mentally. Just little things like on a perfectly flat section of street on a clear day: look left, look right, look left again, then step out on a quest to cross the street directly infront of the bus that is no more than 20 meters away. Oh, but then, hearing the horn and screeching brakes, look at the bus, and then stop. Deer in headlights. Do i keep crossing or do I go back? I know, I'll just stay here for a few seconds and think about it. IPTPYA.</p><br/><p>These are their stories as witnessed by me.</p>Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-33472999923063951842008-02-03T15:45:00.000-08:002013-01-20T12:17:41.658-08:00Making Drupal exist in a subdirectory<p>I have a confession: I am a bit of a neat freak when it comes to my files. Clutter annoys me almost as much as compressed files that extract themselves into the current working directory.<br/>I set out on a quest today, to upgrade Drupal AND to make it happily exist in a subdirectory on my server, BUT, to make it appear that it exists in the root directory.</p><br/><p>Actually just that turned out to be easy, Drupal even provides a guide that conveniently assumes you don't have any other content in your directory. I mean, you've got Drupal, why would you want a /photos directory that's not "inside" Drupal? Or a /files directory that Drupal doesn't manage? Stop being silly.</p><br/><p>It turns out, though, that what I wanted was also quite easy, but piecing together the bits and cutting the cruft took excessively long. But that's a typcial computery solution: A simple solution and a long and winding road to find it.</p><br/><p>So, let's begin.</p><br/><ol><br/><li>Put Drupal in a subdirectory. Mine is called drupal-5.7</li><br/><li>Add a .htaccess to the root of the website to rewrite incoming requests to Drupal:<br/><pre>RewriteEngine on<br />RewriteRule ^$ drupal-5.7/index.php [L]<br />RewriteCond %{REQUEST_FILENAME} !-f<br />RewriteCond %{REQUEST_FILENAME} !-d<br />RewriteRule ^(.*)$ drupal-5.7/$1 [L]</pre><br/>Now, I'm not a .htaccess expert, so I may be slightly wrong in how exactly this works. The first RewriteRule directs the server to redirect all requests for "/" to Drupal's index.php, so drupal is what you see when you just type the base URL. The .htaccess inside the drupal directory can further rewrite this.<br/>The two rewrite conditions are for the next rule, !-f and !-d mean that only do this next rewrite if the file(or directory) doesn't already exist. I have /photos on my server that I don't want rewritten to /drupal-5.7/photos/<br/>The final rule simply appends the prefix drupal-5.7/ to the request, and sends it off. Drupal further rewrites this when Tidy URLs are used. </li><br/><li>Delete /index.php, we don't want the server to find it.</li><br/><li>Make sure you don't already have any existing files/directories that are inside the Drupal install. For example, I already use a /files directory, so does Drupal, so I renamed Drupal's to 'dfiles', and changed the config accordingly (Administration -> File System).</li><br/></ol><br/><p>Cake. It all works as far as I can tell.</p>Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-71866428616678895042007-04-21T07:30:00.000-07:002013-01-20T12:17:41.674-08:003kg to go<p>I would just like to point out, that I have gone through almost 20kg of flour in 4 months. :) </p>Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-49476135625244217642007-03-21T10:39:00.000-07:002013-01-20T12:17:41.667-08:00S M R T<a href="http://www.slicer.ca/photos/view.php?album=%2F2007%2FMisc&pic=cbc-iq.jpg"><img src="http://www.slicer.ca/photos/img.php?album=%2F2007%2FMisc&pic=cbc-iq.jpg&width=384" alt="CBC IQ" title="CBC IQ" width="384" height="250" align="right" /></a><p> </p><p>Devon thought I should take the <a href="http://www.cbc.ca/testthenation/" target="_blank" title="CBC IQ test">CBC IQ test</a> just so we could flaunt our geekiness and what not. So here it is, the same score I got back in highschool... go figure... Apparently i'm not so good at the English thing...</p><br clear="all"/><br/><!--break-->Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-12355325328457271982007-03-15T06:49:00.000-07:002013-01-20T12:17:41.649-08:00Research About<p>I’m a PhD student at the University of British Columbia (UBC) in electrical and computer engineering. My supervisor is <a href="http://www.ece.ubc.ca/%7Elemieux">Dr. Guy Lemieux</a> and I’m studying in an area called Spatial Computing. Specifically, how to split a computer program up among a million-ish very small processors, and have it do useful work.</p> <p>The rest of this is just a placeholder, until I write more. </p>Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-44406288035638064662007-03-07T17:46:00.000-08:002013-01-20T12:17:41.663-08:00Ode To Whirlpool (Updated June 21)<p>Oh Whirlpool, how do I love thee.. let me count the ways...</p> <p>*crickets*</p> <p>So, let's see, let's go way back to the beginning of December 2006. Safeway puts 10kg bags of Five Roses flour on sale, 2 for 1. Now, I rather enjoy baking and flour is a somewhat necessary component, and Five Roses is all I use, and the Christmas season is coming up, and I have family in town, and my grandparents were going to be here for New Years.. so what the heck.. I'll buy two 10kg bags of flour.</p> <p><br/><!--break--><br/></p> <p>Then the fateful day, December 6, 2006. I've got bread rising on the counter ten minutes away from going in the oven, my oven (a Whirlpool Gold gas range, absolutely love it) takes 10 minutes to preheat.. Temperature.. 400.. Bake... On.. BANG. Now, that last noise is distinctly not part of the preheat cycle. Indeed, no gas at all in the oven.. the igniter isn't even on. But the stovetop still works, and the oven light works, and all the electronics, just not the oven.</p> <p>Well, that's a bummer, emergency call to my Aunt and nip over to her place to bake the bread. Then the process begins.. Calling Whirlpool.</p> <p>I'm informed by Whirlpool that the earliest they can get someone out to look at it is the 11th.. Unfortunately, I'm out of the country from the 11th to the 17th.. So, they'll come on the 18th.. between 8am and 4pm. That's a rather large window but every company seems to operate like that, so whatever.. if I can get my oven fixed by then that's great, I can still do Christmas baking.</p> <p>December 18th, 9am-ish. I get a call from the technician stating that he'll be at my place between 4 and 6pm.. I protested because I had evening plans, and after 4pm is outside the already rather large window of 8am to 4pm. But, I'm told that if I wanted to reschedule it would be 3 to 4 more days for his next available timeslot in the day.. wtf? Fine, whatever, I'll cancel my evening plans.. And I'll just sit here and twiddle my thumbs all day too because I cleared my daily schedule too.</p> <p>So December 18th, 5:45 pm, guess who shows up.. yup.. Good thing I didn't just push back the plans to after 6.. because he spent half an hour looking at my oven.. and eventually arrived at the conclusion that "it's broke".. it needs a new control board.. 2 to 3 weeks to order one. $300. And was gone around 6:20. Charming.</p> <p>So, all my Christmas baking plans.. kaput.</p> <p>Lovely Christmas comes and goes, and on the 29th I phone the technician (almost 2 weeks, he should have some indication about where my part is) .. He says.. we have no idea where it is, it'll be well into the new year before we get it. Huh.. customer service eh? New year plans.. bye bye.. sorry everyone, but I can't cook anything for you... and ham and freshly baked rolls on the stovetop just, I don't know.. it lacks something...<br /> So, here is letter number 1. Sent to Whirlpool on the 2nd of January.</p> <blockquote> <pre>January 2nd, 2007.</pre> <pre>To whom it may concern,<br /> <br /> I am writing this letter to convey dissatisfaction with my recent and ongoing<br /> customer service experince with Whirlpool.<br /> <br /> On December 6, 2006 my gas oven (GW395LEG) made a "pop" sound, and stopped<br /> working. I called Whirlpool customer service and was informed the first<br /> available technician timeslot was the 11th -- one day after I left the city<br /> for a research conference.<br /> <br /> The next "working day" timeslot I was in town was a week later, the 18th,<br /> where I was given a 8am to 4pm window. At 9am the technician phoned to tell<br /> me that he would arrive after 4pm and before 6pm. I had already<br /> cleared my schedule for that day, and was then forced to cancel my evening<br /> plans as well due to the short notice of the change.<br /> <br /> At 5:45pm on the 18th the technician arrived, spent half an hour with my stove,<br /> and declared that I needed a new control board. It would cost $300 + labour +<br /> tax + site visit charge, almost half the cost of the stove, and would take<br /> three weeks to order. I live in a major urban center, Vancouver, I find<br /> it astonishing that there are no parts within three weeks of this<br /> city.<br /> <br /> On December 29th, I contacted the technician for a status update, and was told<br /> that it would be well into the new year before the replacement part arrived.<br /> <br /> It has been almost a month since my oven became inoperable (stovetop still<br /> works thankfully), and during that time I have been unable to do any Christmas<br /> baking, cook Christmas dinner, or entertain guests on New Years. To me, as a<br /> customer, a month (and counting) to repair a vital kitchen appliance is<br /> unacceptable. I could have ordered a new stove and had it installed by now.</pre> <pre>Sincerely,</pre> </blockquote> <p>So, that's that. On the morning of January 11th, 2007, I receive a call at like 6am (wtf, these people.. Vancouver PACIFIC TIME.. hello!).. anyway.. somehow I missed that call. They left a message.. we got your message, your part has just arrived, call us and we will arrange a time for it to be installed.</p> <p>Hey, great.. I have no idea if that letter actually did any good, but all I need is a technician for about 10 minutes to install a circuit board (note: I could do this myself.. but it's a gas appliance, so you have to be a Canadian gas certified technician to open it up.. even for installing circuit boards).. so I call back and get to wait on hold for a while.. And get someone.. explain my situation, explain that YOU called ME to get an appointment ASAP. "Well Sir, the first available appointment we have is on the 22nd of January..."</p> <p>Now, I'd just like to skip ahead for a moment.. there's a spot on their "Whirlpool Service Quality Survey" for "Following your call for service, how long before the technician arrived?".. the choices are "Same day", "next day", "2-3 days", or "4 or more".. somehow... "4 or more" doesn't seem to capture the fact that they wanted me to wait 11 more days for a service call. 11!. Ok, fine, book that day for me..</p> <p>Then I call the technician directly he says.. it'll be really fast to install it, I'll call you if I get an earlier time available.. Great.. that means.. "go away". I call whirlpool again on the 13th, and ask specifically for the person who called me.. unfortunately they can't connect me to anyone by name.. and regarding my service call, "that's the best we can do.". But they do provide me with one other tidbit.. "Sir, I see that your part was ordered, then somehow the order got cancelled, and the part was ordered again. But it's in now."..</p> <p>Well, that sorta accounts for the delay, and I guess as a good little customer I'm just supposed to laugh that off ? You're fscking looking at proof that I've had to wait longer than I should have had to for this part.. and now you're telling me 11 more days is the best you can do... Somehow I resist the urge to make a comment about the best they can do being pretty lousy.</p> <p>So, the days go by with me without my oven, and two 10kg bags of flour sitting there mocking me.. Which brings us to January 22nd, 2007 and a standard window of 8am to 4pm for the technician to show up and perform (what turned out to be a 10 minute repair from the time he walked in my door to the time he walked out).. You'll never guess who called at 9am.. go ahead.. guess.. I dare ya.. "I'll be there sometime between 11 and noon". Hey, great.. I can still make it to campus.</p> <p>While we're playing guessing games, guess who doesn't show up between 11 and noon, and guess who calls at 1pm.. I'll give you a hint, the conversation went something like this: "My day got busy, I'll be there around 2:30.".. No? still can't guess.. well.. I've give you another hint.. it's the same person who called around 2:30 to say "I'm still busy, i'll be there between 4 and 6pm.". At this point I objected and pretty much demanded that he show up before 4pm.. because I had evening plans.</p> <p>3:30 he shows up, 3:40 he's out the door and I have a working oven. Hallelujah!</p> <p>Anyway, because of the, ahem, poor service, I decide to write another letter to Whirlpool:</p> <blockquote> <pre>January 24, 2007</pre> <pre>To Whom It May Concern,<br /> <br /> I am writing this letter to further my previous letter, dated January 2, 2007,<br /> regarding my most recent service experience with Whirlpool. On January 22nd,<br /> my oven was successfully repaired.<br /> <br /> It has been 7 weeks (almost 2 months) since my original call to Whirlpool<br /> customer service on December 6th. I have been without an oven for the duration<br /> of this time. This has caused me to be unable to make the simplest of meals<br /> for my own daily basic needs.<br /> <br /> I have been forced to eat out, or increase my grocery bill by purchasing items<br /> that were microwavable or able to be cooked on the stovetop only. This has<br /> been most inconvenient not to mention unhealthy.<br /> <br /> As detailed in my previous letter, I was unable to entertain guests over the<br /> holidays. I was forced to make alternative arrangements, and tell my family<br /> the could not come visit me for Christmas and New Years, as I was unable to<br /> cook a traditional dinner for them. This is the situation that your<br /> company put me in, and it has been embarrassing.<br /> <br /> The service technician called on both my scheduled service days, December 18th<br /> and January 22nd, saying that he would be late and outside the 8am to 4pm<br /> service window. This is unacceptable. I cleared my schedule and missed two days<br /> of work for him to tell me he was going to come in the evening. If arrangements<br /> were made for him to come in the evening I would not have had to have missed<br /> two days of work. My time is just as valuable as his and yours.<br /> <br /> I was originally told that the control board required to repair my oven would<br /> take three weeks to order. I thought this was an excessive amount of time,<br /> considering the metropolis I live in (Vancouver), however, as stated above it<br /> has been two months. I was not told that the item was on back order, nor was I<br /> told that there would be any delay in service. It is unacceptable. I<br /> feel that I have been more then patient and cooperative over this whole ordeal.<br /> <br /> In light of the inconveniences that I have incurred from your poor and<br /> disappointing customer service I feel it is only fair that I am compensated for<br /> these inconveniences.<br /> <br /> Sincerely,</pre> </blockquote> <p>To date (March 7th, 2007 that letter has received no reply). However, on March 4th, I got a wonderful letter in the mail from Whilrpool.. A Whirlpool Service Quality Survey..</p> <p style="margin-left: 40px">Our records indicate that your appliance was recently serviced. The repair work was done by an employee or an authorized Whirlpool Service Center, which is independently owned and operated.</p> <p style="margin-left: 40px">Please help us evaluate and subsequently improve our customer service by completing this survey. The survey is postage paid for your convenience.</p> <p style="margin-left: 40px"><span style="font-style: italic">Thank you for taking the time to respond and for your continued trust in Whirlpool Products</span></p> <p>Uh-huh.. It's only been 7 weeks since I called you until the date my appliance was usable again.. no problem.. I enjoy taking the time out of my life to wait for Whirlpool.. That was sarcasm in case anyone missed it. :p</p> <p>Needless to say, Whirlpool didn't score so hot on their survey. I resisted the urge to make my own boxes for some of the questions because "Dissatisfied" doesn't quite cut it. Anyway, here's Whirlpool letter number 3.. This letter and the previous letter (which received no response) will accompany the survey in their postage paid envelope .. back to Whirlpool..</p> <blockquote> <pre>March 7, 2007<br /> <br /> To Whom It May Concern,<br /> <br /> Enclosed please find a copy of my last letter, dated January 24, 2007, which was<br /> sent to Whirlpool Customer Service and has received no response to date. I would<br /> appreciate a response to the concerns outlined in that letter as well as compensation<br /> for the ordeal and inconveniences I have suffered due to the actions of your company.<br /> <br /> Sincerely,</pre> </blockquote> <p>June 21, 2007 Update:</p><p>So, I'm on the bus, and I get a call from Vic from Whirlpool. The whole oven ordeal happened so long ago I forgot some of the details, I think I said 4 months without an oven instead of two.. but after 6 months can you blame me for not remembering perfectly.. and I was on the bus thinking about other things.. I've gone through therapy to just put this behind me (and resolved to not purchase Whirlpool ever again). </p><p>Anyway, Vic is very nice, he explains that this just got dropped on his desk, and that he has reviewed my file and agreed that someone somewhere dropped the ball. Then he asked "what exactly are you looking for?".</p><p>Admittedly I wasn't prepared for this conversation, or to answer that question, but I think it went well, I said "I'm looking for something to indicate that Whirlpool actually cares enough about its customers to say sorry, I'm looking for something to convince me that I should buy Whirlpool appliances again in the future". Vic said, ok, leave it in my hands for a while and I'll see what I can do. </p><p>So, now we wait again.. I'm expecting something like.. $50 off the purchase of your next whirlpool appliance or something.. But it's an interesting situation, give too little a token, and you risk offending the customer.. give too much and management comes down on you... It's like chess and it's Whirlpool's move. I never was any good at chess. :p</p><p> </p>Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0tag:blogger.com,1999:blog-7140045770342436015.post-7657113425957833032007-01-30T17:18:00.000-08:002013-01-20T12:17:41.678-08:00Chocolate Chip Cookie Tuesday<p><img src="http://www.slicer.ca/photos/img.php?album=%2F2007%2FFood%2FChocolate+Chip+Cookies+-+Jan+30&pic=IMG_3238.JPG&width=384" alt="Mmm cookies" title="Mmm cookies" width="384" height="288" align="right" /></p><p>Have I mentioned that I LOVE my stand mixer yet? :) Here is an attempt at my famous chocolate chip cookies. There's something weird with the flour out here, or maybe it's the altitude difference. I notice it in cakes, I notice it in bread, and I notice it most in these cookies. Back east, these cookies would not rise, at all. They were no higher than the height of a chocolate chip. Out here on the west coast, they rise, every single time. And they don't stay soft and chewy for days like back east.. they go a little harder and crunchy.. eventually turning into a store bought completely crunchy cookie. Anyone with any suggestions.. much appreciated. :) I took a few <a href="/photos/album.php?album=%2F2007%2FFood%2FChocolate+Chip+Cookies+-+Jan+30">pictures</a>. They still taste right.. mmmm sooo good.</p><p> </p><br clear="all" /><p><br/><!--break--><br/></p>Davehttp://www.blogger.com/profile/04391954459839301738noreply@blogger.com0