Pages

Showing posts with label compton. Show all posts
Showing posts with label compton. Show all posts

2014-08-16

URxvt, Slackware, Crux = problems

Or - more precisely: Those mentioned in headline WITH Nvidia binary driver AND Compton compositor (and xorgs' version is also a player here).

So the following is obviously about the same thing as in this post - Compton and Nvidia not getting along. But - it's also a slight overview of urxvt.

I installed rxvt-unicode (exec: urxvt) as fun and games and novelty to my new Crux 3.1 (Crux home, my Crux install blah: 3.0 -1, 2, 3 and 3.1) and Slackware 14.1 (and my blah). The outcome was somewhat different in those distros.

But first, what it is this urxvt?
In essence, a terminal born from xrvt, with unicode support. And do a simple search 'rxvt+unicode'. At least two pagefuls give extremely relevant tutorials and stuff. Go.
But, just to mention:
- its' conf is in .Xdefaults (or in .Xresources if going more modern)
- it has transparency in two ways. And colors up to 256.
- it's UTF-8, of course,
- tabs and perl-extensions are configurable, among other things.

- It had lag at bottom of terminal (new-line) in both Crux and Slackware. It didn't wrap lines at all in Slackware.
- Doh.

# CRUX
Only problem: new line at the edge of terminal bottom - a lag of 1-2 seconds.
What I have: Nvidia binary driver 331.xx and compiled compton-master 20140729.
Problem was solved with remade compton start-line in Openbox autostart:
compton --backend glx --vsync opengl-swc --glx-no-rebind --glx-no-stencil --glx-swap-method 3 --unredir-if-possible --paint-on-overlay --shadow-exclude "! name~=''" --config ~/.compton.conf &
Magical part here is '--glx-swap-method 3'. Other is fluff what I think makes my screen look better. There is also option '--backend xr_glx_hybrid' - BUT, that gave me horrible desktop flickering.

# Slackware (and Salix), Nvidia 319.xx and the same Compton as in Crux
Additionally to lag, there was no line-wrap at all (commmand doesn't brake to next line, but acguires '>' and continues from last char...And then also kinda copies whole text to line above of last command. Very bloody confusing and obviously very wrong.
- Compton conf didn't do a thing,
- Compiling everything with Crux defs - no result,
- Copying other terminal-related confs from Crux - no result.
- Means, nothing I tried worked.

So, in Slackware, I ended up installing xfce4-terminal (deps: libxfcegui4, libxfce4util), and - lag disappeared just like that.

# Ah, yes - when digging in confs - as a bonus, I cracked the mystery of 'different looking man-pages for different users' in Crux. Has to have: export PAGER="most" in all .bashrc files. :)

# General notes about urxvt:
If dealing with .Xdefaults (.Xresources)
- might stick in Xft.dpi: 96 there too, it probably makes the console look a little less hairy.
And those -
Xft.hinting:1
Xft.hintstyle:hintfull


- OB autostart - urxvt in daemon mode goes like that: urxvtd -q -o -f &

- browse all possible settings:
urxvt --help 2>&1| sed -n '/:  /s/^ */! URxvt*/gp'

- Transparencies:
# True:
URxvt.depth: 32
URxvt.background: [90]#000000
# native transpency
URxvt*.transparent: true
! URxvt*.shading: 0 to 99 darkens, 101 to 200 lightens
URxvt*.shading: 110

- Scrollbar. Have to define it, have to place it etc:
# scrollbar style - rxvt (default), plain (most compact), next, or xterm
URxvt.scrollstyle: rxvt
# and so on, look it up.


- what icon you want to see in window corner:
URxvt*iconFile: /home/myname/.icons/mytheme/apps/terminal.png

- tabs. Perl-extension thing. Has to be compiled in.
URxvt.perl-ext-common: default,tabbed
URxvt.tabbed.tabbar-fg: 2
URxvt.tabbed.tabbar-bg: 0
URxvt.tabbed.tab-fg: 3
URxvt.tabbed.tab-bg: 0
URxvt.tabbed.new-button: true


# rxvt-unicode is not bad terminal. BUT, if using real Nvidia driver  + Compton + too-new-xorg, it might not be worth the hassle. There are other terminals available - with no config-wrestling.

# PS! Compton + more new Nvidia driver = more likely there are lag-problems... I just downgraded newest 340 to 331 in Crux - as 340 bloody lagged with everything.

2014-04-29

Slackware, Sid, lags + Nvidia 334.21

To make this shortish story a bit longer, let's start with that I clean-installed Slackware-current over my 14.1 ... because after last patches etc it had developed various quirks which annoyed me a bit. And when the choice is between spending x-hours hunting mysterious faults or spending some 3 hours with new and virginal install/rebuild - I'll pick the last one, period.
Install and rebuild were quite uneventful - nothing to whine over ... Maybe of the contrary - some 2-3 bugs with apps in 14.1 had resolved themselves meanwhile. And it helps to have previous install-list of apps, deps and shit.

But when attempting to install (previously used in 14.1 ) binary Nvidia driver 331.49, I had sudden 'unknown libEGL.so' problem, and no install. So I went for the latest beta - 334.21, which installed with no problems.
... Well, week before or so also smxi in my Debian Sid had got the same driver installed (after Xorg update, as the 'current nvidia'). And I had started to experience some lagging with mouse and keyboard. Sorta, occasional 1-2 seconds before slider moved, or mouse click registered or typed letter appeared. Bloody annoying, that! But, frankly, I thought that the culprit is some other critter of myriad of Sids' upgrades - and that it goes away with next bunch.
Now, after I installed the same driver to Slackware - and at once started to experience lags, I sure reconsidered. As an afterthought - it was most probably some kind of not-syncing between this Nvidia driver and Compton compositor.
Anyway, I didn't want to part with Compton, so I downgraded the Nvidia driver - and successfully, despite:

1. Slackware - previous installers' libEGL crap and no install.
I went to runlevel 3, did separate
sh NVIDIA-Linux-x86_64-334.21.run --uninstall
without letting Nvidia to restore previous xorg.conf (no idea if that matters), then slackpkg search mesa && slackpkg reinstall mesa-9.1.7-x86_64-1 to be sure I don't have leftovers from Nvidia (as I heard, Nvidia overwrites some of mesas' files). Then:
sh NVIDIA-Linux-x86_64-319.49.run
with 32bit support and 'yes' to overwrite xorg.conf.
Success, no whining from installer, AND - no more lags!

2. Sid. Not with smxi help this time, but manually:
telinit 1
sh NVIDIA-Linux-x86_64-334.21.run --uninstall

That finished with installers' ominous whine about leftover symlinks. Whatever... I decided also not to bother with mesa and press on and see what happens:
sh NVIDIA-Linux-x86_64-331.49.run
'Yes, do install' - to installers' worry about 'maybe runlevel 1 is not good...'
With 32bit support, 'Yes' to overwrite conf.
Success, and no more lags!

Simpleminded conclusion: If you experience lags (especially after pointless upgrade to latest/greatest Nvidia driver), try downgrading a bit. Beta really was Beta, in my case.

2013-07-08

Salix 14.0 + Openbox

Yeah, doing openboxing a third time, now on Slackware - after Xubuntu and Debian. I was kinda interested how this one might differ... Openbox is not stock for Salix (and Slackware), and Slacks' repos are not as big by far as Debian ones.

As it appeared, installing Openbox itself went quite as usual, with slight differences. But some pre-install preparations almost drove me nuts. Whole process took twice as long as in Debian.

1. Pre-installing things:
Let's start with simple.
- Nitrogen for wallpaper, with slapt. No problems. First I had a plan to use Spacefm as desktop manager (and wallpaper-provider) - but Spacefm somehow prevented Conky from starting.
- Conky, with slapt, no problems.
- Volumeicon, with slapt, no problems.
- copied session-exit-script from my Vsido install, once again. And as later was seen, it worked without a hitch.
- Also installed wmctrl (slapt) and xdotool (from source), without problems.
Now, not so simple things.
- Tint2 - available through Sourcery. Only thing I had to install before was Cmake. Then it compiled and worked... unfortunately it wasn't SVN-version (no launchers). Then I went and took source from Tints' home. Made, installed - and found that it's the same one - no launchers.
After some digging around I found this. The writer, by the way, is the same guy who makes Vsido. So thanks, Vastone, for all good things. Tutorial worked like a charm, and I soon had nice patched SVN version of Tint running, with launchers and all.
- Compton (sweat, blood and tears). Not available in repos at all, have to get the source from Comptons' home and compile. List of dependencies is quite long, as we know...
What was surprising that only missing dep in Salix was libconfig. Even asciidoc was already installed! But the joy was short-lived - libconfig also has to be searched out from web. My first attempt to install it was unsuccessful. Thing appeared to exist, but pkg-config refused to recognize it. And Compton refused to make, citing missing libconfig as a culprit. Apparently I had unwittingly brought home a where-libconfig...
More searching in web and I found other and better place to get it. Differently of the first one, it was already compiled for Slack.
So I only had to run  
sh doinst.sh (and replace user/lib64 in this file with /usr/lib64, otherways it couldn't find folders, as install-package was not in root).
Then I checked, somewhat fearfully:
pkg-config libconfig --libs . It's not there, then
echo $PKG_CONFIG_PATH, and path appears to be wrong (compared where libconfig.pc really is, then
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig (that's my conf, of course). Anyway, after correcting the path, libconfig was found AND Compton was now happy to make and make install too.
As for now, I used exactly the same start conf as in debian install. Works alright, no tearing observed yet.
Edit | When installing libconfig, I was yet such a moron that I didn't know of SlackBuilds... Correct way, of course should have been to run: libconfig.SlackBuild, and then installpkg libconfig...gz. But I leave this example of stupidity to be - as there are some useful hints how to check and correct library paths. Also - there are ready-made binaries available in slakfinder.org :) |

2. Installing OB, a lot less dramatic part:
Main packages for Openbox - openbox and obconf - are available with slapt, as is lxappearance. There are also obmenu and some other helpful stuff to take - but I didn't bother.
slapt-get -i openbox obconf
Logout and login to fresh openbox session.
Right-click menu was bizarre, consisting mostly unexistent items. Those what did exist, refused to open.
Back to Xfce, copy Openbox conf files to .config/openbox, add some quick (real) links to menu, back to Openbox. Now things (real ones) in menu opened ... so, I presume that the first time rebellion was because of lack of confs in user folder.
Still, 90% of this default menu was taken out of thin air. Fancy. I should have used dmenu to generate something more valid. Well, I forgot to install it.
One more surprise was that xfce4-terminal is named as 'Terminal'. Bloody why? Couple of more minutes down to drain when investigating why terminal 'does not exist'...
After that it was usual copy/paste of various confs, fixing this and that, 2 hours lovingly pimping the menu, and removing couple of last unwanted apps. Everything seems fine and working. Checked also .xsession-errors - nothing of interest there too, only gtk stupid deprecation-drivel.
Now, if I happen to finally succeed in compiling Medit, then the situation could be called a bliss.

2013-05-21

Make and install Compton

Compton compositor is a good thing to have when there is no 'native' compositing, ie - you are using something like Lxde or Openbox. Without compositing there tend to be tearing when scrolling in browser or when playing videos.
After installing it - you should also try to get your Comptons' starting parameters correct/fitting. And it's very adviseable to have most current version of Compton (the one that can use glx backend).
Whole process was quite baffling and mysterious for me - and even more baffling was that ultimately the thing worked and tearing disappeared...
For help, advice and tutorials - first look into Comptons' page, then Crunchbang forum and Arch forum + wiki. AND do: 'man compton' somewhere, if possible - it shows all available parameters and their meanings (version of man is also here).

Now to business (Debian Wheezy netinstall + Openbox, Nvidia GTX 560, proprietary drivers).
How I did it:
It's markedly easier in Xubuntu (+Openbox) than in Debian Wheezy Openbox ... Means - you can download & install for Ubuntu using ppa.
sudo add-apt-repository ppa:richardgv/compton - but it doesn't seem to be the latest version. But you can't get Compton from Debian stable repos at all and I am not sure about sid... (Vsido came with Compton - and/but it's oldish).

## How to make and install:
One conversation (about installing) is here. Worthy advice is how to avoid installing asciidoc. Other - to use xcompmgr deps: apt-get build-dep xcompmgr - didn't work for me ... I got zero results. So, no advice...
Anyway, to get real fresh version, you have to download tar, unpack, and make.
There are quite a lot of dependencies. List is here.
Almost all packages have to be with ending '-dev'. AND - as 'm4he' in Crunchbang forum said - do not bother with (last one) asciidoc - it's only for make install. Simply copy 'make'd compton file to /usr/bin/ without make install. Especially if taking account that I have never managed in Debian to 'make docs' (step before 'make install'). The same has  not been problem at all in Slackware - so it's possible alright.
Just as an example, what I had missing (additional deps in brackets): libconfig-dev(3), libdrm-dev(2), libdbus1-dev, and nvidia-support (why?).
Edit, feb 2014 | Happened to install compton in fresh Wheezy netinstall... a lot was missing, of course, and the last one took some googling (write down what you did last time!). Conversely, if you get (Debian!)
... fatal error: GL/glx.h: ...
then this is missing libGL and means: libgl1-mesa-dev
One more thing: If you changed kernel and/or especially Nvidia binary driver, and have now strange artifacts in your desktop (missing pieces, transparencies etc), then recompile your compton. It probably helps. | edit
Then, after getting all deps, 'make' agreed to make... with 4 warnings when finally making it. Most curious is that the result works. Being totally n00b in make-things, I have nothing meaningful to say about those warnings ...
'Errors' usually mean terminated 'make' - and then you have to read-and-understand what might caused it. And then fix it.

## We have now 'compton' executable file in folder where we ran 'make'.
Copy the file to /usr/bin/, test it - type 'compton' in terminal. When shadows appear around windowses, it works. Then add to your autostart:
compton --backend glx --vsync opengl-swc --paint-on-overlay --shadow-exclude "! name~=''" --config ~/.compton.conf &
'shadow-exclude' part goes together with part in .compton.conf
In my case:
# Exclude shadows
shadow-exclude = [ "n:e:Notification", "n:e:Conky" , "g:e:Tint2" ];
shadow-ignore-shaped = true;
Quite simply - this excludes shadows for some (your chosen) objects.
Edit 28.06.2013: If having inactive window transparency is a problem for some app (Gimp!), then add to the same conf file a line:
focus-exclude = [ "g:a:Gimp" ];
and Gimps' various popup-menus doesn't make main window transparent anymore! Other apps can be added here too, comma-separated.
PS! This feature is newish - so your Compton has to be relatively new. Edit ends.

And for good measure - here is my current (March 2013) Xubuntu+Openbox start line (older version of Compton (no glx!), tearing still occurs, but in lesser extent):
compton --paint-on-overlay --dbe --vsync opengl --shadow-exclude "! name~=''" --config ~/.compton.conf &

By the way - some parameters exclude each other - so, when experimenting, start your compton from CLI and see if there are errors.
You shouldn't be surprised if procedure described here does not work for you. Compton is one of those things that has about million advices in web - most of them wrong. Search and try and try again.
PS! Might take a look also here: Salix, Openbox - making Compton there.

2013-04-19

Add Openbox session to Xubuntu

Collected notes and Walkthrough - how I did it.
 
For help and info, excellent places are: Crunchbang forum and Openbox Wiki.

I already had configured / tweaked Xfce side of Xubuntu - so 'restricted extras', Icedtea etc were already installed, as were done other 'first things'.

In Xfce session, open your terminal and type:
sudo apt-get install openbox obconf
Logout and login to new Openbox session.
What you find is black, empty screen. It is like that - so fearlessly right-click on blackness, open terminal and continue:

sudo apt-get install menu
cp /var/lib/openbox/debian-menu.xml ~/.config/openbox/debian-menu.xml
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/menu.xml
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/rc.xml
openbox --reconfigure
# previous part installed debian menu and copied all 
relevant menu files to your home.
# now, install also Openbox menu editor
sudo apt-get install obmenu

Take a look at your ./config/openbox/rc.xml - there are various parts of interest; like key and mouse bindings, general window conf and reference (a must) to menu.xml file. Investigate.
Then open up menu.xml - either in freshly installed obmenu or in editor. That's almost empty too! Right, it is - and you can proceed now in several ways:
1. Create new menu section from debian-menu (where things are distributed in most bizarre way). Re-arrange items to their proper places in the menu. It takes time..., --reconfigure often and take a look what happens - copy/paste errors are easy to come.
2. There are menu-related pipemenus in Openbox Wiki. Unfortunately I didn't install them but, maybe they are of help when creating your menu.
3. I took most of menu from my installed Vsido (tweaked already, of course, according to my installs/uninstalls), and pasted it into new menu.xml. Had to make some 10 corrections in items (no sweat). Also, I had 'iconified' whole Vsido menu before (2-3 hours of hard work), I really didn't want to do that again...
Syntacs for adding icons: item icon="/home/yourname/.icons/themename/apps/iconname.png" label="Appname".
Simply add your icon=absol.address into item tags. Easy, but yes, it takes time.

It's reasonable to pair your menu-building with installing - so you don't forget what you added.
1. Things to add what should have been already installed in Xfce (here are also things I personally like and install - question of choice):
synaptic, spacefm (a file manager better than Thunar, has to be taken from here), medit (an editor better than Leafpad), xfce4-terminal, xfce4-taskmanager, icedtea, bum (Bootup Manager, lets you add and remove early startup things), bleachbit (cleaner), gdebi-gtk (might be already installed out-of-box), gparted.
2. Install now: gtk-chtheme and/or lxappearance, update-alternatives, xxkb (how to here), volumeicon-alsa (if going for alsa).
Additionally: ipkungfu firewall (how to), maybe clamav+clamtk antivirus - to be in safe side with usb-s. Also - for more nerdy pro-look: htop. And for syncing and backups and creating your own distro: gsync, fsarchiver, remastersys (looong and complicated theme, do google).

When finished with menu - to great satisfaction and even greater relief, start with other bits of desktop: open ./config/openbox/autostart and start-up some more apps.
Install: tint2 (panel, if one doesn't want to use already present Xfce-panel), nitrogen (wallpaper manager), conky (fancy graphical systeminfo on desktop), compton (compositor). They all have manual config editing only, but there are lot of tutorials/help available.
Config files go: ./config/tint2/tint2rc, ./config/nitrogen/nitrogen.cfg (I think it was auto-created), .conkyrc, .compton.conf. It's probably best to find those files in web and then tweak them according to your fancy. I, again, ripped them from my Vsido installation.
Then you have to stick proper commands to autostart file. Here is one autostart which has almost all included - tweak and shape it according to your situation. Both Tint and Conky take -c parameter for pointing to conf file, like:
(sleep 1s && -c ~/.conkyrc_upleft) &
So you can make several conf files and switch between them.
Spacefm can be started as daemon (helps start speed, with mounting and unmounting and whatnot): spacefm -d. Or, it can be used as (minimal) desktop manager.
For Conky you probably have to install lm-sensors (terminal command is 'sensors', by the way).
Logout/login... ? Sure, everything looks good and somehow more presentable. That's it for first phaze.

Now, what else to install? Openbox themes, of course. Which are easily tweakable... gcolor2 helps to find new exciting colors. Crystalcursors? Suckless-tools to go for more nerdiness?
Or, more practically, wicd (network tool) and/or samba (network tool for linux+windows mixed)?

One more interesting thing to do. Let's make Main Menu to launch from Tints' Launchers and let's make sure that right click on desktop opens our whole menu.
Your rc.xml has to have, and sorry - I can't show xml here, whole thing goes crazy... :
keybind key="A-C-q" with menu-def root-menu.
And also mousebind action="Press" button="Right" with menu-def root-menu.
Now install: sudo apt-get install xdotool wmctrl
Create a folder ./config/tint2/.tint2launchers. Create launchers you want to appear in your Tint launcher there (copy them from your .local/share/applications). Only one that really has to be created is your menu.desktop:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Openbox Menu
Exec=xdotool key ctrl+alt+q
Icon=yourfavoritemenuicon.png
NoDisplay=false
Edit tint2rc file: there has to be 'L' in panel defs block (L=Launcher); and under Launchers block: launcher_apps_dir = /home/yourname/.config/tint2/
It's also possible to use a launcher-script for more 'docky' behaviour
And with the same method you can create missing 'show desktop' launcher-icon (exec=xdotool key super+d)

Additionally: Read about relations/fixes of Compton and multimedia
I tend to remove pulseaudio, and install alsa only. How to here

AND FINALLY: Logout and a bunch.
Fresh Openbox comes with Restart and Exit items at bottom of the Menu. The first one didn't work for me at all, the second one did (and it means 'logout', by the way). Missing, obviously, are Shutdown (and Suspend + Hibernate, if we talk of laptops).
I installed script called Oblogout, but also, only thing that worked was Logout. Then I copied 'vsido-exit' script from /usr/bin/ of my Vsido install. And it worked like charm. It's not fancy-looking and missing Hibernate, but it's OK with me. Abstractedly, in Xubuntu, you have to have a script that doesn't have bits like 'gdm' and 'hal' in it. 'dbus', of the contrary, is a desirable bit.

That's it. Except strange case of two apps persistently missing few icons, everything is mint for me.