2013-12-14

Sonos controller prevents standby / sleep / screensaver

Just wanted to let y'all know that Sonos Controller 4.2 on Windows XP prevents the computer from putting on the screensaver / locking your computer / going into standby/hibernate, or turning off your monitor.

This is only so when music is actually playing.  If you hit "pause" on the controller, the computer can do its power-saving tricks.

Workaround: pause the music or set the sleep timer in Sonos Controller.

I don't see a way to change this behavior, let me know if you find one.

2013-07-05

"Error occurred during the SSL handshake: invalid SSL session" - Troubleshooting Perforce plugin error

The Perforce plugin for Eclipse may give the error "Error occurred during the SSL handshake: invalid SSL session" when you try to edit a file.

Some JVM distributions that are shipped internationally come with limited cryptography capabilities for national security purposes.  The 256 bit cryptography that Perforce uses may not be in the JVM that your Eclipse installation is running on.  Therefore you need to install the Java Cryptography Extension (JCE) for the Perforce plugin to work.
  1. Determine which eclipse.ini file you should use (from joomla.org):
    1. If you downloaded Eclipse IDE manually from internet the "eclipse.ini" file is just inside the unpacked folder
      1. Open Eclipse as you normally do.
      2. Click Help -> About Eclipse SDK
      3. Click Installation Details
      4. Go to the Configuration tab
      5. Find "eclipse.home.location=file:<PATH>".  <PATH> is where eclipse is installed.
    2. If you installed Eclipse via terminal or software center the location of the file is "/etc/eclipse.ini"
    3. In some Linux versions the file can be found at "/usr/share/eclipse/eclipse.ini". Do not use this file if you found a config file at "/etc/eclipse.ini".
  2. Determine the current version of the JVM that eclipse will use to run the Perforce plugin, not to be confused with $JAVA_HOME and Window/Preferences/Java/Installed JREs.
    1. Open the eclipse.ini file directly inside Eclipse's installation folder.
    2. Check for -vm and below, see the path to the Java VM installation on which Eclipse is running and determine the version from the path.
      1. If there is no -vm line, eclipse is running on the default version of Java for your machine.
      2. Open a terminal window and type "export"
      3. Look for JAVA_HOME = ... in the output, and determine the version the version from the path.
  3. If you are running Java version 6, update to the latest version of Java.
    1. Download Java 7 or later, and extract.
    2. Make sure you update eclipse.ini if the -vm is specified there.
    3. Also update the JAVA_HOME environment variable if found in output of "export" command.  Look in ~/.profile and ~/.bash_rc files.  Prefer to specify it in ~/.profile file.
    4. Alternatively, install JCE for Java 6 (google it).
  4. Now that you have Java 7, download and install JCE for Java 7.
    1. View the README to determine where to put the files.

2013-05-29

gcc sparc v8 relocation error: value does not fit

in our case, we got this error when we tried to do:
load [label], register.

you have to set the label into a register, then do
load [register], register

or
load [register + offset], register

such as
load [%fp - 4], %l0

basically, just make sure your instructions are formatted properly!

2013-03-02

modelsim: Cannot open `include file "Constants.v".

was trying to use ModelSim to test my Quartus project, but was getting this error when i did "compile" -> "compile..." from ModelSim's menu.

vlog -reportprogress 300 -work work C:/lab4/ALU.v
# Model Technology ModelSim ALTERA vlog 10.1b Compiler 2012.04 Apr 27 2012
# -- Compiling module ALU

# ** Error: C:/lab4/IDEX_regs.v(56): Cannot open `include file "Constants.v".
# ** Error: C:/lab4/ALU.v(77): (vlog-2730) Undefined variable: 'constant 1'.
# ** Error: C:/lab4/ALU.v(77): (vlog-2730) Undefined variable: 'constant 2'.

verilog lets you use header files to share constants between modules.  the problem was that modelsim couldn't find where my header file / constants file was.   my constants file was in my lab4 folder with the rest of my project's files.  it was probably looking in the lab4/simulation/modelsim folder, which was the current modelsim folder.  how to help modelsim find your header files:
  • in ModelSim, click "Compile" -> "Compile Options..."
  • click on "Verilog & SystemVerilog" tab
  • click "Include Directory..."
  • move up a couple directories to get to your main project folder, or whatever folder your header files are in.
  • click OK, OK
that should've been good enough, but it wasn't in my case.  i got this message:

# Modified C:\Program Files (x86)\altera\modelsim12.1\modelsim_ase\win32aloem/modelsim.ini

