I've been working with some folks on trying to get a snap package up and running for RetroArch to go with our FlatPak and AppImage universal linux packages, and it's turned out to be more complicated than I expected to navigate the particulars of the packaging format combined with the restrictions of the security sandboxing.
We announced the package a couple of weeks ago but quickly got reports that users couldn't load files, they were confused as to why the package took a long time to load (only on the first launch, but they didn't know that), and more. Since updating my laptop to Ubuntu 17.10, I decided to "dogfood" the snap package, since that would be the only way I could get in front of the reports and ensure a good experience.
Since RetroArch requires a lot of stuff to look nice and function properly, we use a wrapper script that checks for the existence of that stuff and, if it's not where we expect it, it copies the stuff into the snap's user directory. Since that copying can take a long time, I decided to use notify-send to include some admittedly uninformative notices just to let the user know that nothing is frozen/broken and that we're just copying stuff in the background. The catch here is that you can't use the system's notify-send, you have to include it in the snap as a runtime dependency, under the "stage-packages" in the snapcraft.yaml recipe, like this. I tried adding an icon to make the notifications prettier and more obviously RetroArch-related, but I could never get it to actually see the icon, no matter where I stored it, so I gave up on that.
Ok, so the notifications were a nice little improvement, but we still couldn't actually get to any files to launch them, which makes the program pretty useless. For that, we needed to add the "home" plug to the recipe, like this. This plug is supposed to be auto-connected, so you shouldn't need to do anything to make it accessible to your application once it's in the recipe. However, RetroArch's non-native file-browsing meant that it tried to start in /, which is inaccessible (and in fact, totally invisible) to the snap (and if your snap starts you in an inaccessible directory, you can't ever get out of it), so I added a line to my wrapper that pre-populates the user's retroarch.cfg config file with a line telling it to start in the home directory, where we should have access. I tried using $HOME and ~/, both of which just sent me to the snap's home directory instead of the true home directory with all the files -_-. The solution I found--which is pretty crummy but whatever--is to use a relative path that points to one level above the snap package. That is, ~/../../../
Similarly, I couldn't reach my network shares, which I mount in /media (despite adding any plug that seemed even vaguely related to such a thing to the recipe), so I had to move my mount points into my true home directory and use those same relative paths to everything, e.g. ~/../../../smbshare/Emulation/BIOS for my 'system' directory. Once the mount point is in my true home directory, I could probably put symlinks into the snap package, as well, to avoid the silly relative paths.
The last major issue I ran into was that the *.desktop launcher that shows up when you search for programs in the sidebar kept complaining about not having an "exec" line and then failing to launch because of it. This one was super-confusing because our snap has a *.desktop file (it lives in $SNAP/meta/gui), and that file definitely has an exec line. It turns out that, during installation, snapd generates the *.desktop file that the OS actually looks for and stores it in /var/lib/snapd/desktop/applications. This file is based on the *.desktop included with your program, but if the exec line isn't just like it expects, it will strip it out entirely and not give you any indication of why. Initially, our *.desktop file pointed the exec line to the retroarch.wrapper script that does so much work for us, but snapd didn't like this and rejected it until we switched it to just "Exec=retroarch", which isn't the name of the actual executable but rather the name of the snap itself. It still launched the wrapper script, since that's what our recipe points to, so we're all set.
Since we need to use our script when we launch from a command line, as well, we made sure to end it with $*, but this has a couple of problems that experienced scriptors will spot immediately. First, it's not escaped, so any spaces in file names will break it. Second, it will only accept a single argument, which isn't going to work for us. So, I changed it to "$@" and all is well.
Now, the only issues left that I know of are: 1.) the wrapper script has our nice invader icon, which shows in the sidebar while the script is running, but once it dies off, the icon goes with it and the actual program just has an ugly question-mark/no-icon-found icon in the sidebar and 2.) the snap can't load any dynamic libraries that live outside of its domain, so I can't conveniently compile a test core and then launch from command line to test it with the -L switch. #1 isn't a big deal and #2 probably isn't possible to fix, so it is what it is.
Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts
Wednesday, October 25, 2017
Saturday, October 21, 2017
Running Graphical Programs as Root in Wayland
Fix for Invalid MIT-MAGIC-COOKIE-1 keyCannot open display error when trying to use sudo.
I just updated to Ubuntu 17.04 (and it's a great release; I was on 16.04 LTS before and it's well-worth the update) and noticed that I kept getting the above error when I tried to elevate my privs to edit system files with a graphical text editor (typically gedit, but I've switched to pluma). That's a result of improved security measures in Wayland that we didn't have to worry about with the now-abandoned Unity desktop used in previous releases.
Most of the solutions floating around for this error refer to X sessions (usually X-forwarding over SSH) and don't actually do anything to correct the Wayland issue. However, I came across this solution, which worked a treat:
Step 1.) Create a new local directory to house a custom executable:
Step 6.) Permanently add our local script directory to our Path:
I just updated to Ubuntu 17.04 (and it's a great release; I was on 16.04 LTS before and it's well-worth the update) and noticed that I kept getting the above error when I tried to elevate my privs to edit system files with a graphical text editor (typically gedit, but I've switched to pluma). That's a result of improved security measures in Wayland that we didn't have to worry about with the now-abandoned Unity desktop used in previous releases.
Most of the solutions floating around for this error refer to X sessions (usually X-forwarding over SSH) and don't actually do anything to correct the Wayland issue. However, I came across this solution, which worked a treat:
Step 1.) Create a new local directory to house a custom executable:
mkdir ~/.local/bin/Step 2.) Next, we'll make a little script that will elevate the privileges for us when invoked (the OP called it 'wsudo', which seems like a good choice to me):
nano ~/.local/bin/wsudoStep 3.) Paste in these contents:
#!/bin/bashStep 4.) Make the script executable:
#small script to enable root access to x-windows systems
xhost +SI:localuser:root
sudo $1
#disable root access after application terminates
xhost -SI:localuser:root
#print access status to allow verification that root access was removed
xhost
chmod +x ~/.local/bin/wsudoStep 5.) Temporarily add our local script directory to our Path for easy access:
export PATH=$PATH:~/.local/binNow, you can take it for a spin and make sure it works as expected (by running, for example, wsudo gedit /testfile and making sure it saves okay). If everything is in order...
Step 6.) Permanently add our local script directory to our Path:
echo "export PATH=$PATH:~/.local/bin" >> ~/.bashrcThat's it. Now you should be able to invoke wsudo any time you need to run a GUI program with elevated privs.
Friday, May 9, 2014
Using X-Rite i1 Display Pro with Ubuntu Trusty 14.04
As mentioned in a previous post, I borrowed an X-Rite i1 Display Pro color calibration device from my job recently and have been calibrating every display I can get my hands on :P
This proved to be a bit of an issue on my various Ubuntu-powered machines, though, as the packages for dispcalGUI that are in the Trusty repos don't support the device yet! I discovered this when the program repeatedly failed with:
With the new package, you should be able to use your device without any problems.
This proved to be a bit of an issue on my various Ubuntu-powered machines, though, as the packages for dispcalGUI that are in the Trusty repos don't support the device yet! I discovered this when the program repeatedly failed with:
new_disprd() failed with 'Instrument Access Failed'When trying to figure out what was going wrong, I opened up a terminal and ran the 'dispcal' program directly (that is, without the GUI) with the -D5 debugging switch, which gave a little more information:
init_inst returned 'Hardware Failure' (External EEPRrom checksum doesn't match)Evidently, the EEPRrom checksums can't be trusted and the newer version knows to ignore them, so go download the new version from the dispcalGUI website (I recommend scrolling down to the 'conventional installation' section, which has debs instead of fooling around with the default 'zero installation' business they point you toward).
new_disprd failed because init_inst failed
dispcal: Error - new_disprd() failed with 'Instrument Access Failed'
With the new package, you should be able to use your device without any problems.
Labels:
color profile,
dispcalGUI,
trusty,
ubuntu,
X-Rite i1 Display Pro
Saturday, June 29, 2013
Fix for Youtube error: 'This video is currently unavailable' - Ubuntu Chromium
Thankfully, this one's an easy fix and will presumably apply to other browsers and operating systems, as well.
I've been using Chromium as my browser for a while and everything has been great until recently, when some youtube videos wouldn't play reliably and instead would show the error:
I had forgotten I was even using HTML5 video, so I never even considered this could be the problem. Once I unenrolled, everything works fine again. Of course, YMMV.
I've been using Chromium as my browser for a while and everything has been great until recently, when some youtube videos wouldn't play reliably and instead would show the error:
This is apparently caused by being enrolled in Youtube's HTML5 video trial. You can enroll/unenroll from the program by visiting this link.This video is currently unavailable.Learn more
I had forgotten I was even using HTML5 video, so I never even considered this could be the problem. Once I unenrolled, everything works fine again. Of course, YMMV.
Monday, March 11, 2013
XRandR Overscan Fix for Intel HD4000 Ubuntu
I have my television hooked up to a computer running Ubuntu 12.10 Quantal and have had issues with overscan across a variety of chipsets. For Nvidia graphics, the proprietary driver sometimes has an overscan compensation slider or at least something. Intel drivers are open source and very convenient but don't seem to have much in the way of driver configuration outside of what's exposed in the normal settings applications.
If you have an Intel chipset, such as the built-in HD4000 graphics that come with Ivy Bridge CPUs, there are a few angles you can try that center around using xrandr, which stands for 'X Resize, Rotate and Reflection.' This program has a bunch of different options, and I strongly recommend spending some time with the man page. No matter which options you try first, you'll need to query the program and see which display device is being used. You can do this by typing into a terminal:
xrandr -q
For me, HDMI3 is the one that's hooked up, so it lists all of the available modelines and some other information.
Now that we know which device is being used, we can invoke xrandr with this syntax:
xrandr --output [device] --[option]
The option that worked for me is --transform, which performs some crazy matrix math that I don't understand (I'll update this post if someone tells me wtf is going on) on each pixel, apparently kinda like the pixel shader stuff I've written about elsewhere, I think...? Anyway (replace HDMI3 with whatever your device is called):
xrandr --output HDMI3 --transform 1.05,0,-35,0,1.05,-19,0,0,1
This doesn't make it fit exactly on my screen but it's much closer than it was. Unfortunately, it gets wiped out every time you logout, so we need to do something to make it stick. You can add it to your startup items or tack it onto your lightdm window manager's configuration file by typing into a terminal:
sudo nano /etc/lightdm/lightdm.conf
Navigate to the end of the file and start a new line and paste this in:
display-setup-script=xrandr --output HDMI3 --transform 1.05,0,-35,0,1.05,-19,0,0,1
Save and exit and the transform command should kick in every time you login.
Other options that may help:
The 'scale' option should ideally just scale your screen down, but in my experience, it makes everything (text, window borders , etc) bigger, similar to changing the DPI in Windows, without actually changing the visible area.
The 'border' option also seems like it should do exactly what we want, but I haven't seen it actually work anywhere. On my system, it fails with this error:
X Error of failed request: BadName (named color or font does not exist)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 11 (RRQueryOutputProperty)
Serial number of failed request: 29
Current serial number in output stream: 29
which seems to be a catch-all for unrecognized commands :/
Generally, I would recommend skipping all of this and attempting to fix it through your TV's built-in options (generally called "just scan" mode or "pixel perfect" or something like that). The only time you should attempt to do it in software is when your TV is too crummy (like mine) and doesn't have any of those options.
UPDATE (5/20/2014): A helpful anonymous commentor explains the transform matrix thusly:
If you have an Intel chipset, such as the built-in HD4000 graphics that come with Ivy Bridge CPUs, there are a few angles you can try that center around using xrandr, which stands for 'X Resize, Rotate and Reflection.' This program has a bunch of different options, and I strongly recommend spending some time with the man page. No matter which options you try first, you'll need to query the program and see which display device is being used. You can do this by typing into a terminal:
xrandr -q
For me, HDMI3 is the one that's hooked up, so it lists all of the available modelines and some other information.
Now that we know which device is being used, we can invoke xrandr with this syntax:
xrandr --output [device] --[option]
The option that worked for me is --transform, which performs some crazy matrix math that I don't understand (I'll update this post if someone tells me wtf is going on) on each pixel, apparently kinda like the pixel shader stuff I've written about elsewhere, I think...? Anyway (replace HDMI3 with whatever your device is called):
xrandr --output HDMI3 --transform 1.05,0,-35,0,1.05,-19,0,0,1
This doesn't make it fit exactly on my screen but it's much closer than it was. Unfortunately, it gets wiped out every time you logout, so we need to do something to make it stick. You can add it to your startup items or tack it onto your lightdm window manager's configuration file by typing into a terminal:
sudo nano /etc/lightdm/lightdm.conf
Navigate to the end of the file and start a new line and paste this in:
display-setup-script=xrandr --output HDMI3 --transform 1.05,0,-35,0,1.05,-19,0,0,1
Save and exit and the transform command should kick in every time you login.
Other options that may help:
The 'scale' option should ideally just scale your screen down, but in my experience, it makes everything (text, window borders , etc) bigger, similar to changing the DPI in Windows, without actually changing the visible area.
The 'border' option also seems like it should do exactly what we want, but I haven't seen it actually work anywhere. On my system, it fails with this error:
X Error of failed request: BadName (named color or font does not exist)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 11 (RRQueryOutputProperty)
Serial number of failed request: 29
Current serial number in output stream: 29
which seems to be a catch-all for unrecognized commands :/
Generally, I would recommend skipping all of this and attempting to fix it through your TV's built-in options (generally called "just scan" mode or "pixel perfect" or something like that). The only time you should attempt to do it in software is when your TV is too crummy (like mine) and doesn't have any of those options.
UPDATE (5/20/2014): A helpful anonymous commentor explains the transform matrix thusly:
The transformation matrix seems pretty straightforward to me:
It's just an affine 2D transform. Think of 1.05,0,-35,0,1.05,-19,0,0,1 as the following matrix:
|1.05 0 -35|
|0 1.05 -19|
|0 0 0 |
The upper two diagonal coefficients are scaling factors, i.e. in this case, the picture would be expanded by 5% horizontally and vertically. The last column is a translation vector, in this case causing the picture to be transformed by 35 pixels to the left and 19 pixels upwards (or downwards, depending on the coordinate system).
The last row needs to be (0, 0, 1), or combining two affine transforms will not work correctly. They are not relevant for the actual transformation.
Monday, February 18, 2013
xsession-errors Log Filling Hard Drive Ubuntu
Last night, all of a sudden, I started getting poor performance out of my HTPC running Ubuntu 12.10 Quantal Quetzal, followed by a complaint that my /home partition was running low on space and only had ~350 MB of free space. A minute or so later, I got another warning that only ~35 MB were free! :O
I clicked the hard drive disk usage analyzation utility to figure out what was up, but it showed my largest directory as weighing-in at just ~29 GB.
Turns out the culprit was a gigantic, hidden file called .xsession-errors, which had ballooned to 170 GB over the course of a couple of hours, apparently. You can check if this is your problem by typing this into a terminal:
ls -a -s | grep xsession
This file is archived at every reboot, with the previous version renamed to .xsession-errors.old and a new log created in its place. If this file is the source of your troubles, you'll want to see what's been spamming your system with errors, but, obviously, such a huge file isn't going to open gracefully in a text editor. However, we can use the 'tail' command to check out the last few lines, like this:
tail -10 .xession-errors
That should give you an idea of what's causing your problems. Once you've had a good look, go ahead and delete the file and then reboot your system to free up the space:
rm .xession-errors* ; sudo reboot now
As soon as your system comes back up, look for the error log again using the first command (and then a third time to see if the size changed in between commands) and then open it in a text editor to see what's up:
gedit .xsession-errors
Scroll down to the bottom and see if you spot any errors repeating. In my case, there was a constant stream of errors from zeitgeist-daemon not being able to find file:///whatever/file.path. Zeitgeist is a program that keeps track of pretty much everything you do on your machine and uses that data to populate 'recent files' lists and so on. It also adds overhead to your system and occasionally shits the bed by making giant error logs ;)
If you don't mind getting rid of the Unity desktop, you can just flat-out remove it and its associated packages like this:
sudo dpkg -r zeitgeist*
However, if this is too invasive for you, you can use the following command to remove the read and write attributes from the zeitgeist-daemon database:
chmod -rw ~/.local/share/zeitgeist/activity.sqlite
You can test the effect out by typing:
zeitgeist-daemon --replace
It should error out with a complaint about not being able to access the database, which is exactly what we want. This essentially cripples the daemon without risking breaking any other packages, present or future.
Go about your normal tasks and make sure everything still works like it should (anything that used zeitgeist will obviously be broken, but I mean everything that you normally depend on). If all is well, you're finished. Pat yourself on the back.
UPDATE: The problem popped up again, even with zeitgeist removed, so I tailed the error log again and saw this line repeated over and over:
Authentication deferred - ignoring client message
This error appears to be a result of the vino server (Ubuntu's built-in VNC server) getting hammered with bruce-force login attempts. It appears that the server allows a few bad attempts and then ignores the rest, which is good. The attempts still get logged, though, so I thought it best just to remove vino altogether, since I never use it anyway:
sudo apt-get remove vino
I clicked the hard drive disk usage analyzation utility to figure out what was up, but it showed my largest directory as weighing-in at just ~29 GB.
Turns out the culprit was a gigantic, hidden file called .xsession-errors, which had ballooned to 170 GB over the course of a couple of hours, apparently. You can check if this is your problem by typing this into a terminal:
ls -a -s | grep xsession
This file is archived at every reboot, with the previous version renamed to .xsession-errors.old and a new log created in its place. If this file is the source of your troubles, you'll want to see what's been spamming your system with errors, but, obviously, such a huge file isn't going to open gracefully in a text editor. However, we can use the 'tail' command to check out the last few lines, like this:
tail -10 .xession-errors
That should give you an idea of what's causing your problems. Once you've had a good look, go ahead and delete the file and then reboot your system to free up the space:
rm .xession-errors* ; sudo reboot now
As soon as your system comes back up, look for the error log again using the first command (and then a third time to see if the size changed in between commands) and then open it in a text editor to see what's up:
gedit .xsession-errors
Scroll down to the bottom and see if you spot any errors repeating. In my case, there was a constant stream of errors from zeitgeist-daemon not being able to find file:///whatever/file.path. Zeitgeist is a program that keeps track of pretty much everything you do on your machine and uses that data to populate 'recent files' lists and so on. It also adds overhead to your system and occasionally shits the bed by making giant error logs ;)
If you don't mind getting rid of the Unity desktop, you can just flat-out remove it and its associated packages like this:
sudo dpkg -r zeitgeist*
However, if this is too invasive for you, you can use the following command to remove the read and write attributes from the zeitgeist-daemon database:
chmod -rw ~/.local/share/zeitgeist/activity.sqlite
You can test the effect out by typing:
zeitgeist-daemon --replace
It should error out with a complaint about not being able to access the database, which is exactly what we want. This essentially cripples the daemon without risking breaking any other packages, present or future.
Go about your normal tasks and make sure everything still works like it should (anything that used zeitgeist will obviously be broken, but I mean everything that you normally depend on). If all is well, you're finished. Pat yourself on the back.
UPDATE: The problem popped up again, even with zeitgeist removed, so I tailed the error log again and saw this line repeated over and over:
Authentication deferred - ignoring client message
This error appears to be a result of the vino server (Ubuntu's built-in VNC server) getting hammered with bruce-force login attempts. It appears that the server allows a few bad attempts and then ignores the rest, which is good. The attempts still get logged, though, so I thought it best just to remove vino altogether, since I never use it anyway:
sudo apt-get remove vino
Monday, December 31, 2012
Fix for TV Overscan in Ubuntu with Nvidia Drivers
Ok, this problem has been a consistent thorn in my side for as long as I've been running Ubuntu on my TV (a number of years). On a lot of HDTVs, setting your computer to display 1080p or 720p or whatever will often cut off the edges of the screen. This cutoff is known as overscan and it used to be necessary because all sorts of garbage data would be displayed in the edges of broadcast signals and video games. Nowadays, that doesn't happen and we want to see every bit of the picture but many TVs still do it.
The easiest fix on TVs of any reasonable quality is to set the TV to "just scan" or "pixel perfect" mode (it goes by many different names depending on manufacturer). However, if your TV is cheap/crappy, you won't have such an option and the only way to deal with it is via software. This works just dandy in Windows, where the Nvidia driver has a handy little "overscan compensation" option where you can adjust a slider until your entire desktop is visible.
Sometimes, depending on driver revision and apparently some other unknown (to me) factors, a similar slider is available in the nvidia-settings applications in Ubuntu. This is undependable, though, and it will sometimes be grayed out or even disappear after you've used it in the past! :O
If you run into any of this, the way to fix it is to add a line to your /etc/X11/xorg.conf files that invokes the ViewPortIn/ViewPortOut options in the driver. So, open a terminal and type:
Next, add a new line under the "NoLogo" line that looks like this (all one line, btw):
You'll also notice that my line uses DFP-1 instead of DFP-0. I'm not sure why that is, but that's what it identifies as in my nvidia-settings application, so be sure to check there first to find out what yours should be labeled as.
Log out and back in and it should use the new resolution. If not, try rebooting.
The easiest fix on TVs of any reasonable quality is to set the TV to "just scan" or "pixel perfect" mode (it goes by many different names depending on manufacturer). However, if your TV is cheap/crappy, you won't have such an option and the only way to deal with it is via software. This works just dandy in Windows, where the Nvidia driver has a handy little "overscan compensation" option where you can adjust a slider until your entire desktop is visible.
Sometimes, depending on driver revision and apparently some other unknown (to me) factors, a similar slider is available in the nvidia-settings applications in Ubuntu. This is undependable, though, and it will sometimes be grayed out or even disappear after you've used it in the past! :O
If you run into any of this, the way to fix it is to add a line to your /etc/X11/xorg.conf files that invokes the ViewPortIn/ViewPortOut options in the driver. So, open a terminal and type:
sudo nano /etc/X11/xorg.confYou should see:
Section "Device" Identifier "Default Device" Option "NoLogo" "True"EndSectionOr something similar. If you don't see any of that (e.g., if your file is totally empty), then just add it in manually.
Next, add a new line under the "NoLogo" line that looks like this (all one line, btw):
Option "metamodes" "DFP-0: idealxresolution { ViewPortIn=idealxresolution,ViewPortOut=desiredxresolution+excessX+excessY }"So, if, like me, you want it to run in 720p with 24 pixels of horizontal overscan compensation added to left/right sides and 14 pixels of vertical overscan compensation added to top/bottom, your line will look like this:
Option "metamodes" "DFP-1: 1280x720 { ViewPortIn=1280x720,ViewPortOut=1232x692+24+14 }"Now, you'll notice that the buffers I've added to the end are exactly half of the total amount of resolution I'm chopping off. That's because the specified amount is added to both sides.
You'll also notice that my line uses DFP-1 instead of DFP-0. I'm not sure why that is, but that's what it identifies as in my nvidia-settings application, so be sure to check there first to find out what yours should be labeled as.
Log out and back in and it should use the new resolution. If not, try rebooting.
Saturday, September 8, 2012
Ubuntu Quantal Beta - First Impressions on x120e
I just updated to the latest beta release of Ubuntu, codenamed Quantal Quetzel (or, as I call it, Quantum Pretzel), on my Lenovo x120e netbook.
Installation went smoothly and my optional broadcom wireless chipset was detected and enabled automatically during installation. This is the first time that has loaded without any hassle on my part, and I'm very pleased with the result. Users with the default atheros chipset have been enjoying this ease of installation for several releases already.
Installation went smoothly, now that they've squashed a particularly nasty bug in the installer that would crash if you tried to manually modify the partition table...
Once I booted into the actual installed system, it defaulted to use the open source driver for my integrated Radeon Fusion chipset, which provides adequate acceleration for transparency and other desktop composition goodies. Speaking of, the default Unity interface seems to have been improved further beyond the already much-improved Precise release, with the icons in the dock being smaller and less cartoony on my machine, with transparent backgrounds rather than the garish multicolored backgrounds from before (YMMV).
Virtual desktop switching also seems much improved. I never used it before because it felt clunky and laggy, but now transitions are smooth and dragging windows among desktops is effortless and intuitive. However, sometimes the windowing system gets confused and tries to maximize things inappropriately, leaving a transparent orange overlay on the screen--to show where it's trying to maximize--until you click on the window decoration and let it do its thing, then resize.
Suspend works well on this machine, faster than before and with quicker wakeups, and the wireless reconnects faster after suspend, as well. There doesn't seem to be a hibernate option anymore, so I couldn't test that.
One problem I ran into: I previously used my /etc/fstab to mount a shared folder from my network at startup via smbfs, but that package has been removed upstream, so now I use cifs as the filesystem and that seems to work just fine.
If you have any questions or anything you'd like me to test, feel free to hit me up in the comments.
Installation went smoothly and my optional broadcom wireless chipset was detected and enabled automatically during installation. This is the first time that has loaded without any hassle on my part, and I'm very pleased with the result. Users with the default atheros chipset have been enjoying this ease of installation for several releases already.
Installation went smoothly, now that they've squashed a particularly nasty bug in the installer that would crash if you tried to manually modify the partition table...
Once I booted into the actual installed system, it defaulted to use the open source driver for my integrated Radeon Fusion chipset, which provides adequate acceleration for transparency and other desktop composition goodies. Speaking of, the default Unity interface seems to have been improved further beyond the already much-improved Precise release, with the icons in the dock being smaller and less cartoony on my machine, with transparent backgrounds rather than the garish multicolored backgrounds from before (YMMV).
Virtual desktop switching also seems much improved. I never used it before because it felt clunky and laggy, but now transitions are smooth and dragging windows among desktops is effortless and intuitive. However, sometimes the windowing system gets confused and tries to maximize things inappropriately, leaving a transparent orange overlay on the screen--to show where it's trying to maximize--until you click on the window decoration and let it do its thing, then resize.
Suspend works well on this machine, faster than before and with quicker wakeups, and the wireless reconnects faster after suspend, as well. There doesn't seem to be a hibernate option anymore, so I couldn't test that.
One problem I ran into: I previously used my /etc/fstab to mount a shared folder from my network at startup via smbfs, but that package has been removed upstream, so now I use cifs as the filesystem and that seems to work just fine.
If you have any questions or anything you'd like me to test, feel free to hit me up in the comments.
Friday, August 12, 2011
Test Driving Oneiric Ocelot on ThinkPad X120e
It's that time again. With another Ubuntu release looming on the horizon, I decided to upgrade my netbook to the latest daily build (8/12/11) of Ubuntu 11.10 Oneiric Ocelot, which is still in alpha stage.
Installation
Installation was unchanged from 11.04, so much so, in fact, that it even says "Welcome to Natty Narwhal" :P
As with Natty, installation was quick and easy, with the option to download updates in the background as you go. As before, personalization questions were presented *after* installation had already begun, which saves even more time.
First Impressions
The login screen has changed a bit, and now looks really snazzy, with a stylish dot motif in the background. There's an option to select a Guest Account, along with the option to use the new 2D/non-accelerated Unity desktop, which I believe is powered by the Enlightenment libraries. This 2D desktop supports true transparency, which is nice.
Drivers
The jockey-powered "Additional Drivers" utility automatically found the binary driver for my wireless, which is the nonstandard Broadcom chipset option, so all I had to do is tell it to activate it. CORRECTION: My wireless driver was enabled, but not working. On returning to jockey, the driver was listed as not installed and if I tried to enable it, it would give me the error:
SystemError: E:Unable to correct problems, you have held broken packages.
This suggests that my packages were installed, but somehow got messed up. To fix it, I had to find out which packages for my chipset were installed, by typing:
dpkg -l | grep roadcom
(notice, I searched for 'roadcom,' which will catch packages with both 'broadcom' and 'Broadcom' in the title and/or description. This is important, as the bcmwl-kernel-source package will not show up if you search for 'broadcom' alone.) Then remove them entirely by typing
sudo apt-get purge [package names from the previous command]
Reboot, then try the 'Additional Drivers' utility again. It should successfully enable the driver, then you can reboot again and everything should be working properly.
If you got the standard chipset, it should use the open source driver by default. The default video driver is the Gallium-3D-driven open source driver, but I chose to install the proprietary fglrx driver from AMD via the driver utility.
Audio seems fine and my HDMI audio hardware and output were both recognized from the start. The headphone jack also properly mutes the internal speakers when headphones are plugged in, which is an improvement over my experience with Natty.
Waking from suspend seems fine, too, though hibernation still seems to be a no-go. :(
Applications
The default email client is now Thunderbird, which works well with Firefox, the default browser, and the default music client is now banshee (this may not have been a new change; I can't really remember...).
The built-in search tool for Unity is much improved, with little icons down at the bottom of the window for choosing whether to search everything, just files and folders, just applications, or just search your music collection.
Everything seems to be fine so far, a solid improvement over Natty on these machines. I'll post back if I run into any problems. If you have any questions or experience any problems, post a comment!
Thursday, March 24, 2011
Configuring Lenovo TrackPoint Mouse Wheel Emulation Scrolling in Ubuntu
I have a Lenovo X120e and have grown accustomed to using the once-loathed TrackPoint (also known as the nubbin, the navigation nipple, the eraserhead, and others) for scrolling through Web pages, windows, etc. as I would with a mousewheel. Here is how you would do it in Ubuntu (in this case 11.04 Natty Narwhal, but it should apply to anything Maverick or later:
Open up a terminal and type:
Open up a terminal and type:
gpointing-device-settings
UPDATE (8/13/11): The package isn't installed by default in 11.10 Oneiric Ocelot, so you'll have to install it first, either through Synaptic package manager or by typing
sudo apt-get install gpointing-device-settings
Select the TrackPoint device from the pane on the left. Mine is called "TPPS/2 IBM TrackPoint." In the middle of the window, you'll see a checkbox labeled "Use wheel emulation." Check the box, along with the ones labeled "Enable vertical scroll" and "Enable horizontal scroll" as you see fit.
You'll also need to select your scroll button from the pull-down menu. In my case, it was button 2, but YMMV.
While you're here, you can also switch to the TrackPad options and disable your trackpad, if that's what you're into.
Wednesday, March 23, 2011
Ubuntu Natty on Lenovo ThinkPad X120e
If you've read my earlier post regarding Maverick on this machine, you'll know I ran into a few annoying issues.
The biggest problem was that my Broadcom wireless driver kept getting deactivated with every reboot, so I decided to try installing Natty instead.
The first issue I ran into with Natty was that the installer kept crapping out before the partitioning phase with an error about ubi-partman failing to start due to error 141. There are a couple of Launchpad bugs filed for this error, but a claimed fix that was checked in a few days earlier did not seem to help things. What fixed me up, though, was using the alternate install image, which uses an ncurses-based installer rather than the fancy Ubiquity installer.
So, moving on, everything installed fine and, upon booting into the new system, the hardware driver manager detected my wireless card and recommended the proprietary Broadcom SLA driver. Click to enable, reboot and wireless should be fine and dandy.
If you opted for the default Ralink card, it should be detected and supported out-of-the-box, without even needing to consult the driver manager.
By default, the system utilizes the open source "radeon" driver, with 3D support provided by the Gallium3D backend. This should be fine for light 3D duties, such as Compiz, though it does have a show-stopping bug that will cause crashes, loops and reboots under heavy stress, such as 3D games. As long as you don't play any games, though, you should be fine. If you want to play games and/or use video decoding acceleration, you'll have to install the proprietary Catalyst driver, but it is not yet compatible with the X Server included in Natty. This will be resolved before final release in April.
At this point, my system works pretty well, except for an odd dependency hell issue that is preventing Unity from installing/running because of some Compiz virtual package conflict B.S., though I suspect this will be sorted out in a couple of days. UPDATE (3/23/11): fixed now.
I haven't tried suspend/hibernate yet, but will update with results as soon as possible.
UPDATE (3/23/11): waking from suspend seems fine, though my notification stuff isn't updating (wireless is showing that it's disconnected, even though it's not, etc). Hibernate, in contrast, seems totally b0rked. It just sits there blowing its fan and blinking the sleep LED on the front edge until you do a hard poweroff. :(UPDATE (4/1/11): To get multitouch working on your trackpad, install the package gsynaptics (not to be confused with the synaptic package manager):
sudo aptitude install gsynapticsand then type:
gpointing-device-settings
You should be able to enable two-finger scrolling from the trackpad menu. While you're there, you can configure the navigation nub for mousewheel emulation, if that's what you're into.
Everything else I've tested, including audio and webcam, work just fine. Even the function volume keys work.
Things I haven't tested:
HDMI-out
audio over HDMI
VGA-out
Everything else I've tested, including audio and webcam, work just fine. Even the function volume keys work.
Things I haven't tested:
HDMI-out
audio over HDMI
VGA-out
The middle scroll button works too, it just takes a little configuration.
Saturday, January 15, 2011
Setting Up Pbuilder To Act Like Launchpad Build Farm
I build a lot of packages for my Launchpad PPA and I use a number of different systems to do it, so I find myself needing to set up pbuilder environments to test my build procedures pretty often. Unfortunately, documentation for this procedure is often out of date and/or goes into a lot of strange details and edge-cases that are unrelated to me, so I decided to write down my steps for future reference.
Here's what I do:
1. Install pbuilder and some other handy packages
Open up a terminal and type:
Still in our terminal:
3. Give it access to all official Ubuntu repositories
Here's what I do:
1. Install pbuilder and some other handy packages
Open up a terminal and type:
sudo aptitude install pbuilder debhelper devscripts build-essential2. Tell the pbuilder environment that it is going to act just like the Launchpad build farm
Still in our terminal:
sudo pbuilder create --debootstrapopts --variant=builddThis one takes a while because it's basically installing an entire system inside your existing installation, so grab a cup of coffee and watch the messages fly by.
3. Give it access to all official Ubuntu repositories
By default, your shiny new pbuilder environment won't have access to a lot of packages, so we'll want to add mirrors for common Ubuntu packages, as well as our own PPA to the pbuilder configuration file. So, still in a terminal, type:
nano ~/.pbuilderrcand paste in:
OTHERMIRROR="deb http://archive.ubuntu.com/ubuntu [YOUR UBUNTU VERSION] main restricted universe multiverse | deb http://archive.ubuntu.com/ubuntu [YOUR UBUNTU VERSION]-backports main restricted universe multiverse | deb http://archive.ubuntu.com/ubuntu [YOUR UBUNTU VERSION]-security main restricted universe multiverse | deb http://archive.ubuntu.com/ubuntu [YOUR UBUNTU VERSION]-updates main restricted universe multiverse"
and we'll also pipe on a section for our PPA, so we can use our own packages as dependencies, which in my case looks like this:
| deb http://ppa.launchpad.net/hunter-kaller/ppa/ubuntu maverick main
4. Make our pbuilder trust packages from our PPA
First, we'll login to our pbuilder environment:
sudo pbuilder --login --save-after-login
Then, we'll give it the public key to our PPA, just like if we were adding it to our own keyring:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys [YOUR PUBLIC KEY HERE]
If all goes well, you can leave your pbuilder environment by typing:
exit
5. Update our environment with these new packages
Still in our terminal, type:
sudo pbuilder --update --override-config
This should get you in pretty good shape. Let me know if you run into any issues.
Saturday, January 1, 2011
Added NEStopia to my Ubuntu PPA
I added packages for the latest Linux port of the awesome NES emulator NEStopia to my PPA. The only problem is that I don't know how to make a package create a ~/.[appname] config directory and/or put required config files into that directory at first run. If anyone knows how to do that, I'd appreciate the info. EDIT: Ok, I fixed it. I created a quick-and-dirty bash launcher script that will check for the required directory and file and create them if needed.
NO LONGER NECESSARY:
Unless/until I find out how to do that, anyone wanting to use my package will have to manually create the config directory and at least create a husk of an inputs file by opening a terminal and typing:
mkdir .nestopia ; touch .nestopia/nstcontrols
From that point on, everything should work fine. If you are super-scared of hitting the terminal and would feel better with a script, you can download and run this script and it will take care of it for you.
Let me know if you run into any issues or have any questions.
Wednesday, December 1, 2010
First Impressions of Ubuntu 11.04 Natty Narwhal
I decided to try out the latest build of Ubuntu's next future release, version 11.04 Natty Narwhal, in a VirtualBox VM. I downloaded a pre-alpha daily build and so far have been impressed with the stability and ease of installation.
As with Maverick, the installer is clean, polished and easy, and continues the trend of asking most of the configuration questions once the actual installation process has started to save time. You also have the opportunity to install third party programs, such as Fluendo's MP3 codec, at the time of installation, which is nice.
At this point, I don't think they've switched over to the proposed Unity interface by default, so I can't say whether I'll have a better experience with it now than I did on my netbook a few months back, but I'll update this post with more information as soon as I have it.
As for its performance in a VM environment, everything is stable and the VBox Guest Additions installed just fine, imparting mouse pointer integration and support for arbitrary resolutions. The only thing lacking is 3D acceleration within the VM, but I assume this will be supported at a later date.
Overall, the experience is not significantly different from that of 10.10 Maverick so far, but I expect things to change rapidly in the near future. I'll keep this post updated with any changes I find.
Tuesday, August 31, 2010
Ubuntu Maverick on VirtualBox
The third alpha release of Ubuntu 10.10 Maverick Meerkat was just released, so I figured I'd give it a shot in the ol' VirtualBox VM.
The Pros: Mouse pointer integration is built-in, so you don't have to deal with reinstalling Guest Additions every time you do a kernel update.
The Cons: Since Maverick started using a new X-Server (1.9), Guest Additions no longer do their acceleration and resolution magic. This includes manually adding resolutions to the xorg.conf, so until something changes, it's 800x600 all the way...
UPDATE (9/30/2010): Looks like the open source edition of VirtualBox has us covered now. Just open up a terminal and type (all one line):
sudo apt-get update ; sudo apt-get install build-essential linux-headers-$(uname -r) ; sudo apt-get install virtualbox-ose-guest-x11
Thanks for the tip, Anonymous!
I'm putting this here for my own reference, but if you want to automatically mount your host's shared directory in your Linux guest OS, you can edit /etc/fstab thusly:
[host's name of directory] [mount point] vboxsf defaults 0 0
which, for me, translates to:
vbox_share /media/vbox vboxsf defaults 0 0
No more tedious mounting and no mucking around with startup scripts running as root...
Something else I've encountered, not specific to Maverick, but I figured I'd share it here anyway:
I decided to give BTRFS a shot, so I formatted my partitions with it (it still won't support booting, so I had to make a small boot partition with ext4, but / and /home are BTRFS). Unfortunately, there is a hellacious bug somewhere that causes apt-get update/upgrade to be godawful slow (like, 4 hrs. for a big-but-still-reasonable upgrade) with this FS. However, I came across this blog post that suggests using a patched copy of dpkg, which is available from this ppa, which specializes in BTRFS-optimized packages. To add the PPA, add it to your sources in Synaptic or open a terminal and type:
sudo apt-add-repository ppa:brian-rogers/btrfs
Then just update/upgrade as usual. The package comes with a pretty scary warning about how it can hose your system, so you should take frequent snapshots (that's why you're using BTRFS anyway, right? Right??). Unfortunately, this didn't really fix my problem, so it's back to ext4 for me. :(
Once perk of reinstalling using the latest Beta release package is that I got to check out the new installer. It looks really nice and they've done some really smart things with concurrency whereby it starts installing your system before it asks you all of the time-consuming personalization questions. All in all, installation was easy and fast, fast, fast!
Everything else appears unchanged since Lucid.
I'll update this post as I find anything else out. If anyone has anything to add, feel free to leave a comment.
Saturday, August 21, 2010
Ubuntu 10.10 Maverick Meerkat on Acer AspireOne
One caveat before you read any further: my AspireOne is old as hell (9" w/ 8GB SSD) and these problems/fixes may not work on newer models.
Ok, now with that out of the way, I've got some good news: Maverick works great on my AO. Installation was fast and painless (it only took around 20 min., I think), and booting is super-quick (something like 15 seconds to a working desktop in my experience). Wireless works out-of-the-box, as does the wifi activity light :O. Unfortunately, the SD card slots are still b0rked. To get them working, we can use the same fix from my previous AO/Ubuntu post:
Open up a terminal and type:
I also ran into a problem trying to create shared directories using samba. The system automatically installs the samba packages just fine, but when I try to actually make a share, it fails with the error "Failed to execute child process "testparm" (No such file or directory)." If this problem affects you, too, hop back into your terminal and type:
Some other things to note about this new release:
1. Virtualbox no longer needs Guest Additions installed to utilize mouse pointer integration.
2. The new unity netbook interface sucks. I think the idea of putting the launcher bar on the left is great, and I like the look of it, but I could never track down where they had the gnome-terminal hidden, and it wouldn't show up when I searched for it in their application search applet. Also, hitting Alt+F2 wouldn't bring up the execution prompt, so after a few minutes of frustration, I uninstalled it and went back to the standard interface.
I'm happy to see the improvements they've made in this new release and I look forward to seeing what else comes in before the upcoming feature freeze. If you run into any other problems with this release, drop me a comment and I'll help however I can. Also, keep an eye on my PPA for packages of bsnes v1.0, which should be optimized enough for use on your AspireOne netbook.
Ok, now with that out of the way, I've got some good news: Maverick works great on my AO. Installation was fast and painless (it only took around 20 min., I think), and booting is super-quick (something like 15 seconds to a working desktop in my experience). Wireless works out-of-the-box, as does the wifi activity light :O. Unfortunately, the SD card slots are still b0rked. To get them working, we can use the same fix from my previous AO/Ubuntu post:
Open up a terminal and type:
sudo gedit /etc/modprobe.d/optionsThen paste in:
options sdhci debug_quirks=1Reboot and you should be all set.
I also ran into a problem trying to create shared directories using samba. The system automatically installs the samba packages just fine, but when I try to actually make a share, it fails with the error "Failed to execute child process "testparm" (No such file or directory)." If this problem affects you, too, hop back into your terminal and type:
sudo ln -s /usr/bin/testparm.samba3 /usr/bin/testparm ; sudo ln -s /usr/bin/net.samba3 /usr/bin/netThis should get you all fixed up. You don't even need to reboot again.
Some other things to note about this new release:
1. Virtualbox no longer needs Guest Additions installed to utilize mouse pointer integration.
2. The new unity netbook interface sucks. I think the idea of putting the launcher bar on the left is great, and I like the look of it, but I could never track down where they had the gnome-terminal hidden, and it wouldn't show up when I searched for it in their application search applet. Also, hitting Alt+F2 wouldn't bring up the execution prompt, so after a few minutes of frustration, I uninstalled it and went back to the standard interface.
I'm happy to see the improvements they've made in this new release and I look forward to seeing what else comes in before the upcoming feature freeze. If you run into any other problems with this release, drop me a comment and I'll help however I can. Also, keep an eye on my PPA for packages of bsnes v1.0, which should be optimized enough for use on your AspireOne netbook.
Labels:
acer,
aspireone,
maverick meerkat,
netbook,
sd card reader,
ubuntu
Wednesday, June 23, 2010
Nvidia 256.35 Driver on Ubuntu 10.04 Lucid Lynx
(If you just want installation instructions, skip down to the section labeled 'How to Install It')
I don't normally devote entire blog posts to something as trivial as a driver update. In fact, I usually don't update my proprietary driver blob until Ubuntu updates its packages and pushes them out through the software update tool, but this particular driver update has brought about a couple of major changes (for me) that I thought warranted stepping out of my comfort zone a bit.
These features are:
1.) From Nvidia's website, "Fixed an interaction problem between Compiz and 'screen-scraping' VNC servers like x11vnc and vino [ed.: the VNC server that Ubuntu uses by default] that caused the screen to stop updating."
This bug has been around since Hardy Heron and has been a thorn in my side. The only workarounds were to use a different VNC server (big hassle), constantly close/reopen the VNC connection to manually refresh (even bigger hassle), or switch to metacity instead of Compiz whenever you want remote access (not a huge hassle, but still inconvenient).
2.) The driver now supports overscan compensation (via a slide-control in the nvidia-settings application) for displays that have overscan issues, though this isn't mentioned in the changelog specifically.
This feature has been in the Windows driver control (and the Linux Catalyst driver for ATI users) for a very long time, but it is new for the Linux Nvidia driver and solves another long-standing issue for me. Now, I no longer need to cover the screen edges with transparent GNOME panels to keep new windows from drawing offscreen or worry about toolbars getting chopped off of fullscreen applications. W00t! (Edit: overscan compensation has been in the driver since Karmic, but it never showed up for my specific card until this latest driver).
The new driver also includes a host of new VDPAU improvements, which always a good thing.
How to Install It
Update (7/27/10): If you don't feel like doing all of the steps I have laid out, there's a handy PPA provided by the same cats who package the standard Ubuntu graphics drivers that has a package for the 256.35 driver. You can find it here. Whether you use the PPA or my steps, the Bonus sections below are still applicable and handy.
I have an Nvidia 8600 GT graphics card and, when I first tried to install the driver, I followed the procedure that has always worked in the past of simply downloading the installer, dropping down to console, and running the installer. However, when I tried that, the installer failed with the error "THE DISTRIBUTION-PROVIDED PRE-INSTALL SCRIPT FAILED." Others have apparently also gotten another error, which I will include here for search engine purposes: "Error: Unable to load the kernel module 'nvidia.ko'. This happens most frequently when this kernel was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if a driver such as rivafb/nvidiafb is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s), or NVIDIA GPU installed in this system is not supported by this NVIDIA Linux graphics driver release."
In either event, these steps should clear things up:
1.) First, we'll gather some resources: download the driver from Nvidia's website and put it somewhere, such as your Home directory. Then, open a terminal and type:
sudo aptitude install linux-headers-`uname -r` build-essential nvidia-settings
2.) Now, we need to get rid of some modules that conflict with our soon-to-be-installed proprietary driver. So, in a terminal, type:
sudo gedit /etc/modprobe.d/blacklist.conf
Scroll down to the bottom and copypasta these lines:
# Allows proprietary Nvidia driver to installblacklist vga16fbblacklist nouveaublacklist rivafbblacklist nvidiafbblacklist rivatv
Save and exit.
3.) Next, we need to clear out any previously installed Nvidia drivers, so (still in a terminal) type:
sudo apt-get remove --purge nvidia-*
4.) Reboot and, when the error window pops up saying Ubuntu can't load drivers blah, blah, blah, choose to 'Exit to console,' and it should dump you down to a command prompt. Login and navigate to the directory where you put your Nvidia driver installer from Step 1 (if you put it in your Home directory, you should already be there upon login).
5.) Start the Nvidia driver installer by typing (hint: you can use the TAB key to autocomplete instead of using the * wildcard character):
sudo sh NVIDIA-*
When it asks if you want it to automatically configure things, select 'yes' and it will auto-generate an xorg.conf file with the appropriate fields.
Reboot again and everything should be hunky dory (if not, and your installation still poops out, scroll down to the bottom of the post for some more things you can try).
Bonus Points
Unfortunately, if you install the driver this way, each time a new kernel update comes down the pipe, your Nvidia driver will stop working and have to be reinstalled, which can be a big bummer. However, you can set up a script that will run anytime the driver needs to be reinstalled:
1.) First, we'll move our Nvidia driver installer to a safe location. In a terminal, navigate to wherever it is and type (again, use TAB to autocomplete instead of the wildcard):
sudo mv NVIDIA-* /usr/src
2.) Next, we want to make a symlink (kinda like a more powerful shortcut) to the installer so our script won't need to be rewritten any time a new Nvidia driver comes out. In a terminal, type:
sudo ln -s /usr/src/NVIDIA-* /usr/src/nvidia-driver
Now, since our script will reference the 'nvidia-driver' symlink we can just overwrite the old driver and make a new symlink using the same name if there's a driver update.
3.) Now for the script itself. Open a text editor and, in a new file, copypasta this:
#!/bin/bash## Set this to the exact path of the nvidia driver you plan to use# It is recommended to use a symlink here so that this script doesn't# have to be modified when you change driver versions.DRIVER=/usr/src/nvidia-driver# Build new driver if it doesn't existif [ -e /lib/modules/$1/kernel/drivers/video/nvidia.ko ] ; thenecho "NVIDIA driver already exists for this kernel." >&2elseecho "Building NVIDIA driver for kernel $1" >&2sh $DRIVER -K -k $1 -s -n 2>1 > /dev/nullif [ -e /lib/modules/$1/kernel/drivers/video/nvidia.ko ] ; thenecho " SUCCESS: Driver installed for kernel $1" >&2elseecho " FAILURE: See /var/log/nvidia-installer.log" >&2fifiexit 0
Save the file with the name update-nvidia and exit the text editor.
4.) Now, we want to make our script executable, so, in a terminal, navigate to wherever you made your script and type:
chmod a+x update-nvidia
5.) Finally, we need to install it. Still in your terminal from the last command, type:
sudo mkdir -p /etc/kernel/postinst.d ; sudo install update-nvidia /etc/kernel/postinst.d
Now, you should be all set. Whenever you install a new kernel, this script should kick in and install the Nvidia driver for you.
Even More Bonus Points
Now that we've got our driver installed and ready to update itself, we should consider our power consumption! Usually, the Nvidia driver will default to a power profile that always leaves your card running full-tilt, which sucks battery life and raises your utility bill. Thankfully, there's something we can do about it.
Open up a terminal and type:
sudo gedit /etc/X11/xorg.conf
This will get us into the auto-generated configuration file created by the driver installer.
Scroll down to the Nvidia driver section (you can tell it's the right section because it will be labeled 'Device,' the 'Vendor' field will say 'Nvidia,' and the 'Driver' field will say 'nvidia') and add these three lines:
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3333"Option "Coolbits" "1"Option "OnDemandVBlankInterrupts" "True"
Save the file and exit.
In the first line, the PowerMizerEnable switch tells the driver that we're interested in using the dynamic clocking features (this switch may not be entirely necessary, as PowerMizer is supposed to be enabled by default, but it can't hurt anything and may be required for some cards/cases), while the PerfLevelSrc field tells it which performance level we want to use. The 0x3333 setting means we want dynamic, on-demand clocking for both battery and AC power.
The second option we added enables the 'Coolbits' feature, which lets us manually control the clock and memory speeds on our card via the nvidia-settings application.
The third option enables a checkbox in the nvidia-settings application to allow or disallow vBlank interrupts. Allowing them (checking the box) reduces the number of wakeups from idle, and thus reduces power consumption somewhat.
Now, in my case (8600 GT), there is only one performance level and dynamic clocking does nothing (you can find out your performance levels by typing in a terminal: nvidia-settings -q GPUPerfModes -t). This really stinks, since I do all of my gaming in Windows and all I really need my video card for in Ubuntu is compositing and fancy desktop effects. With this in mind, I used the Coolbits option via the nvidia-settings application to drastically underclock my card. It now runs at approximately 150 mhz on the core clock and 180 mhz on the memory, which generates far less heat and uses way less power than before. Compiz still looks great and has no performance issues, even while playing HD video, rotating the desktop cube with 3D windows, etc.
If Installer Still Fails
(I didn't have these problems, so I didn't try these instructions myself. They are only here in case you need them)
So, if the above instructions didn't work, we still have some things we can try:
1.) Drop back down to the command line (by pressing Alt+F1), login and type:
sudo gdm-stop
and then
sudo apt-get remove --purge xserver-xorg-video-nouveau
2.) Now, we need to fiddle with some blacklisted framebuffer stuff, so type:
sudo nano /etc/modprobe.d/blacklist-framebuffer.conf
Once in, we need to comment out (put a # in front of) blacklist vesafb and add a new line that says:
blacklist vgafb16
Save and exit (hit ctrl+x).
3.) Now, type:
sudo nano /etc/initramfs-tools/modules
Scroll down to the bottom and add these two lines:
fbconvesafb
Save and exit, then update the initramfs by typing:
sudo update-initramfs -u
4.) Now, we need to tell grub about our framebuffer, so type:
sudo nano /etc/default/grub
Once in, search (ctrl+w) for GRUB_CMDLINE_LINUX= and add either vga=771 or vga=795 (which one you'll add depends on your resolution, so for now, just pick one). Save and exit, then update grub by typing:
sudo update-grub
If things are messed up, you can redo the above step using the other vga value to hopefully correct things.
Now, once you reboot, you should be able to pick back up from Step 4 in the original instructions and install the Nvidia driver normally without any further errors.
Labels:
binary driver,
compiz,
Lucid Lynx,
nvidia,
overscan,
PowerMizer,
ubuntu,
VNC
Friday, February 26, 2010
How to Run New Steam UI Beta in WINE
If you've opted-in for Steam's Beta user interface in Linux via WINE, you've probably noticed some serious issues, such as the main window not drawing properly on your desktop. Luckily, this is actually really easy to fix. All you have to do is go into your WINE configuration and change the Windows version from the default Windows XP to Windows Vista (or Windows 7, either one works):
Restart Steam and it will notify you that it needs to install a Steam component that requires administrator privileges. Click 'ok,' wait a few minutes, then start Steam again. Everything should begin rendering just dandy:
Everything I tried in the Library and Friends sections seems to work, including downloading and installing games, launching games, chatting with friends, etc. Unfortunately, the store, news and community features still don't show up properly :(
Also, in-game chat using the overlay appears broken in that the game hangs when you try to switch and you can't see what you're typing if you try to chat. However, alt+tab still works, so that's something.
As an added bonus, the 'minimize to system tray' feature works swimmingly:

Original post (for posterity):
I just opted-in for Steam's beta version of their fancy new user interface, which includes a number of improvements such as a greater focus on social interaction and switching from the Internet Explorer rendering engine to a WebKit-based renderer. I had assumed that this would grease the gears a bit on using the UI in Linux via WINE, but it has unfortunately done the opposite.
Now, if you try to launch the updated UI, the Desktop Switcher down in the bottom-right corner of the screen shows a big window with a Steam logo on it, but the window isn't drawn on the desktop as far as I can see.
This post is primarily a placeholder for anything I might find/come up with to correct the problem. So far, I haven't tried disabling compositing or anything like that, so that's next on the list. Feel free to leave me a comment if you have any clues to what's going on.
Tuesday, December 22, 2009
Testing Ubuntu 10.04 Lucid Lynx Alpha 1
The latest version of the popular Ubuntu Linux distro, known as Lucid Lynx, was just released the other day and, though it is an early alpha release, I wanted to give it a shot in a virtual machine. Installation in VirtualBox was smooth and polished, but I ran into some problems with installing VBox's Guest Additions, which allow for higher resolutions and, more importantly, mouse pointer integration (the magic that lets you move your cursor from host to guest OSs without mucking around with capturing the mouse pointer).
Here is a simple fix for the mouse pointer integration:
Fire up a terminal and type:
sudo gedit /etc/X11/xorg.conf
This file used to be how Ubuntu managed devices attached to your computer, but they're trying to move away from it. Now, the system will accept such a file, but it tries to figure things out on-the-fly as much as it can, hence the currently-empty file.
So, into this empty file, copy/paste:
Section "InputDevice"
Identifier "VBoxMouse"
Driver "vboxmouse"
Option "CorePointer"
EndSection
All this is doing is telling your virtual machine to look for the vboxmouse driver and use it. Now, when you reboot, you should have proper mouse integration.
However, if this somehow causes problems and you want to undo it, just type into a terminal:
sudo rm /etc/X11/xorg.conf
and then reboot your system.
To fix the small resolution, you just need to add another section to your xorg.conf, so type into a terminal:
sudo gedit /etc/X11/xorg.conf
and below the mouse section, paste in:
Section "Screen"DefaultDepth 24SubSection "Display"Depth 15Modes "1920x1440" "1920x1200" "1900x1200" "1920x1080" "1600x1200" "1680x1050" "1600x1024" "1600x1000" "1400x1050" "1280x1024" "1440x900" "1280x960" "1366x768" "1280x800" "1152x864" "1280x768" "1280x720" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"EndSubSectionSubSection "Display"Depth 16Modes "1920x1440" "1920x1200" "1900x1200" "1920x1080" "1600x1200" "1680x1050" "1600x1024" "1600x1000" "1400x1050" "1280x1024" "1440x900" "1280x960" "1366x768" "1280x800" "1152x864" "1280x768" "1280x720" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"EndSubSectionSubSection "Display"Depth 24Modes "1920x1440" "1920x1200" "1900x1200" "1920x1080" "1600x1200" "1680x1050" "1600x1024" "1600x1000" "1400x1050" "1280x1024" "1440x900" "1280x960" "1366x768" "1280x800" "1152x864" "1280x768" "1280x720" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"EndSubSectionSubSection "Display"Depth 8Modes "1920x1440" "1920x1200" "1900x1200" "1920x1080" "1600x1200" "1680x1050" "1600x1024" "1600x1000" "1400x1050" "1280x1024" "1440x900" "1280x960" "1366x768" "1280x800" "1152x864" "1280x768" "1280x720" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"EndSubSectionDevice "Device[0]"Identifier "Screen[0]"Monitor "Monitor[0]"EndSection
Important: Each of the lines that start with "Modes" should have all of the resolutions following it on the same line, and they should only include resolutions that your monitor can actually produce, so you might have to delete some of them (e.g., my monitor is a 20" that only goes up to 1680x1050, so I deleted all of the resolutions that were greater than this).
Again, if this causes any problems, you can either delete the section of the xorg.conf file or delete the xorg.conf file entirely and then reboot to get things back to the way they were.
Shared folders between the guest and host also appear to be broken at the moment, but I don't know what to do about it. Other than that, things have gone well for me. Compiz works fine and I have a fancy composite desktop with wobbly windows and true transparency.
Labels:
alpha,
Lucid Lynx,
mouse pointer integration,
ubuntu,
virtualbox
Sunday, November 29, 2009
Using Gizmo5 with Google Voice to call landline and mobile phones
I, like many others, pay a lot for home phone service, which is becoming increasingly obsolete with the ubiquity of cellular phones. In an effort to cut out this mostly needless expense, I decided to try and combine two free services, Google Voice and Gizmo5, to make and receive free calls with actual landlines and cell phones via my existing internet connection.
The concept works like this: when you sign up for a Gizmo5 account, they assign to you a free SIP number, which you can basically think of as an IP-based phone number. This is already pretty cool, but the catch is that only other IP-based phones can call this number, and that's where Google Voice comes in. Through this free service, Google will connect any number--physical or SIP--with any other number--again, physical or SIP. Once the initial connection is made (the hard part for Gizmo), Google steps out and you're left with a working SIP-to-landline call without a phone line and without paying a dime.
To get this sweet deal going, you have to have an account with both services, which could be the biggest stumbling block: Google Voice is currently in an invite-only, privite beta stage and Gizmo5 has stopped accepting new registrations after it was recently acquired by Google (existing accounts still work, though).
If you've managed to snag some accounts, though, and they are all set up (you've chosen a local phone number for Google Voice, Gizmo has assigned a SIP number, etc.) you're ready to get started.
First, open your Gizmo5 account in your favorite web browser and find your SIP number (it will have an area code of 747):

Next, open your Google Voice account and click on 'Settings.' Under the 'Phones' tab, click 'add another phone' to forward your calls to:

Name it something recognizable (I called it 'Gizmo'), type in your Gizmo SIP number into the second blank, and then select 'Gizmo' from the pull-down menu:

Next, we'll want to install the Gizmo5 client on our computer (you can also use the gizmocall web-based interface, but it is made in flash and feels a little kludgy). Go to Gizmo's download page and download the client program for your operating system. If you're using Linux (like me), you'll notice that this is a bit of a problem, as the links are all missing. Luckily, you can still download the deb installer file for Debian-based distros, such as Ubuntu, from a direct link. UPDATE: the Linux download page is back!
Once the client is installed and running, you can enter your Gizmo account information and login. You can also choose to configure the client to manage your IM accounts, but I chose not to.
From now on, calls made to your Google Voice number--which is accessible to normal phones, either landline or cellular--will cause your Gizmo5 client to 'ring.' That means we can now receive calls from normal phones on our computer! We can also make calls to normal phones, but the trick is to use Google Voice instead of Gizmo's built-in (for-pay) calling feature:

When you click 'connect,' Google will call your Gizmo client (you answer it when it rings) and then call the number you have entered, merge the two calls, and then step out, just like your own personal secretary:

Conclusions
This method is not a perfect replacement for a home telephone. It only works when you have internet access (the silver lining of which is that you can use it at Starbucks, your hotel room, etc.; anywhere with a broadband connection). More importantly, it doesn't provide emergency 911 access, so if your house catches on fire, you'll just have to watch it burn because the fire department won't be able to look up your information via your phone number.
Furthermore, this method may not work forever. Google has just purchased Gizmo, so things are sort of up in the air until they figure out what they want to do about the way the services interact. Hopefully, if anything changes, it will be for our--the users'--benefit.
There has also been speculation that Google is planning to fully integrate these services together and then make them run on a wifi-enabled mobile device (Android-based, of course). This will essentially create a mobile phone that only works within wifi, but that can make and receive calls to/from any other phone without the need for a carrier (no carrier means no contract, no fees, etc.). That is, a fully ad-supported phone powered entirely by Google services and software.
Google, if you're reading this with your all-seeing robot eyes, please make it happen as soon as possible.
The concept works like this: when you sign up for a Gizmo5 account, they assign to you a free SIP number, which you can basically think of as an IP-based phone number. This is already pretty cool, but the catch is that only other IP-based phones can call this number, and that's where Google Voice comes in. Through this free service, Google will connect any number--physical or SIP--with any other number--again, physical or SIP. Once the initial connection is made (the hard part for Gizmo), Google steps out and you're left with a working SIP-to-landline call without a phone line and without paying a dime.
To get this sweet deal going, you have to have an account with both services, which could be the biggest stumbling block: Google Voice is currently in an invite-only, privite beta stage and Gizmo5 has stopped accepting new registrations after it was recently acquired by Google (existing accounts still work, though).
If you've managed to snag some accounts, though, and they are all set up (you've chosen a local phone number for Google Voice, Gizmo has assigned a SIP number, etc.) you're ready to get started.
First, open your Gizmo5 account in your favorite web browser and find your SIP number (it will have an area code of 747):

