LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Manjaro
User Name
Password
Manjaro This forum is for the discussion of Manjaro Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 10-03-2021, 05:59 AM   #1
Leviathan42
Member
 
Registered: Dec 2019
Distribution: Manjaro
Posts: 51

Rep: Reputation: Disabled
Trouble installing bbswitch-monitor [AUR]


I've installed bbswitch-monitor from AUR and as the github page says, you need to activate it using
Code:
systemctl --user enable bbswitch-monitor
but when running this command, i get
Code:
Unit /etc/xdg/systemd/user/bbswitch-monitor.service is added as a dependency to a non-existent unit graphical.target.
and it wont run after boot. Can anyone help me?
 
Old 10-03-2021, 06:17 AM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,828
Blog Entries: 1

Rep: Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069
Do you have any display manager installed and enabled?
 
Old 10-03-2021, 06:50 AM   #3
Leviathan42
Member
 
Registered: Dec 2019
Distribution: Manjaro
Posts: 51

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
Do you have any display manager installed and enabled?
I use KDE/SDDM
 
Old 10-03-2021, 11:33 PM   #4
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,828
Blog Entries: 1

Rep: Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069
You might try reinstalling SDDM. If it doesn't work, try switching to LightDM or XDM. Graphical.target is systemd standard equipment. Have you disabled or masked it?
 
Old 10-04-2021, 03:01 AM   #5
Leviathan42
Member
 
Registered: Dec 2019
Distribution: Manjaro
Posts: 51

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
You might try reinstalling SDDM. If it doesn't work, try switching to LightDM or XDM. Graphical.target is systemd standard equipment. Have you disabled or masked it?
No, havent done anything but switching themes and stuff. Reinstalling didnt help. Still the same error.
 
Old 10-04-2021, 10:54 AM   #6
Leviathan42
Member
 
Registered: Dec 2019
Distribution: Manjaro
Posts: 51

Original Poster
Rep: Reputation: Disabled
Now it gets weird:

systemctl list-units --type=target returns
Code:
UNIT                LOAD   ACTIVE SUB    DESCRIPTION                             
  basic.target        loaded active active Basic System
  bluetooth.target    loaded active active Bluetooth Support
  cryptsetup.target   loaded active active Local Encrypted Volumes
  getty.target        loaded active active Login Prompts
  graphical.target    loaded active active Graphical Interface
  local-fs-pre.target loaded active active Preparation for Local File Systems
  local-fs.target     loaded active active Local File Systems
  multi-user.target   loaded active active Multi-User System
  network.target      loaded active active Network
  nss-lookup.target   loaded active active Host and Network Name Lookups
  paths.target        loaded active active Path Units
  remote-fs.target    loaded active active Remote File Systems
  slices.target       loaded active active Slice Units
  sockets.target      loaded active active Socket Units
  sound.target        loaded active active Sound Card
  swap.target         loaded active active Swaps
  sysinit.target      loaded active active System Initialization
  time-set.target     loaded active active System Time Set
  timers.target       loaded active active Timer Units
  veritysetup.target  loaded active active Local Verity Integrity Protected Volumes

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
20 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
So graphical.target is there and active but i still get this error. WTF!!!!!
 
Old 10-04-2021, 11:29 AM   #7
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,828
Blog Entries: 1

Rep: Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069
I'd find the maintainer's email address in the changelog and report to him about this.
 
Old 10-04-2021, 11:43 AM   #8
Leviathan42
Member
 
Registered: Dec 2019
Distribution: Manjaro
Posts: 51

Original Poster
Rep: Reputation: Disabled
The AUR repo has gone and the Github link returns 404. It has been up and working less than 48 hours ago. :O

Last edited by Leviathan42; 10-04-2021 at 11:51 AM.
 
Old 10-04-2021, 11:53 PM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Indeed it is.

If you still want to get to the bottom of this:
  • I can see that "systemctl --user list-units --type=target" gives fewer results. Maybe has something to do with it.
  • If you didn't remove it yet, you could show us the offending .service file, the PKGBUILD and any additional installation instructions.