but then when i clicked Compile -> Compile Options again,  i saw that my changes were lost.

so, i used notepad to open the file: C:\Program Files (x86)\altera\modelsim12.1\modelsim_ase\win32aloem/modelsim.ini

one of the lines of the file said this:

OptionFile = C:/lab2/simulation/modelsim/vlog.opt

that's lab2!  it seems modelsim was permanently configured to pull options from one of my old projects.  so i changed it to say lab4 and saved.

at this point, you should be able to save changes made in Compiler Options (Compile -> Compile Options).

i used notepad to open the settings file in my lab4 folder:  C:/lab4/simulation/modelsim/vlog.opt

the contents should simply be:
+incdir+C:/lab4

hope this helped you!

2013-01-26

linux mint, mate, panels: change desktop folder location

if you don't want mate to use the $HOME/Desktop folder as the folder it actually shows on your desktop, you can change which location it uses.

i couldn't find anything by searching for this until i remembered that mate is a successor of gnome2.  so, i looked up how to do it for gnome2 and it seems to be kind of the same:

here's how to do it with gnome:
http://www.howtogeek.com/howto/17752/use-any-folder-for-your-ubuntu-desktop-even-a-dropbox-folder/

so, just go to your home folder, click "view"->"show hidden files", then click on the ".config" folder and then open "user-dirs.dirs" and change everything there.

alternatively (thanks anonymous),
  1. gedit ~/.config/user-dirs.dirs
  2. change the value of XDG_DESKTOP_DIR="/insert/path/here" and save it
  3. killall nautilus

2013-01-23

solution: ubuntu/mint linux doesn't shut down, cpu stuck

i have linux mint installed on my dell studio 1569 laptop.  linux mint would never shut down on its own.  i go to shut off and it just pukes all over the screen.

Linux Mint 13 Maya ajtNbMint tty1
ajtNbMint login: modem manager[2701]: <info> Caught signal 15, shutting down...

rpcbind: rpcbind terminating on signal.  Restart with "rpcbind -w"
nm-dispatcher.action: Caught signal 15, shutting down...
[  766.704047] BUG: soft lockup - CPU#3 stuck for 23s! [reboot:9642]
[  766.704341] Stack:
[  766.704304] Call Trace:
[  766.704410]  <IRQ>
[  766.704404]  <EOI>
...

----------
important edit 2014-06-09:

if you are running ubuntu 12.04, i recommend updating to ubuntu 14.04.  this has fixed many hardware related issues for me.

-----------
important edit 2013-11-11:

i don't think the below solution actually does anything, despite people say it working.  this is because the bug only happens when you shut down the computer after it has been on for a while, but when you test a new boot parameter, you restart so it can take effect and then shut down immediately after restarting to test it.  because you shut down right after starting up, it seems to have worked, and then post "thank you" and realize later that day that it didn't work.

this bug has already been reported to linux and is already fixed in the "mainline kernel" which means that it just hasn't been rolled out to normal users yet because it's not completely tested.  here is the bug report where the reporter says the bug has been fixed upstream:  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/254326

no need to wait -- you can begin using the mainline kernel now.  all i did was install an image*.deb file and now when i boot up, i can choose "ubuntu with advanced options" and boot using the updated kernel.
https://wiki.ubuntu.com/Kernel/MainlineBuilds?action=show&redirect=KernelMainlineBuilds

after using the new kernel, my computer turns off normally even after several hours of use, and it also doesn't crash every 2 hours or after resuming from sleep anymore.

below are the old suggestions, which i believe DO NOT work!
let me know what actually works for you in the comments.  remember, to test if your change worked, you should use your computer for a couple hours before shutting down.

-----------


for some people, adding the kernel boot parameters "noapic" fixes the problem:
  • http://muffinresearch.co.uk/archives/2008/08/20/ubuntu-bug-soft-lockup-cpu0-stuck-for-11s/
  • https://bugs.launchpad.net/ubuntu/+source/linux/+bug/206316

once i did this, my computer still didn't shut down, but it gave me this helpful message:  "irq 19: nobody cared (try booting with the "irqpoll" option)".  so i also added the "irqpoll" kernel boot parameter, and ever since it has shut down beautifully.  this has to do with intel and linux not playing well together.

if you are using grub2, simply run 
gksudo gedit /etc/default/grub


and add "noapic" to the line starting with "GRUB_CMDLINE_LINUX_DEFAULT":

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash blah blah blah noapic irqpoll"