Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Multimedia & Video
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Multimedia & Video
Have multimedia question? ATI, Nvidia, Sound cards. Just ask here.

 
Thread Tools Display Modes
Old April 27th, 2007   #1
mvsjes2
Just Give Me the Beans!
 
Join Date: Jun 2006
Beans: 58
Enabling lirc mouse in X11

I'm trying to enable my remote control to emulate a mouse in X11. I'm very close but can't get around the last problem.

The problem is (from xorg log):
(**) Option "Protocol" "IntelliMouse"
(**) Remote: Device: "/dev/lircm"
(**) Remote: Protocol: "IntelliMouse"
(**) Option "SendCoreEvents"
(**) Remote: always reports core events
(**) Option "Device" "/dev/lircm"
(EE) xf86OpenSerial: Cannot open device /dev/lircm
No such file or directory.
(EE) Remote: cannot open input device
(EE) PreInit failed for input device "Remote"
(II) UnloadModule: "mouse"

xorg does accept my definitions:
(==) ServerLayout "DualLayout"
(**) |-->Screen "Monitor Screen" (0)
(**) | |-->Monitor "DELL M992"
(**) | |-->Device "Video Port 0"
(**) |-->Screen "TV Screen" (1)
(**) | |-->Monitor "Toshiba TV"
(**) | |-->Device "Video Port 1"
(**) |-->Input Device "Keyboard"
(**) |-->Input Device "Mouse"
(**) |-->Input Device "Remote"

lircmd is running and the device is there:
sh-3.2$ ps -e | grep lirc
4929 ? 00:00:00 lircd
4931 ? 00:00:00 lircmd
5389 ? 00:00:00 lircrcd
5458 ? 00:00:00 lircrcd

sh-3.2$ ls -l /dev | grep lirc
drwxr-xr-x 2 root root 60 2007-04-27 20:13 lirc
srw-rw-rw- 1 root root 0 2007-04-27 20:14 lircd
prw-r--r-- 1 root root 0 2007-04-27 20:15 lircm

Is this a timing problem? Is X coming up before lircmd is started?

Any suggestions?
mvsjes2 is offline   Reply With Quote
Old June 6th, 2007   #2
mvsjes2
Just Give Me the Beans!
 
Join Date: Jun 2006
Beans: 58
Re: Enabling lirc mouse in X11

I fixed this by:
sudo update-rc.d -f lirc remove
sudo update-rc.d lirc start 50 S .
so that lirc initializes before X.

Was this the correct solution? Is there a better way to solve it? Should I report this as a bug?
mvsjes2 is offline   Reply With Quote
Old June 18th, 2007   #3
brazzmonkey
Gee! These Aren't Roasted!
 
brazzmonkey's Avatar
 
Join Date: Dec 2006
Location: around here
Beans: 194
Send a message via MSN to brazzmonkey Send a message via Yahoo to brazzmonkey Send a message via Skype™ to brazzmonkey
Re: Enabling lirc mouse in X11

yes, i guess this is some sort of bug... i've got similar lirc behaviour : it works fine once i restart X.
(personal) curiosity, could you please post your xorg.conf and any other relevant file ? i can't figure out how to get my remote control act as a mouse, though it seems to be properly detected.
thanks.
__________________
Kubuntu on ACER Aspire 9800 series laptop (9814 WKMi)
My Kubuntu KDM themes

what goes up must come down...
brazzmonkey is offline   Reply With Quote
Old June 18th, 2007   #4
mvsjes2
Just Give Me the Beans!
 
Join Date: Jun 2006
Beans: 58
Re: Enabling lirc mouse in X11

It tunrs out I used a script that I wrote a while ago to install lirc, and part of it was to start it too late in the process. I thought the lirc install had done that, not me. I'm not sure if there's an "approved" position for starting lirc, but the above works for me.

Code:
# xorg.conf for dual head dell m992 and toshiba tv

# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
    FontPath        "/usr/share/fonts/X11/misc"
    FontPath        "/usr/share/fonts/X11/cyrillic"
    FontPath        "/usr/share/fonts/X11/100dpi/:unscaled"
    FontPath        "/usr/share/fonts/X11/75dpi/:unscaled"
    FontPath        "/usr/share/fonts/X11/Type1"
    FontPath        "/usr/share/fonts/X11/100dpi"
    FontPath        "/usr/share/fonts/X11/75dpi"
    FontPath        "/usr/share/fonts/X11/misc"
    FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
    Load           "i2c"
    Load           "bitmap"
    Load           "ddc"
    Load           "extmod"
    Load           "freetype"
    Load           "glx"
    Load           "int10"
    Load           "type1"
    Load           "vbe"
EndSection

Section "InputDevice"
    Identifier     "Keyboard"
    Driver         "kbd"
    Option         "CoreKeyboard"
    Option         "XkbRules" "xorg"
    Option         "XkbLayout" "us"
EndSection

Section "InputDevice"
    Identifier     "Mouse"
    Driver         "mouse"
    Option         "CorePointer"
    Option         "Device" "/dev/input/mice"
    Option         "Protocol" "ExplorerPS/2"
    Option         "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
    Identifier     "Remote"
    Driver         "mouse"
    Option         "Device" "/dev/lircm"
    Option         "Protocol" "IntelliMouse"
    Option         "SendCoreEvents"
    Option         "Buttons" "5"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
    Identifier     "DELL M992"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Toshiba TV"
    VendorName     "Toshiba"
    ModelName      "30HF84"
    DisplaySize     665    385
    HorizSync       14.0 - 46.0
    VertRefresh     56.0 - 61.0
              #Modename    clock  horizontal timing  vertical timing
   #Modeline "1280x720@60" 74.25 1280 1312 1592 1624 720 735 742 757
    Modeline "1280x720@60" 75.25 1280 1320 1600 1624 720 735 742 757
EndSection

Section "Device"
    Identifier     "Video Port 0"
    Driver         "nvidia"
    BusID          "PCI:7:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Video Port 1"
    Driver         "nvidia"
    BusID          "PCI:7:0:0"
    Screen          1
EndSection

Section "Screen"
    Identifier     "Monitor Screen"
    Device         "Video Port 0"
    Monitor        "DELL M992"
    DefaultDepth    24
    Option         "RenderAccel" "true"
    SubSection     "Display"
        Depth       24
#        Modes     "1280x1024" "1024x768" "800x600" "640x480"
        Modes      "1024x768" "800x600"
    EndSubSection
EndSection

Section "Screen"
    Identifier     "TV Screen"
    Device         "Video Port 1"
    Monitor        "Toshiba TV"
    Option         "UseEDID" "False"
    DefaultDepth    24
    SubSection     "Display"
        Viewport    0 0
        Depth       24
        Modes      "1280x720@60" "1280x720_60"
    EndSubSection
EndSection

Section "ServerLayout"
    Identifier     "DualLayout"
    Screen      0  "Monitor Screen" 0 0
    Screen      1  "TV Screen" RightOf "Monitor Screen"
    InputDevice    "Keyboard"
    InputDevice    "Mouse"
    InputDevice    "Remote"
EndSection

Section "Extensions"
    Option         "Composite" "Disable"
EndSection
/etc/lirc/lircmd
Code:
# 
# lircmd config file
# 

PROTOCOL IntelliMouse

# ACCELERATOR start max multiplier

ACCELERATOR 2 30 5

ACTIVATE * Clear

MOVE_N  * 2
MOVE_NE * 3
MOVE_E  * 6
MOVE_SE * 9
MOVE_S  * 8
MOVE_SW * 7
MOVE_W  * 4
MOVE_NW * 1
MOVE_IN * ChanUp
MOVE_OUT * ChanDown

BUTTON1_TOGGLE * OK
BUTTON2_TOGGLE * Down
BUTTON3_TOGGLE * Home

BUTTON1_CLICK * 5
BUTTON2_CLICK * Star
BUTTON3_CLICK * Hash

# BUTTONx_CLICK, BUTTONx_UP, BUTTONx_DOWN are also possible
In this config I enter the "Clear" button on my remote to switch to X11 lirc mouse mode.

Last edited by mvsjes2; June 18th, 2007 at 07:50 PM.. Reason: Claification
mvsjes2 is offline   Reply With Quote
Old June 19th, 2007   #5
brazzmonkey
Gee! These Aren't Roasted!
 
brazzmonkey's Avatar
 
