[HOW TO] Build Ambilight on Linux (AppleTV; Sams image; Ubuntu 8.04;...)

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
bobo1on1 Offline
cheapass Team-XBMC Developer
Posts: 2,752
Joined: Dec 2008
Reputation: 20
Post: #31
Nvidia gpu? Pass the -x flag to boblight-X11, it's a driver bug.
find quote
illiac4 Offline
Fan
Posts: 434
Joined: May 2009
Reputation: 1
Post: #32
Hi!
Yes it is GeForce Go 7300.
I am using:
-x use XGetImage instead of XRender with command
boblight-X11 -f -x -o speed=50 -o value=5 -o saturation=1.5 -o threshold=75


The problem is that it does not work (no lights) if there is no -x. Is there a way that it could be done, so that ATV will not need -x parameter?
(This post was last modified: 2011-07-26 06:15 by illiac4.)
find quote
bobo1on1 Offline
cheapass Team-XBMC Developer
Posts: 2,752
Joined: Dec 2008
Reputation: 20
Post: #33
You could try disabling opengl flipping in nvidia-settings or in xorg.conf, but that will lower performance.
find quote
illiac4 Offline
Fan
Posts: 434
Joined: May 2009
Reputation: 1
Post: #34
And could be xrender enabled on this geforce?

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder3) Wed Sep 12 14:29:35 PDT 2007


Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection

Section "Files"
RgbPath "/usr/lib/X11/rgb"
EndSection

Section "Module"
Load "dbe"
Load "extmod"
Load "freetype"
Load "glx"
EndSection

Section "InputDevice"

# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 30.0 - 110.0
VertRefresh 50.0 - 150.0
Option "DPMS"
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "RegistryDwords" "RMDisableRenderToSysmem=1"
Option "DynamicTwinView" "false"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "NoLogo" "True"
SubSection "Display"
Depth 24
EndSubSection
EndSection

Section "Extensions"
Option "Composite" "Disable"
EndSection
(This post was last modified: 2011-07-26 20:10 by illiac4.)
find quote
illiac4 Offline
Fan
Posts: 434
Joined: May 2009
Reputation: 1
Post: #35
bobo1on1 Wrote:You could try disabling opengl flipping in nvidia-settings or in xorg.conf, but that will lower performance.

I did that and it makes no differece. Any other options?
find quote
illiac4 Offline
Fan
Posts: 434
Joined: May 2009
Reputation: 1
Post: #36
In this part I will explain how to use plugin Advanced Launcher to start and stop ambilight.

1. Install Advanced Launcher from add-ons.
2. Now you have to create two scripts. One which will start ambilight and one which will turn off ambilight.
I have created under /media/scripts/ folder two scripts.
lights.sh
Quote:#!/bin/bash
DISPLAY=:0.0 /usr/local/bin/boblight-X11 -f -x -o speed=50 -o value=5 -o saturation=1.5 -o threshold=75 > /dev/null 2>&1

and

lights_kill.sh
Quote:#!/bin/sh
killall -9 boblight-X11

3. Give "lights.sh" and "lights_kill.sh" permissions 755
4. Launch "Advanced Launcher" and create new launcher entry one which will call lights.sh and the second one which will call lights_kill.sh

Configuration file of Advanced Launcher is located under "/root/.xbmc/userdata/addon_data/plugin.program.advanced.launcher/" and is called "launchers.xml"

Here you can see content of my "launchers.xml" file to give you better understanding.

Quote:<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<launchers>
<launcher>
<id>8b370e49314f2fec250af5fdd5af3e81</id>
<name>Ambilight ON</name>
<application>/media/scripts/lights.sh</application>
<args></args>
<rompath></rompath>
<thumbpath></thumbpath>
<fanartpath></fanartpath>
<extrafanartpath></extrafanartpath>
<romext></romext>
<platform>3DO</platform>
<thumb></thumb>
<fanart></fanart>
<genre></genre>
<release></release>
<publisher></publisher>
<launcherplot></launcherplot>
<minimize>true</minimize>
<lnk></lnk>
<roms>
</roms>
</launcher>
<launcher>
<id>6b3586c8ee469e7a598ed80ac7935d15</id>
<name>Ambilight OFF</name>
<application>/media/scripts/lights_kill.sh</application>
<args></args>
<rompath></rompath>
<thumbpath>/</thumbpath>
<fanartpath></fanartpath>
<extrafanartpath></extrafanartpath>
<romext></romext>
<platform>3DO</platform>
<thumb></thumb>
<fanart></fanart>
<genre></genre>
<release></release>
<publisher></publisher>
<launcherplot></launcherplot>
<minimize>true</minimize>
<lnk></lnk>
<roms>
</roms>
</launcher>
</launchers>
(This post was last modified: 2011-07-31 07:20 by illiac4.)
find quote
Sam.Nazarko Offline
Posting Freak
Posts: 835
Joined: Dec 2009
Reputation: 12
Location: London
Post: #37
Will just make it autostart in the August update, probably make it on/off capable via an Addon
find quote
tocinillo Online
Fan
Posts: 301
Joined: Dec 2010
Reputation: 2
Post: #38
Same problem with atmolight and your scripts: when I turn OFF/ON lights.sh I have flickering :/

But if I configure boblightd to autostart with Ubuntu all works fine, but I don't shutdown/restart my machine (seems that Ubuntu doesn't kill boblightd).

Regards.
find quote
illiac4 Offline
Fan
Posts: 434
Joined: May 2009
Reputation: 1
Post: #39
tocinillo Wrote:Same problem with atmolight and your scripts: when I turn OFF/ON lights.sh I have flickering :/

But if I configure boblightd to autostart with Ubuntu all works fine, but I don't shutdown/restart my machine (seems that Ubuntu doesn't kill boblightd).

Regards.

Hmm. I do not totally understand what you are trying to tell.
To make it work you need boblightd to auto start (read first post). After that you can use tutorial above. I have flickering only when i have screensaver (black) active (i still hope that boboneoone will help us to solve this).

And start/stop through advanced launcher are working great for me. And yes if you do run Ambilight ON for exampla twice it there will be two deamons. but when you run Ambilight OFF all will be killed.
With the script you are only starting and stopping the boblight-X11 deamon and not boblightd.
(This post was last modified: 2011-08-01 21:21 by illiac4.)
find quote
tocinillo Online
Fan
Posts: 301
Joined: Dec 2010
Reputation: 2
Post: #40
Yes, but in my case seems that when I use the OFF.sh, the script doesnt kill correctly boblightd...because when I use ON.sh script I have flickering (because I running two deamons??).

I use EXACLTY the same scripts that you....

EDIT: Ok, I dont know because illiac4 scripts doenst work, but in my case this scripts works perfect. For start ambilight:

Quote:#!/bin/sh
boblightd -f > /dev/null 2>&1
export DISPLAY=:0.0
boblight-X11 -f -x -o saturation=5 -o value=10 -o threshold=10 -o use=1 -o interpolation=1 -o autospeed=0.2 -o speed=30> /dev/null 2>&1

For shutdown Ambilight:

Quote:#!/bin/sh
killall -v boblightd
killall boblight-X11

Regards!
(This post was last modified: 2011-08-02 00:50 by tocinillo.)
find quote
Post Reply