That said, bbswitch-monitor described itself thusly:
Quote:
This is a simple applet built with Qt to monitor external GPU status, whether it's ON or OFF by querying /proc/acpi/bbswitch
That means you could probably recreate its functionality fairly easily with a quick'n'dirty shell script "daemon".
 
Old 10-05-2021, 02:27 AM   #10
Leviathan42
Member
 
Registered: Dec 2019
Distribution: Manjaro
Posts: 51

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
If you still want to get to the bottom of this:
  • I can see that "systemctl --user list-units --type=target" gives fewer results.
systemctl --user list unity --type=target gives me
Code:
  UNIT           LOAD   ACTIVE SUB    DESCRIPTION     
  basic.target   loaded active active Basic System
  default.target loaded active active Main User Target
  paths.target   loaded active active Paths
  sockets.target loaded active active Sockets
  timers.target  loaded active active Timers

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
5 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
now graphical.target is not listed
Quote:
Originally Posted by ondoho View Post
If you didn't remove it yet
It is still there
Quote:
Originally Posted by ondoho View Post
you could show us the offending .service file
Code:
[Unit]
Description=System tray icon to monitor external GPU on/off status with Bumblebee

[Service]
Type=simple

ExecStart=bbswitch-monitor
Restart=always

[Install]
WantedBy=graphical.target
Quote:
Originally Posted by ondoho View Post
the PKGBUILD and any additional installation instructions.
there is no PKGBUILD but only a "desc", "files" and "mtree" archive with "mtree.uncompressed" inside

desc:
Code:
%NAME%
bbswitch-monitor

%VERSION%
0.1.2-1

%BASE%
bbswitch-monitor

%DESC%
System tray icon to monitor external GPU on/off status with Bumblebee

%URL%
https://github.com/MicroDroid/bbswitch-monitor

%ARCH%
x86_64

%BUILDDATE%
1633258598

%INSTALLDATE%
1633258605

%PACKAGER%
Unknown Packager

%SIZE%
35007

%LICENSE%
MIT

%VALIDATION%
none

%DEPENDS%
bbswitch

%PROVIDES%
bbswitch-monitor
files:
Code:
%FILES%
etc/
etc/systemd/
etc/systemd/user/
etc/systemd/user/bbswitch-monitor.service
usr/
usr/local/
usr/local/bin/
usr/local/bin/bbswitch-monitor
and mtree.uncompressed
Code:
#mtree
/set type=file uid=0 gid=0 mode=644
./.BUILDINFO time=1633258598.0 size=40907 md5digest=b3054c637b07bf4e37a6ed85886f4e80 sha256digest=73f463674a8441c8f2cc139a21d534ca36ecdce3cb9a305097b5e74f2204d7bf
./.PKGINFO time=1633258598.0 size=441 md5digest=354915ae8da223306644e34b092a99f1 sha256digest=020385c963093a0f380942cb5b327ebb8d323da284d3aafd447776e4308e0f12
./etc time=1633258598.0 mode=755 type=dir
./etc/systemd time=1633258598.0 mode=755 type=dir
./etc/systemd/user time=1633258598.0 mode=755 type=dir
./etc/systemd/user/bbswitch-monitor.service time=1633258598.0 size=191 md5digest=ee8aa178e6197f6d6e27fcf5637b213b sha256digest=b51a9ca528b41852f16e2e471d41300b401cf6834fa853453ce0887272556c4a
./usr time=1633258598.0 mode=755 type=dir
./usr/local time=1633258598.0 mode=755 type=dir
./usr/local/bin time=1633258598.0 mode=755 type=dir
./usr/local/bin/bbswitch-monitor time=1633258598.0 mode=755 size=34816 md5digest=9c7e9b62d689f32fba282ef421bd832d sha256digest=90192117a91f76307aec24212a677c4e7cb7bac8109c1046933dce5a4e849b9e
i hope this is some useful information
 
Old 10-05-2021, 08:15 AM   #11
Leviathan42
Member
 
Registered: Dec 2019
Distribution: Manjaro
Posts: 51

Original Poster
Rep: Reputation: Disabled
Found the PKGBUILD:
Code:
# Maintainer: Yousef Sultan <yousef.su.2000@gmail.com>

pkgname=bbswitch-monitor
pkgver=0.1.2
pkgrel=1
pkgdesc="System tray icon to monitor external GPU on/off status with Bumblebee"
arch=('x86_64')
url='https://github.com/MicroDroid/bbswitch-monitor'
provides=('bbswitch-monitor')
license=('MIT')
depends=('bbswitch')
makedepends=('make' 'qt5-base')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/MicroDroid/bbswitch-monitor/archive/v${pkgver}.tar.gz")
sha512sums=('ebee8b42526f038581f25be0d71d94b30c6744b147a93858e3a1f08bd8d25ebc19e9d5a32b31eb19806616ef8a9c513d7d461fa0727548963db4333d8c5be567')

build() {
  mkdir -p "$srcdir/$pkgname-$pkgver/build/"
  cd "$srcdir/$pkgname-$pkgver/build/"
  qmake ../bbswitch-monitor.pro PREFIX=/usr/local
  make VERSION=$pkgver DESTDIR="$pkgdir" PREFIX=/usr/local
}

package() {
  cd "$srcdir/$pkgname-$pkgver/build"

  INSTALL_ROOT="$pkgdir" make VERSION=$pkgver DESTDIR="$pkgdir" PREFIX=/usr/local install

  mkdir -p "$pkgdir/usr/local/bin"
  mkdir -p "$pkgdir/etc/systemd/user"

  echo "${pkgdir}"

  mv "$pkgdir/opt/bbswitch-monitor/bin/bbswitch-monitor" "$pkgdir/usr/local/bin"
  cp "$srcdir/$pkgname-$pkgver/bbswitch-monitor.service" "$pkgdir/etc/systemd/user"

  rm -r "$pkgdir/opt"

  printf "\033[1;33m--- NOTE: Don't forget to run: systemctl --user enable bbswitch-monitor\n"
}
 
Old 10-06-2021, 02:23 PM   #12
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Leviathan42 View Post
now graphical.target is not listed
Yep.

But looking at this:
Code:
[Unit]
Description=System tray icon to monitor external GPU on/off status with Bumblebee

[Service]
Type=simple

ExecStart=bbswitch-monitor
Restart=always

[Install]
WantedBy=graphical.target
I think whoever wrote this service file wanted to execute a little graphical tray utility via systemd. That's not how systemd works, it does not cater to desktop environemnts in this particular way.

It was wise of them to remove the repo, I guess.

If you still want to autostart it you should do it via XDG or in some startup script.
 
Old 10-07-2021, 03:25 AM   #13
Leviathan42
Member
 
Registered: Dec 2019
Distribution: Manjaro
Posts: 51

Original Poster
Rep: Reputation: Disabled
Ok, but how can i do that?
 
Old 10-07-2021, 11:03 PM   #14
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Leviathan42 View Post
Ok, but how can i do that?
By clicking on the link I provided, and then further links in that article.
There's many different methods, even one involving systemd, lol.
I guess at least one of them is already implemented on your system, about which you provided no information at all so far.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
slackpkg complains because two versions of both bbswitch and nvidia-kernel are installed gnw Slackware 3 08-03-2019 12:43 PM
Using bumblebee and bbswitch, discrete video card (Nvidia) is still on by default. me_h Slackware 7 12-11-2016 03:47 AM
DI 15.3 Error message on start bbswitch: No discrete VGA device found heffo_j Linux Deepin 4 11-06-2016 09:19 PM
Bumblebee [Optimus] BBswitch wont load anymore n4rf Linux - General 2 10-09-2015 05:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Manjaro

All times are GMT -5. The time now is 08:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration