[HOW TO] Build Ambilight on Linux (AppleTV; Sams image; Ubuntu 8.04;...)
#31
Nvidia gpu? Pass the -x flag to boblight-X11, it's a driver bug.
Reply
#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?
Reply
#33
You could try disabling opengl flipping in nvidia-settings or in xorg.conf, but that will lower performance.
Reply
#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
Reply
#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?
Reply
#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>
Reply
#37
Will just make it autostart in the August update, probably make it on/off capable via an Addon
Reply
#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.
Reply
#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.
Reply
#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!
Reply
#41
I doubt that you are running two deamons with my script. Only if you click on more than once. Kill command will kill all deamons.
Use command
Quote:ps -ef
To see what deamon are you running.

Your script will be able to run throught terminal but not over Advanced launcher.


Well maybe it is a good idea to kill both deamons like you did, because it is possible that deamon boblightd start acting strange if you are starting and killing only x11. Will also try that today.
This is the modified your script which will work through terminal and advanced launcher.
Ambilight ON
Quote:/usr/local/bin/boblightd -f > /dev/null 2>&1
DISPLAY=:0.0 /usr/local/bin/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


Ambilight OFF
Quote:killall -9 boblight-X11
killall -9 boblightd
Reply
#42
Try normal killall instead of killall -9, and kill boblight-X11 before boblightd.
Reply
#43
bobo1on1 Wrote:Try normal killall instead of killall -9, and kill boblight-X11 before boblightd.

Normal kill will work only if run through terminal. Iy you try to run script throught Advanced Launcher it will not kill them without -9 switch.
Reply
#44
illiac4 Wrote:I doubt that you are running two deamons with my script. Only if you click on more than once. Kill command will kill all deamons.
Use command

To see what deamon are you running.

Your script will be able to run throught terminal but not over Advanced launcher.


Well maybe it is a good idea to kill both deamons like you did, because it is possible that deamon boblightd start acting strange if you are starting and killing only x11. Will also try that today.
This is the modified your script which will work through terminal and advanced launcher.
Ambilight ON



Ambilight OFF

Sorry, I forgot to tell you that I use Executor and not Advanced Launcher.
Reply
#45
tocinillo Wrote:Sorry, I forgot to tell you that I use Executor and not Advanced Launcher.

Aha cool. I will also do some test with executor to see how it works compared to Advanced Launcher.

Maybe it is stupid Smile but to be sure that there are not more than one deamon started of boblightd and boblight-X11 we can use for script to turn on and off those one.

Ambilight ON:
Quote:#!/bin/bash
killall -9 boblight-X11
killall -9 boblightd
/usr/local/bin/boblightd -f > /dev/null 2>&1
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

Ambilight OFF
Quote:#!/bin/sh
killall -9 boblight-X11
killall -9 boblightd

These are for Advanced Launcher. I will write one for Executor after testing this plugin. The problem with Advanced Launcher is that it will not allow you to start and stop the Ambilight during watching the film, because it will throw you out from film or. music,..... This is the reason i do recommend to use Executor script.
Reply

Logout Mark Read Team Forum Stats Members Help
[HOW TO] Build Ambilight on Linux (AppleTV; Sams image; Ubuntu 8.04;...)1