Comment 8 for bug 1040649

Revision history for this message
Felipe 'chronos' Prenholato (chronossc) wrote : Re: [Bug 1040649] Re: New Stimulus for Connecting external displays

Actually it depends of GPU and driver.

My Nvidia GTS 360M with nvidia-current 304.51 on Ubuntu 12.04 not works,
and, even don't have a entry in /sys/class.

I think that cuttlefish can support GPUs with udev rules if we can have a
generic rule that apply to any monitor... with something documented saying:

"Isn't my fault that your card does not support udev events, sorry..."

I think that because many people don't have a powerfull card like my one
was some years ago, and, people who don't want gaming and want linux today,
will buy machines with lasted intel GPUs.

Felipe 'chronos' Prenholato.
Linux User nº 405489
Home page: http://devwithpassion.com | http://chronosbox.org/blog
GitHub: http://github.com/chronossc/ | Twitter: http://twitter.com/chronossc

2012/9/25 Georg Peters <email address hidden>

> Hi again ;)
> I tried to write a plugin yesterday..what should I say..I failed ;) (thx
> for the good youtube video anyway)
>
> So I came along with another solution (for now):
>
> udev rules!
> I have two simple udev rules, that monitors if a hdmi monitor is connected
> or disconnected and execute a script.
>
> First find your env variables to identify the device:
> georg@ideapad:~$ udevadm monitor --environment --udev
>
> I got something like "ID_MODEL == "TS2GJF110"" which is unique on my
> system.
>
> so here are our rules(/etc/udev/rules.d/70-hdmi.rules):
> ACTION=="add", ENV{ID_MODEL}=="TS2GJF110", RUN+="/usr/local/bin/hdmi.sh"
> ACTION=="remove", ENV{ID_MODEL}=="TS2GJF110", RUN+="/usr/local/bin/hdmi.sh"
>
> Another good thing (for me) is that we can identify the device..so the
> rule only applies to my hdmi monitor, not the beamer at work ;-)
>
> my simple script:
> #!/bin/sh
>
> status="$(cat /sys/class/drm/card0-HDMI-A-1/status)"
>
> export XAUTHORITY=/home/georg/.Xauthority
> export DISPLAY=:0.0
>
> if [ "${status}" = disconnected ]
> then
> xrandr --output LVDS1 --auto --output HDMI-0 --off
>
> elif [ "${status}" = connected ]
> then
> xrandr --output LVDS1 --off --output HDMI-0 --mode 1920x1080
> fi
>
> hope it helps someone until cuttlefish get a plugin for that
> action...since you can customize it a way better.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1040649
>
> Title:
> New Stimulus for Connecting external displays
>
> Status in Cuttlefish:
> Incomplete
>
> Bug description:
> Hello, this is a really nice app, however I missed some stymulus.
>
> Monitor is Plugged / Unplugged:
> What to do: It should watch when a new monitor (via VGA or HDMI) is
> plugged or not and we run a command for each action.
> Why: Today, KDE offer window to configure monitors, but not save a
> default for each monitor I plug in. At my work a have one HP running at
> 1366x720, at home a Dell running at 1440x900. KDE don't regonized it, but
> when I run a command called disper (disper -e -t left when plugged, disper
> -s when unplugged) I have what I need.
>
> [...]
>
> Thx!
>
>
> Edited by Alex: You requested several things in one bug report. Thus in
> order to keep the reports tidy and to prevent total chaos I splitted them
> into several bug reports ;-)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/cuttlefish/+bug/1040649/+subscriptions
>