Reached Graphical User Interface

No problem at all. Now that we have dealt with the GUI issue, you can move on to resolve the bluetooth keyboard issue. Are you still unable to pair the device?

First of all, please check whether the required kernel modules have been loaded:

$ lsmod | grep "btusb"
$ lsmod | grep "bluetooth"

Bluetooth keyboards usually aren’t too difficult to set up. I recommend starting with the steps described in the following article:

https://wiki.archlinux.org/title/Bluetooth_keyboard

Note, however, that bluez is needed, so please make sure you have it installed.

Think this is loaded?

➜  ~ lsmod | grep "btusb"
btusb                  86016  0
btrtl                  32768  1 btusb
btintel                57344  1 btusb
btbcm                  24576  1 btusb
btmtk                  12288  1 btusb
bluetooth            1114112  6 btrtl,btmtk,btintel,btbcm,btusb
➜  ~ lsmod | grep "bluetooth"
bluetooth            1114112  6 btrtl,btmtk,btintel,btbcm,btusb
ecdh_generic           16384  1 bluetooth
rfkill                 40960  8 iwlmvm,bluetooth,thinkpad_acpi,cfg80211
crc16                  12288  2 bluetooth,ext4

Btw, I had setup the keyboard before, and I use bluetooth earbuds all the time. I got this issue yesterday only.

Yes, they appear to be loaded. Can you try the steps described in the Arch Wiki? If something goes wrong, hopefully, one of those commands will output an error message that can help us diagnose the problem.

Sure will try it, thank you.

Btw, Just to understand my issues a bit better.
Initially I had issue with my bluetooth right, because I could login once I disabled bluetooth service.

After that, I faced issue with the display manager?

How did you login at that time after you disabled the bluetooth service? If you logged in via the TTY after disabling the bluetooth service, then the fact that you were able to login might not have anything to do with the bluetooth service having been disabled at all.

My guess is that the display manager was preventing you from logging into your graphical environment and the bluetooth issue is a different issue, but I could be wrong.

The only thing I did was disabled the bluetooth service with systemctl and changed AutoEnable to false, and rebooted. It did log me in to i3 just with it.

Btw, got the keyboard working! Thanks a ton!

What about now? Are you able to start your graphical session with startx even with the bluetooth service running and AutoEnable set to true?

Let me try, i’ve not rebooted the system after i logged in.

When I reboot, it prompts me to TTY. I had to login, then enter startx. Can this be skipped, so I directly login to i3?


This at the end of .bash_profile should do the job right?

TTY="$(/usr/bin/tty | sed 's:.*/::')"
if [[ ! ${DISPLAY} && ${TERM} == 'linux' && ${TTY} == 'tty1' ]]; then
  unset TTY
  exec startx
fi
unset TTY

Not sure if you really need the sed command. The output of tty is usually a path of the device file (e.g: /dev/tty1). You can just check whether the value of TTY is equals to /dev/tty1.

Similarly, I don’t think you need this as well.

You can also use command substitution instead of assigning the result of the tty command to a shell variable. In doing so, you can eliminate the awkward unset commands in the conditional.

if [ -z ${DISPLAY} ] && [ "$(tty)" = "/dev/tty1" ]
then
     exec startx
fi

Alternatively, you can also do this:

if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
  exec startx
fi
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.