WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Help with graphics drivers / Xorg  (Read 10224 times)

Offline core.dump

  • Jr. Member
  • **
  • Posts: 50
Re: Help with graphics drivers / Xorg
« Reply #15 on: March 15, 2020, 06:52:44 PM »
Hi core.dump
No, it doesn't work even in terminal. This problem is very annoying... just like mouse buttons that don't swap  >:(
We are talking about something like  aterm  or  xterm  under X, not in console mode.  numlockx  only works under X.
In fact. I use aterm, and it doesn't work.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11581
Re: Help with graphics drivers / Xorg
« Reply #16 on: March 15, 2020, 07:06:59 PM »
Hi core.dump
After running  numlockx on  do any errors show up in  dmesg:
Code: [Select]
dmesg | tail -n 25
If you run:
Code: [Select]
ldd /usr/local/bin/numlockxdo any of the lines returned say  not found?

Offline core.dump

  • Jr. Member
  • **
  • Posts: 50
Re: Help with graphics drivers / Xorg
« Reply #17 on: March 15, 2020, 07:14:32 PM »
Hi Rich,
this is what I get:
Code: [Select]
tc@box:~$ ldd /usr/local/bin/numlockx
        linux-vdso.so.1 (0x00007ffca29ce000)
        libXtst.so.6 => /usr/local/lib/libXtst.so.6 (0x00007efec0b6f000)
        libXext.so.6 => /usr/local/lib/libXext.so.6 (0x00007efec0b5d000)
        libX11.so.6 => /usr/local/lib/libX11.so.6 (0x00007efec0a3f000)
        libc.so.6 => /lib/libc.so.6 (0x00007efec08be000)
        libXi.so.6 => /usr/local/lib/libXi.so.6 (0x00007efec08ad000)
        libxcb.so.1 => /usr/local/lib/libxcb.so.1 (0x00007efec0887000)
        libXau.so.6 => /usr/local/lib/libXau.so.6 (0x00007efec0880000)
        libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x00007efec0878000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007efec0873000)
        /lib/ld-linux-x86-64.so.2 (0x00007efec0d81000)
tc@box:~$

As for dmesg, it doesn't return any numlockx-related message  :-\

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11581
Re: Help with graphics drivers / Xorg
« Reply #18 on: March 15, 2020, 07:32:52 PM »
Hi core.dump
I think I found an answer, though it won't be the one you want to hear:
Quote
... the current numlockx works as expected as long as I boot into an Xorg. Not helpful I know. If I boot into Xfbdev, numlockx has no effect. ...
Found here:
http://forum.tinycorelinux.net/index.php/topic,18751.msg114906.html#msg114906

Offline core.dump

  • Jr. Member
  • **
  • Posts: 50
Re: Help with graphics drivers / Xorg
« Reply #19 on: March 16, 2020, 11:17:33 AM »
Great  :(
OK, let's pretend it's not that important.

Any ideas for making mouse buttons swap? I looked around for a solution but didn't find anything, tried to manually edit ~/.mouse_config with no success, and the (poor) Xfbdev documentation out there doesn't help me.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11581
Re: Help with graphics drivers / Xorg
« Reply #20 on: March 16, 2020, 01:06:53 PM »
Hi core.dump
If you enter this while X is running:
Code: [Select]
xmodmap -e 'pointer = 3 2 1 4 5'Does it swap your mouse buttons or return any errors?

Offline core.dump

  • Jr. Member
  • **
  • Posts: 50
Re: Help with graphics drivers / Xorg
« Reply #21 on: March 16, 2020, 03:03:00 PM »
Hi core.dump
If you enter this while X is running:
Code: [Select]
xmodmap -e 'pointer = 3 2 1 4 5'Does it swap your mouse buttons or return any errors?

No, it doesn't swap, but returns no error. Maybe Xfbdev doesn't support this feature...?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11581
Re: Help with graphics drivers / Xorg
« Reply #22 on: March 16, 2020, 10:49:53 PM »
Hi core.dump
I can't really find anything about using  xmodmap  with  Xfbdev .

If you want to try something, I put together a program to swap the buttons. It reads  /dev/input/mouse0 , swaps buttons if one is
pressed, and writes it to a FIFO called  /tmp/MouseSwap.  When  Xfbdev  is started, use the  -mouse  option to tell it the FIFO is
the mouse device.

If you want to try it, first verify your mouse is  /dev/input/mouse0:
Code: [Select]
sudo cat /dev/input/mouse0You should see garbage appear as you move the mouse. Hit  Ctrl-C  to stop it. If you got no response, we first need to figure
out which device is your mouse.

If your mouse is  /dev/input/mouse0  you can build the program:
Code: [Select]
mkdir Mouse
cd Mouse
# Download the attached file into this directory.
tce-load -w compiletc sstrip
tce-load -i compiletc sstrip
gcc -flto -mtune=generic -Os -pipe -Wall -fno-plt MouseSwap.c -o MouseSwap -Wl,-T/usr/local/lib/ldscripts/elf_x86_64.xbn

The first line in your  .xsession  file should look similar to this:
Code: [Select]
/usr/local/bin/Xfbdev -nolisten tcp &
Change it so it first starts  MouseSwap.  Add the  -mouse /tmp/MouseSwap,3  option to the  Xfbdev  command.
Code: [Select]
/home/tc/Mouse/MouseSwap &
/usr/local/bin/Xfbdev -mouse /tmp/MouseSwap,3 -nolisten tcp &

Now click the  Exit  icon (or select exit in the desktop menu) and select  Exit to Prompt.  Then  startx  and see if mouse works
and has its buttons swapped.
« Last Edit: March 17, 2020, 01:17:22 AM by Rich »

Offline core.dump

  • Jr. Member
  • **
  • Posts: 50
Re: Help with graphics drivers / Xorg
« Reply #23 on: March 17, 2020, 12:04:01 PM »
I have tried many times without results. I noticed that whatever I specify on the line sudo cat/dev/input/mouse0 in place of mouse0, nothing changes. The same for first line in .xsession.

Well, I've had enough of xfbdev, too many problems. I'm planning on moving to Xorg (in spite of myself).

Anyway, thanks for all your support.  :)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11581
Re: Help with graphics drivers / Xorg
« Reply #24 on: March 17, 2020, 12:21:25 PM »
Hi core.dump
It's possible your mouse isn't listed as  /dev/input/mouse0.  We can try to find your mouse if you post the output of:
Code: [Select]
ls -l /dev/inputand
Code: [Select]
cat /proc/bus/input/devices

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11581
Re: Help with graphics drivers / Xorg
« Reply #25 on: March 17, 2020, 12:28:37 PM »
Hi core.dump
By the way, I did run  Xfbdev  with the  -mouse /tmp/MouseSwap,3  to confirm it was getting mouse data from my program.

Offline core.dump

  • Jr. Member
  • **
  • Posts: 50
Re: Help with graphics drivers / Xorg
« Reply #26 on: March 18, 2020, 06:13:14 AM »
Thanks a lot, Rich. Although the mouse problem could be solved, I have had many other problems, including (but not limited to) installing Virtualbox, dual monitor support and other things that work perfectly well in Xorg instead.

I've already switched to Xorg, so we can leave this behind. Thank you so much for your assistance and sorry for the waste of time.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11581
Re: Help with graphics drivers / Xorg
« Reply #27 on: March 18, 2020, 09:16:13 AM »
Hi core.dump
... Thank you so much for your assistance and sorry for the waste of time.
You are welcome. and I didn't consider it a waste of time. I cobbled up some proof of concept code that showed you could slip
another program into the data path between the mouse and the X server.