I've been using a pair of Samsung 245T monitors since 2008 (13 years!) and I really quite like them, something about the 16:10 aspect ratio that just feels right. They were very expensive monitors at the time, but they have really lasted quite well since I use them pretty much every day. Recently I had an issue where one of them would not power on very reliably. This started happening a few months ago, and my solution at the time was to plug it into a UPS so that it would not ever power down which worked for a few months. Plugging it in and powering it on with the power button on the front would just not respond. Eventually if you left it for a while and got lucky, as you hit the button it would power up and work just fine until loosing mains power again. It would go to sleep just fine and wake up from that, but if it lost power it would not power back on reliably. Anyways, this finally happened where it got powered off and I just couldn't turn it back on again. I took a little time and disassembled it and tried a few things. I gave it the heat treatment hopeing to reflow the boards to maybe fix the issue but no luck there. I didn't see any visible issue on the power supply board, but decided to try replacing a few caps to see. Initially I replaced the larger caps on the DC power supply side but that also didn't help. After a bit reading into power supply design, I came to the conclusion it might be the small standby power supply that is used to sort of bootstrap the power supply. So I replaced the caps around the little IC that handles this and controls the switching for the main AC to DC conversion. This seemed to work. In the end I replaced the 6 capacitors from the board highlighted below. These wre 50V 22uf and 50V 2.2uf caps, which I swapped out with some slightly larger caps that I had in and around those ratings. The monitor power powers up perfectly now and is back up and going.
posted at: 22:41 | path: /electronics | permanent link to this entry
I have a western digital 2.0TB Black hard drive that was returning a SMART error of "9 Currently unreadable (pending) sectors". This probably means the drive is on it's way out, but it was passing long smart tests ok, and it's in a raid so I've decided to try and fix it. I've read that writing to the drive can force the hard drive to reallocate those sectors, so I gave it a try with the dd command:
dd if=/dev/zero of=/dev/sdc
Before and after smart data:
# before 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 9 # after 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
And then I've partitioned the drive and have been using it without issues now for a few weeks. Time will tell if this ends up working I suppose.
posted at: 09:22 | path: /computers | permanent link to this entry
Had an issue connecting to a wifi network on debian stretch. I would connect and then get then get the error:
wlp4s0: deauthenticating from b6:fb:e4:14:aa:f8 by local choice (Reason: 3=DEAUTH_LEAVING)
This would happen after a successful authentication where it would then timeout after 45 seconds trying to get an IP address.
I'm not entirely sure what this issue is, or why it's happening, but it was fixed after finding the following blog post:
https://lists.debian.org/debian-user/2017/06/msg01045.html
Which instructed me to do the following:
sudo ln -s /dev/null /etc/systemd/network/99-default.link
A reboot later and it works as expected...
posted at: 19:58 | path: /debian | permanent link to this entry
I ran into some problems updating image magick on older centos6 systems. Specifically ImageMagick-6.9.10-50 which would error during the make compile with:
magick/.libs/libMagickCore-6.Q16.so: undefined reference to `clock_gettime' collect2: ld returned 1 exit status make[1]: *** [utilities/animate] Error 1 make[1]: Leaving directory `/usr/src/ImageMagick-6.9.10-50' make: *** [all] Error 2
This can be fixed by adding compile time flags:
LDFLAGS=" -lrt " ./configure LDFLAGS=" -lrt " make
posted at: 17:26 | path: /linux | permanent link to this entry
So this has been bothering me for a while now where I would sometimes get notifications on my desktop from reddit r/archlinux posts. I finally took some time to track down where they are coming from, and it looks like it's push notifications from firefox. I guess these come in even if you don't have those pages loaded in your browser, which is kind of confusing.
Anyways, this blog post explains how to turn them off, and there is an option to not allow them ever which is also handy (remove all websites and block new requests): https://blog.mozilla.org/firefox/no-notifications/
posted at: 12:56 | path: /linux | permanent link to this entry
Debian packages the firefox-esr release which works quite well most of the time, but I find often the newest browser is often required for some functionality. I've put together a little script that basically sets this up with a local firefox install in ~/.opt
You can copy/paste this into a terminal and it will download the latest firefox, extract it to ~/.opt/firefox and setup a desktop file so that it will appear in the desktop menu
mkdir -p ~/.opt cd ~/.opt FFCHANNEL=latest LIBDIRSUFFIX="64" VER=${VER:-$(wget --spider -S --max-redirect 0 "https://download.mozilla.org/?product=firefox-${FFCHANNEL}&os=linux${LIBDIRSUFFIX}&lang=${FFLANG}" 2>&1 | sed -n '/Location: /{s|.*/firefox-\(.*\)\.tar.*|\1|p;q;}')} echo $VER wget https://ftp.mozilla.org/pub/firefox/releases/${VER}/linux-x86_64/en-US/firefox-${VER}.tar.bz2 -P /tmp tar jxvf /tmp/firefox-${VER}.tar.bz2 mkdir -p ~/.local/share/applications BASEDIR=`pwd` cat <<EOF >> ~/.local/share/applications/firefox-stable.desktop [Desktop Entry] Name=Firefox Comment=Web Browser Exec=${BASEDIR}/firefox/firefox %u Terminal=false Type=Application Icon=${BASEDIR}/firefox/browser/chrome/icons/default/default128.png Categories=Network;WebBrowser; StartupWMClass=Firefox StartupNotify=true EOF sudo ln -sf ${BASEDIR}/firefox/firefox /usr/local/bin/firefox
More information in the debian wiki: https://wiki.debian.org/Firefox
posted at: 19:34 | path: /debian | permanent link to this entry
I ran into an issue recently trying to install a application menu link on a debian system (desktop was mate in this case, but I think it applies to any gnome based desktop). The issue was that I would install a new .directory file for a new menu entry along with the .desktop file, and when I did, the application would show up under "Other" and not under the menu category I was trying to add.
The processes being:
- create your menu entry in a file named company-company.directory
- create your application entry in a file name company-appname.desktop
- install with the command xdg-desktop-menu install company-company.directory company-appname.desktop
Running this as the local user, correctly installs the files in ~/.local/share/, but it does not write a menu file. And so the application will show up under Applications->Other
If you run the command as root, it will install system wide, and creates the menu for you under /etc/xdg/menus/applications-merged/company-company.menu
But if you don't want this installed system wide, it seems like the only way to fix this is to setup the .menu file manually? I feel like I'm doing this wrong, and there is a way to specify the menu in a user folder, but at the time I can't seem to figure this out.
To fix the issue I created the /etc/xdg/menus/applications-merged/company-company.menu file manually like this:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd"> <Menu> <Name>Applications</Name> <Menu> <Name>company-company</Name> <Directory>company-company.directory</Directory> <Include> <Category>Company</Category> </Include> </Menu> </Menu>
This added the menu entry, and the locally installed applications now show up in the correct location.
posted at: 23:43 | path: /linux | permanent link to this entry
I couldn't seem to find this information anywhere, and I just spend longer than I'd like to admit sorting this issue out. I use the Logitech Media Server (v7.9.1 as of now) and I just reinstalled it on my server. After doing that the "Server IP Address" was getting picked up as my public ip address on my gateway server, and not the local network address of 192.168.0.1. This was causing the settings interface to be inaccessible on the local network with an error in the server.log file of Access to settings pages is restricted to the local network or localhost.
Fixing this was as simple as editing the /etc/default/logitechmediaserver file and setting the following line:
SLIMOPTIONS="--playeraddr 192.168.0.1"
Not the httpaddr or cliaddr options which is what I was setting, because I didn't read the help page closely enough.
posted at: 23:49 | path: /debian | permanent link to this entry
We had about 70% coverage of the sun where we were which actually seems to be about 70% less production on the graph (which is what you'd expect, but neat either way).
posted at: 10:25 | path: /energy | permanent link to this entry
Simple script to get the current exchange rates from the bank of canada:
import requests r = requests.get('http://www.bankofcanada.ca/valet/observations/group/FX_RATES_DAILY/json') rates = r.json() date = rates['observations'][-1]['d'] rate = rates['observations'][-1]['FXUSDCAD']['v']
posted at: 12:23 | path: /python | permanent link to this entry