Next, open your Google Voice account and click on 'Settings.' Under the 'Phones' tab, click 'add another phone' to forward your calls to:

Name it something recognizable (I called it 'Gizmo'), type in your Gizmo SIP number into the second blank, and then select 'Gizmo' from the pull-down menu:

Next, we'll want to install the Gizmo5 client on our computer (you can also use the gizmocall web-based interface, but it is made in flash and feels a little kludgy). Go to Gizmo's download page and download the client program for your operating system. If you're using Linux (like me), you'll notice that this is a bit of a problem, as the links are all missing. Luckily, you can still download the deb installer file for Debian-based distros, such as Ubuntu, from a direct link. UPDATE: the Linux download page is back!
Once the client is installed and running, you can enter your Gizmo account information and login. You can also choose to configure the client to manage your IM accounts, but I chose not to.
From now on, calls made to your Google Voice number--which is accessible to normal phones, either landline or cellular--will cause your Gizmo5 client to 'ring.' That means we can now receive calls from normal phones on our computer! We can also make calls to normal phones, but the trick is to use Google Voice instead of Gizmo's built-in (for-pay) calling feature:

When you click 'connect,' Google will call your Gizmo client (you answer it when it rings) and then call the number you have entered, merge the two calls, and then step out, just like your own personal secretary:

Conclusions
This method is not a perfect replacement for a home telephone. It only works when you have internet access (the silver lining of which is that you can use it at Starbucks, your hotel room, etc.; anywhere with a broadband connection). More importantly, it doesn't provide emergency 911 access, so if your house catches on fire, you'll just have to watch it burn because the fire department won't be able to look up your information via your phone number.
Furthermore, this method may not work forever. Google has just purchased Gizmo, so things are sort of up in the air until they figure out what they want to do about the way the services interact. Hopefully, if anything changes, it will be for our--the users'--benefit.
There has also been speculation that Google is planning to fully integrate these services together and then make them run on a wifi-enabled mobile device (Android-based, of course). This will essentially create a mobile phone that only works within wifi, but that can make and receive calls to/from any other phone without the need for a carrier (no carrier means no contract, no fees, etc.). That is, a fully ad-supported phone powered entirely by Google services and software.
Google, if you're reading this with your all-seeing robot eyes, please make it happen as soon as possible.
Labels:
free calls,
Gizmo,
Gizmo5,
Google Voice,
karmic,
SIP,
ubuntu
Subscribe to:
Posts (Atom)



