Patchwork [2/3] x11-common: Change drive mode of Xfbdev when xserver using framebuffer

login
register
mail settings
Submitter Xiaofeng Yan
Date Dec. 16, 2011, 9:15 a.m.
Message ID <c028203a732e19a12804c479dfcdbf7f61b75767.1324025415.git.xiaofeng.yan@windriver.com>
Download mbox | patch
Permalink /patch/17109/
State New
Headers show

Comments

Xiaofeng Yan - Dec. 16, 2011, 9:15 a.m.
From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

The previous mode of starting X is as follow:
$Xfbdev :0 -keybd keyboard -mouse tslib
This mode cause that some keys can't be mapped rightly. \
for example "Down" have the same function with "Enter".

another drive mode "evdev" can work rightly in new version.
$Xfbdev :0 -keybd evdev,,device=/dev/input/event0 -mouse tslib

So I select drive mode "evdev".

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 .../x11-common/x11-common/etc/X11/Xserver          |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Saul Wold - Dec. 22, 2011, 7:14 p.m.
On 12/16/2011 01:15 AM, Xiaofeng Yan wrote:
> From: Xiaofeng Yan<xiaofeng.yan@windriver.com>
>
> The previous mode of starting X is as follow:
> $Xfbdev :0 -keybd keyboard -mouse tslib
> This mode cause that some keys can't be mapped rightly. \
> for example "Down" have the same function with "Enter".
>
> another drive mode "evdev" can work rightly in new version.
> $Xfbdev :0 -keybd evdev,,device=/dev/input/event0 -mouse tslib
>
> So I select drive mode "evdev".
>
> Signed-off-by: Xiaofeng Yan<xiaofeng.yan@windriver.com>
> ---
>   .../x11-common/x11-common/etc/X11/Xserver          |    4 +++-
>   1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
> index 57923e6..d1e17fb 100644
> --- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
> +++ b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
> @@ -28,11 +28,13 @@ module_id() {
>
>   ARGS=" -br -pn"
>
> +KD_DRIVE_KEYBOARD="-keybd keyboard"
> +KD_DRIVE_EVDEV="-keybd evdev,,device=/dev/input/keyboard0"
Not sure it's such a good idea to hard code the /dev here.

>   if [ "$XSERVER" != "/usr/bin/Xorg" ]; then
>
>           . /etc/formfactor/config
>
> -        ARGS="$ARGS -keybd keyboard"
> +        ARGS="$ARGS $KD_DRIVE_EVDEV"
>
>           # use usb mouse if present
>           if [ -z "$TSLIB_TSDEVICE" ]&&  [ -e /dev/input/mice ]; then
Xiaofeng Yan - Dec. 23, 2011, 7:07 a.m.
On 2011?12?23? 03:14, Saul Wold wrote:
> On 12/16/2011 01:15 AM, Xiaofeng Yan wrote:
>> From: Xiaofeng Yan<xiaofeng.yan@windriver.com>
>>
>> The previous mode of starting X is as follow:
>> $Xfbdev :0 -keybd keyboard -mouse tslib
>> This mode cause that some keys can't be mapped rightly. \
>> for example "Down" have the same function with "Enter".
>>
>> another drive mode "evdev" can work rightly in new version.
>> $Xfbdev :0 -keybd evdev,,device=/dev/input/event0 -mouse tslib
>>
>> So I select drive mode "evdev".
>>
>> Signed-off-by: Xiaofeng Yan<xiaofeng.yan@windriver.com>
>> ---
>> .../x11-common/x11-common/etc/X11/Xserver | 4 +++-
>> 1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git 
>> a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver 
>> b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
>> index 57923e6..d1e17fb 100644
>> --- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
>> +++ b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
>> @@ -28,11 +28,13 @@ module_id() {
>>
>> ARGS=" -br -pn"
>>
>> +KD_DRIVE_KEYBOARD="-keybd keyboard"
>> +KD_DRIVE_EVDEV="-keybd evdev,,device=/dev/input/keyboard0"
> Not sure it's such a good idea to hard code the /dev here.
I use "udev" to recognize keyboard device from "event*" automatically.

Patch

diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
index 57923e6..d1e17fb 100644
--- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
+++ b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
@@ -28,11 +28,13 @@  module_id() {
 
 ARGS=" -br -pn"
 
+KD_DRIVE_KEYBOARD="-keybd keyboard"
+KD_DRIVE_EVDEV="-keybd evdev,,device=/dev/input/keyboard0"
 if [ "$XSERVER" != "/usr/bin/Xorg" ]; then
 
         . /etc/formfactor/config
 
-        ARGS="$ARGS -keybd keyboard"
+        ARGS="$ARGS $KD_DRIVE_EVDEV"
 
         # use usb mouse if present
         if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/input/mice ]; then