Join Date: Dec 2006
Location: around here
Beans: 194
Send a message via MSN to brazzmonkey Send a message via Yahoo to brazzmonkey Send a message via Skype™ to brazzmonkey
Re: Enabling lirc mouse in X11

thanks a lot, that actually helped me (i don't have so many button on my RC, so i had to tweak lircmd a bit).
what does your trick actually does ? make lirc start at runlevels S, 0 and 5 ?
__________________
Kubuntu on ACER Aspire 9800 series laptop (9814 WKMi)
My Kubuntu KDM themes

what goes up must come down...
brazzmonkey is offline   Reply With Quote
Old June 19th, 2007   #6
mvsjes2
Just Give Me the Beans!
 
Join Date: Jun 2006
Beans: 58
Re: Enabling lirc mouse in X11

I starts lirc as part of system initialization. Instead of starting it in a specific run level, it starts it in /etc/rcS.d.

Glad I could help a bit.
mvsjes2 is offline   Reply With Quote
Old June 19th, 2007   #7
brazzmonkey
Gee! These Aren't Roasted!
 
brazzmonkey's Avatar
 
Join Date: Dec 2006
Location: around here
Beans: 194
Send a message via MSN to brazzmonkey Send a message via Yahoo to brazzmonkey Send a message via Skype™ to brazzmonkey
Re: Enabling lirc mouse in X11

Quote:
Originally Posted by mvsjes2 View Post
I starts lirc as part of system initialization. Instead of starting it in a specific run level, it starts it in /etc/rcS.d.
ok, so that's basically what i did using sysv-rc-conf.
thanks again.
__________________
Kubuntu on ACER Aspire 9800 series laptop (9814 WKMi)
My Kubuntu KDM themes

what goes up must come down...
brazzmonkey is offline   Reply With Quote
Old June 19th, 2007   #8
brazzmonkey
Gee! These Aren't Roasted!
 
brazzmonkey's Avatar
 
Join Date: Dec 2006
Location: around here
Beans: 194
Send a message via MSN to brazzmonkey Send a message via Yahoo to brazzmonkey Send a message via Skype™ to brazzmonkey
Re: Enabling lirc mouse in X11

Quote:
Originally Posted by mvsjes2 View Post
I starts lirc as part of system initialization. Instead of starting it in a specific run level, it starts it in /etc/rcS.d.
this does not work for me. i still have to manually launch sudo /etc/init.d/lirc start so that i'm able to use my RC in KDE.
__________________
Kubuntu on ACER Aspire 9800 series laptop (9814 WKMi)
My Kubuntu KDM themes

what goes up must come down...
brazzmonkey is offline   Reply With Quote
Old June 19th, 2007   #9
mvsjes2
Just Give Me the Beans!
 
Join Date: Jun 2006
Beans: 58
Re: Enabling lirc mouse in X11

cd /etc/rcS.d
ls -l | grep lirc

You should see something like "S50lirc -> ../init.d/lirc". This will confirm that you are asking for it to be started when you start your system. Make sure its startup is before the x11-common script.

If you don't see lirc in that library, try entering the commands above and see if that fixes it.
mvsjes2 is offline   Reply With Quote
Old June 20th, 2007   #10
brazzmonkey
Gee! These Aren't Roasted!
 
brazzmonkey's Avatar
 
Join Date: Dec 2006
Location: around here
Beans: 194
Send a message via MSN to brazzmonkey Send a message via Yahoo to brazzmonkey Send a message via Skype™ to brazzmonkey
Re: Enabling lirc mouse in X11

i get :
Code:
$ ls -l | grep lirc
lrwxrwxrwx 1 root root  14 2007-06-19 22:21 S81lirc -> ../init.d/lirc
so it seems it actually start after X11.
now, when i run your commands, i get
Code:
$ sudo update-rc.d lirc start 50 S
update-rc.d: error: expected runlevel [0-9S] (did you forget "." ?)
usage: update-rc.d [-n] [-f] <basename> remove
       update-rc.d [-n] <basename> defaults|multiuser [NN | sNN kNN]
       update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
                -n: not really
                -f: force
is there a typo or something ??
__________________
Kubuntu on ACER Aspire 9800 series laptop (9814 WKMi)
My Kubuntu KDM themes

what goes up must come down...
brazzmonkey is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:44 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry