ubuntu gutsy 7.10 / compiz / second xscreen / no keyboard

Bug #173517 reported by huiii on 2007-12-02
4
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
Low
Unassigned

Bug Description

Hello, i have compiz on ubuntu gutsy and on second xscreen (tv) i can not use keyboard...
i can move things around and everything using mouse, but nothing with keyboard, no commands, no writing on open office or xterm...
i would like to quote this Question #15238:

Thank you all for the great job that you are doing with Ubuntu.

I've a problem with a separate X displays configuration in Gutsy. I've installed Gutsy rc on a desktop (dual core, nvidia 6600gt, 1gb ram) and configured separate X displays to be able to attach my plasma tv (a Panasonic) over Component. I've compiz enabled with custom settings. I can see the image perfectly on my tv, but if I let compiz running on both screens, on the primary (LCD) some things run very slow (like after minimizing a window, it takes like 3 seconds or more to unminimize). I've changed /usr/bin/compiz to include --only-current-screen in the default options and now everything works smooth on primary screen, but on the second there are no window borders (there weren't any also when compiz was enabled for both screens). Also, I cannot use the keyboard on the second screen (I can open a movie with the movie player and I can make it full screen on the second screen only by using the mouse).

Do you have any sugestions?

Regards,
Marriouss

marriouss (marriouss) wrote :

Update: regarding keyboard on second screen - If I open a terminal I cannot input any command, but on the menus I can move around with the arrow keys.
the mouse pointer on the second screen is an X.

Now the weird part: If I go on the second screen and set the visual effects from None to Normal and back to None, I'll have compiz disabled on both screens but with borders and keyboard working fine on both. If I re-enable compiz on the first (main) screen then compiz will work perfectly on the first screen, no compiz on the second, but now the second screen behaves great, with window borders and keyboard input.

If I can attach any log, please do tell me and I'll gladly do it.

Many thanks,
M

marriouss (marriouss) wrote :

Update2: After making the changes from above steps (see previous comment), on the second screen, the tasks panel (the one from the bottom of the screen) shows duplicated tasks (see screenshot).

marriouss (marriouss) wrote :
marriouss (marriouss) wrote :

Ignore update 2 - I've recreated the bottom panel and seems ok.

huiii (a00ps) wrote :

well, i followed your comment above (update1, the weird part) and this will not work for me... so, my second screen stays "useless", unless i switch off compiz.
it means: with metacity, gtk-window-decorator enabled and compiz disabled, everything works perfect...

/ubuntu/7.10/nvidia/6600go/laptop

to at least (with two xscreens) have primary screen work nice with compiz and emerald, menus working normal etc I wrote a "script" :) that goes on gdm start-up :

#!/bin/bash
#switch between compiz 2 screens or 1 screen

VIDEOCARD1=`/bin/cat /var/log/Xorg.0.log |grep -c TV-0`
VIDEOCARD2=`/bin/cat /var/log/Xorg.0.log |grep -c CRT-0`
if [ "$VIDEOCARD1" = 0 ] && [ "$VIDEOCARD2" = 0 ]; then
sleep 0
else
TWINVIEW=`/bin/cat /etc/X11/xorg.conf |grep -c TWINVIEW`
fi
if [ "$TWINVIEW" = 0 ]; then
sleep 3
compiz --replace --only-current-screen &
emerald --replace &
else
sleep 0
fi

basically what it does is: checks if any second monitor is attached to my laptop.
than if not, nothing happens, if yes, it checks if i have a xorg.conf for twinview.
if so: nothing happens cause there, compiz works fine on both screens.
if not twinview xorg.conf, than it will do this:

compiz --replace --only-current-screen &
emerald --replace &

this two little lines i found in the ubuntu forum.
when applying them, first screen works fine, but second screen not.
well, at least i can use now the second screen to watch a film on the TV-monitor, while first screen behaves normal.
but to perform with veejay i have to switch off compiz, as i need the keyboard to control video on second screen.
i dont use twinview for video on second screen, as the quality gets bad there: the well-known horizontal split-line in the middle of the screen;
xscreen-setup in xorg allows me to pass an exact modeline for PAL-TV, witch makes video look correct again (no horizontal split).
to be honest, i dont care if compiz works when I'm performing with live video, but it would be schick, of course, to show off, 0-o
perhaps all this information helps!?

marriouss (marriouss) wrote :

huiii, have you tried modifying the /usr/bin/compiz to include the --only-current-screen in the list of default parameters to be given to compiz?

This is what I use now and at list I have compiz working fine on the first screen, and on the second I can watch full screen videos (after making them fullscreen with the mouse, I can use the keyboard - to pause, for example. Sometimes the keyboard doesn't work in fullscreen either, but a quick switch with the mouse from the fullscreen into window mode and back seems to re-make the keyboard work :) ).
This is how it look the line modified in /usr/bin/compiz:

* before: COMPIZ_OPTIONS="--ignore-desktop-hints --replace"
* after: COMPIZ_OPTIONS="--ignore-desktop-hints --replace --only-current-screen"

huiii (a00ps) wrote :

marrious, hello,

thanks for your advice, actually it has the same effect as the temporary solution i mentioned above, but it was worth trying it.
are you using GNOME-desktop?
i heard that it is a GNOME issue, not KDE, but i cannot confirm this.
In the mean-time, i installed and configured Fluxbox for my live-video-performances, its a great, very light window-manager,, after login you count not even 1 second and your desktop is ONLINE!
It does not work with compiz but is lightning fast and no problems with second xscreen, of course. so for now i go like this:
-GNOME-environment for daily use and watch tv in same conditions like you described, FLUXBOX for serious stuff.
it is a pitty that nobody seems to care about keyboard access to second xscreen under GNOME/Compiz/Emerald... i cannot believe that you and me are the only nurds complaining about this!
bye

huiii (a00ps) wrote :

PS: i discoverd that my little script above does not work so well, it is one of my first bash scripts :) so...

marriouss (marriouss) wrote :

Yes, I use GNOME (ubuntu).
I have noticed that the keyboard seem to be "claimed" by one of the screens. So, if initially is claimed by the first screen, when I'm making the smplayer fullscreen, then the second screen claims the keyboard. Until then (until making the smplayer window fullscreen), even if the mouse is on the second screen and I click on a window on the second screen, any keyboard input is still sent to the first screen.

Another thing: the fullscreen thing doesn't work on totem player, but works with vlc and smplayer (that uses qt, so it is for KDE).

i'm sure this is a bug, the keyboard should not be claimed. and the
other bug is that nobody who uses compiz on gnome seems to use keyboard
on second xscreen .. :)
but to be sure: your keyboard works on second xscreen when compiz disabled?
perhaps we should spam our bug-report to attract some attention on
similiar bug-reports... 0_O

marriouss wrote:
> Yes, I use GNOME (ubuntu).
> I have noticed that the keyboard seem to be "claimed" by one of the screens. So, if initially is claimed by the first screen, when I'm making the smplayer fullscreen, then the second screen claims the keyboard. Until then (until making the smplayer window fullscreen), even if the mouse is on the second screen and I click on a window on the second screen, any keyboard input is still sent to the first screen.
>
> Another thing: the fullscreen thing doesn't work on totem player, but
> works with vlc and smplayer (that uses qt, so it is for KDE).
>
>

marriouss (marriouss) wrote :

I'm sure that my keyboard works fine with compiz enabled on both screens, but as some other users, in this case, I experience some issues on the first screen like: slow menus, slow restore of windows (unminimize).
Just like: http://ohioloco.ubuntuforums.org/showthread.php?t=536045, only that my problem is on screen A :)
Also: https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/149764 ( you already know about this one :) ).

I'll have to check without compiz and see what happens.

marriouss (marriouss) wrote :

With compiz disabled (Visual effects set to none from the first screen) everything works great - it is enough to move the mouse to a screen to make the keyboard input to be sent to that screen.

If I enable compiz back using Appearance->Visual Effects on the first screen (on the second it remains disabled due to the --only-current-screen option), then the keyboard works well on both screens with only one difference to the ways it behaves when compiz is disabled: I have to actuali click on a screen to make it "active" for the keyboard input. Also, I have window title bars on the second screen after this.

So my guess is that is something wrong with the compiz start-up script. I've noticed that, /usr/bin/compiz, actually first starts the decorator and at the end launches compiz and not the other way around - the way we used to start compiz before gutsy. This may be the correct way (the gutsy way), but I've noticed that the old start-up way allows me to type a command in the terminal on the second screen (Applications->Accessories->Terminal).

marriouss (marriouss) wrote :

Fix: To make compiz work fine with dual head on Hardy

1. Create compiz-dual.sh script that looks like:

for screenName in :0.0 :0.1 :1.0 :1.1
do
    xdpyinfo -display $screenName > /dev/null 2>&1
    if [ $? -eq 0 ]
    then
        DISPLAY=$screenName compiz --only-current-screen &
        sleep 3
        # DISPLAY=$screenName avant-window-navigator &
    fi
done

Add execute flag to this script: chmod +x compiz-dual.sh
What this script basically does is running separate compiz sessions for each screen. The AWN start is optional (if you need AWN to start on each screen then remove the # from the script above).
xdpyinfo command tells if a screen is available.

2. Add compiz-dual.sh to Gnome startup (System->Preferences->Sessions)

3. Disable visual efects: Appearance->Visual effects - Set to None.

Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10?

Changed in compiz:
importance: Undecided → Low
status: New → Incomplete
Pedro Villavicencio (pedro) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to New. Thanks again!.

Changed in compiz:
status: Incomplete → Invalid
marriouss (marriouss) wrote :

Hi all,

I've upgraded to ubuntu 8.10 and compiz seems to be working very well on both screen.
For the moment, you can mark this bug as fixed.

Thank you all,
Marriouss

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers